On Thu, 3 Mar 2022 17:08:49 GMT, Jay Bhaskar <jbhas...@openjdk.org> wrote:

>> Issue: The current implementation of DOMWindow ::localStorage(..) returns 
>> null pointer in case of page is being closed. 
>> Fix: It should not return nullptr , as per the [w3c web storage 
>> spec](https://www.w3.org/TR/2016/REC-webstorage-20160419/) 
>> "User agents should expire data from the local storage areas only for 
>> security reasons or when requested to do so by the user. User agents should 
>> always avoid deleting data while a script that could access that data is 
>> running."
>
> Jay Bhaskar has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Restore original , and new changes wrapped with define JAVA

I recommend also putting the following restored code under `#if 
!PLATFORM(JAVA)`:


    // FIXME: We should consider supporting access/modification to local storage
    // after calling window.close(). See 
<https://bugs.webkit.org/show_bug.cgi?id=135330>.
    if (!page || !page->isClosing()) {
        if (m_localStorage)
            return m_localStorage.get();
    }


The rest looks good.

-------------

PR: https://git.openjdk.java.net/jfx/pull/703

Reply via email to