RFR: 8255940: localStorage is null after window.close() [v2]
Jay Bhaskar
duke at openjdk.java.net
Sat Feb 5 12:58:20 UTC 2022
On Fri, 28 Jan 2022 00:10:31 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> Jay Bhaskar has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
>>
>> - Merge branch 'openjdk:master' into PRLocalstorage
>> - Window.close(), Fix for localstoarge
>
> modules/javafx.web/src/main/native/Source/WebCore/page/DOMWindow.cpp line 859:
>
>> 857: if (page->isClosing() && m_localStorage)
>> 858: return m_localStorage.get();
>> 859:
>
> If you make the earlier modification I suggested, then you don't need this block.
We must check if localstorage setting is disabled, then return nullptr first.,as below
if (!page->settings().localStorageEnabled())
return nullptr;
and there after the section
if (page->isClosing() && m_localStorage)
return m_localStorage.get();
would become as below
if (m_localStorage)
return m_localStorage.get();
-------------
PR: https://git.openjdk.java.net/jfx/pull/703
More information about the openjfx-dev
mailing list