[jfx17u] RFR: 8255940: localStorage is null after window.close()

2022-04-29 Thread Ambarish Rapte
Reviewed-by: kcr, arapte - Commit messages: - 8255940: localStorage is null after window.close() Changes: https://git.openjdk.java.net/jfx17u/pull/45/files Webrev: https://webrevs.openjdk.java.net/?repo=jfx17u&pr=45&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8255940

[jfx11u] RFR: 8255940: localStorage is null after window.close()

2022-04-28 Thread Ambarish Rapte
Reviewed-by: kcr, arapte - Commit messages: - 8255940: localStorage is null after window.close() Changes: https://git.openjdk.java.net/jfx11u/pull/88/files Webrev: https://webrevs.openjdk.java.net/?repo=jfx11u&pr=88&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8255940

Re: RFR: 8255940: localStorage is null after window.close() [v9]

2022-03-07 Thread Kevin Rushforth
On Fri, 4 Mar 2022 16:55:48 GMT, Jay Bhaskar 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-webstorag

Re: RFR: 8255940: localStorage is null after window.close() [v9]

2022-03-07 Thread Andreas Müller
On Fri, 4 Mar 2022 16:55:48 GMT, Jay Bhaskar 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-webstorag

Re: RFR: 8255940: localStorage is null after window.close() [v9]

2022-03-04 Thread Ambarish Rapte
On Fri, 4 Mar 2022 16:55:48 GMT, Jay Bhaskar 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-webstorag

Re: RFR: 8255940: localStorage is null after window.close() [v9]

2022-03-04 Thread Kevin Rushforth
On Fri, 4 Mar 2022 16:55:48 GMT, Jay Bhaskar 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-webstorag

Re: RFR: 8255940: localStorage is null after window.close() [v9]

2022-03-04 Thread Jay Bhaskar
> 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 l

Re: RFR: 8255940: localStorage is null after window.close() [v8]

2022-03-04 Thread Jay Bhaskar
On Thu, 3 Mar 2022 17:08:49 GMT, Jay Bhaskar 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-webstorag

Re: RFR: 8255940: localStorage is null after window.close() [v8]

2022-03-04 Thread Kevin Rushforth
On Thu, 3 Mar 2022 17:08:49 GMT, Jay Bhaskar 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-webstorag

Re: RFR: 8255940: localStorage is null after window.close() [v7]

2022-03-03 Thread Jay Bhaskar
On Tue, 1 Mar 2022 10:00:58 GMT, Ambarish Rapte wrote: >> Jay Bhaskar has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Clean up test and fix > > modules/javafx.web/src/main/native/Source/WebCore/page/DOMWindow.cpp line 850: > >> 848:

Re: RFR: 8255940: localStorage is null after window.close() [v8]

2022-03-03 Thread Jay Bhaskar
> 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 l

Re: RFR: 8255940: localStorage is null after window.close() [v7]

2022-03-01 Thread Ambarish Rapte
On Tue, 1 Mar 2022 02:42:54 GMT, Jay Bhaskar 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-webstorag

Re: RFR: 8255940: localStorage is null after window.close() [v7]

2022-02-28 Thread Jay Bhaskar
> 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 l

Re: RFR: 8255940: localStorage is null after window.close() [v5]

2022-02-28 Thread Jay Bhaskar
On Mon, 28 Feb 2022 14:53:39 GMT, Kevin Rushforth wrote: >> Jay Bhaskar has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add Review Changes > > modules/javafx.web/src/test/java/test/javafx/scene/web/LocalStorageTest.java > line 55: > >>

Re: RFR: 8255940: localStorage is null after window.close() [v6]

2022-02-28 Thread Jay Bhaskar
On Mon, 28 Feb 2022 13:58:03 GMT, Kevin Rushforth wrote: >> Jay Bhaskar has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add Review Changes > > modules/javafx.web/src/main/native/Source/WebCore/page/DOMWindow.cpp line 851: > >> 849: >>

Re: RFR: 8255940: localStorage is null after window.close() [v5]

2022-02-28 Thread Kevin Rushforth
On Sun, 27 Feb 2022 05:35:23 GMT, Jay Bhaskar 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-webstora

Re: RFR: 8255940: localStorage is null after window.close() [v6]

2022-02-28 Thread Kevin Rushforth
On Sun, 27 Feb 2022 05:43:27 GMT, Jay Bhaskar 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-webstora

Re: RFR: 8255940: localStorage is null after window.close() [v6]

2022-02-26 Thread Jay Bhaskar
> 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 l

Re: RFR: 8255940: localStorage is null after window.close() [v6]

2022-02-26 Thread Jay Bhaskar
On Sat, 5 Feb 2022 14:57:50 GMT, Kevin Rushforth wrote: >> modules/javafx.web/src/main/native/Source/WebCore/page/DOMWindow.cpp line >> 857: >> >>> 855: return m_localStorage.get(); >>> 856: } >>> 857: >> >> This will change the behavior for the case where page is null or wher

Re: RFR: 8255940: localStorage is null after window.close() [v3]

2022-02-26 Thread Jay Bhaskar
On Sun, 27 Feb 2022 05:25:25 GMT, Jay Bhaskar wrote: >> modules/javafx.web/src/test/java/test/javafx/scene/web/LocalStorageTest.java >> line 55: >> >>> 53: >>> 54: private static final File LOCAL_STORAGE_DIR = new >>> File("LocalStorageDir"); >>> 55: private static final File PRE_LOCK

Re: RFR: 8255940: localStorage is null after window.close() [v5]

2022-02-26 Thread Jay Bhaskar
> 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 l

Re: RFR: 8255940: localStorage is null after window.close() [v3]

2022-02-26 Thread Jay Bhaskar
On Fri, 25 Feb 2022 23:15:54 GMT, Kevin Rushforth wrote: >> Jay Bhaskar has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - Change Dir Path and use local Dir and set data before clearing >> localstorage test >> - Merge branch 'PRLocals

Re: RFR: 8255940: localStorage is null after window.close() [v3]

2022-02-26 Thread Jay Bhaskar
On Sun, 27 Feb 2022 05:30:44 GMT, Jay Bhaskar wrote: >> Agree > > Agree, done Agree - PR: https://git.openjdk.java.net/jfx/pull/703

Re: RFR: 8255940: localStorage is null after window.close() [v3]

2022-02-26 Thread Jay Bhaskar
On Sun, 27 Feb 2022 05:30:34 GMT, Jay Bhaskar wrote: >> modules/javafx.web/src/test/java/test/javafx/scene/web/LocalStorageTest.java >> line 59: >> >>> 57: private static RandomAccessFile preLockedRaf; >>> 58: private static FileLock preLockedLock; >>> 59: private static final Rando

Re: RFR: 8255940: localStorage is null after window.close() [v3]

2022-02-26 Thread Jay Bhaskar
On Fri, 25 Feb 2022 23:09:00 GMT, Kevin Rushforth wrote: >> Jay Bhaskar has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - Change Dir Path and use local Dir and set data before clearing >> localstorage test >> - Merge branch 'PRLocals

Re: RFR: 8255940: localStorage is null after window.close() [v4]

2022-02-26 Thread Jay Bhaskar
> 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 l

Re: RFR: 8255940: localStorage is null after window.close() [v3]

2022-02-25 Thread Kevin Rushforth
On Mon, 7 Feb 2022 08:14:50 GMT, Jay Bhaskar 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-webstorag

Re: RFR: 8255940: localStorage is null after window.close() [v3]

2022-02-07 Thread Jay Bhaskar
On Sun, 6 Feb 2022 11:54:14 GMT, Jay Bhaskar wrote: >> No, it's not OK for two reasons: >> >> 1. It prevents concurrent execution of tests from two different directories >> 2. The Java temp directory might be something other than "/tmp" on some >> systems. >> >> Best is to use a local subdir u

Re: RFR: 8255940: localStorage is null after window.close() [v3]

2022-02-07 Thread Jay Bhaskar
> 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 l

Re: RFR: 8255940: localStorage is null after window.close() [v2]

2022-02-06 Thread Jay Bhaskar
On Sat, 5 Feb 2022 15:01:37 GMT, Kevin Rushforth wrote: >> i think /tmp/java-store is ok, as it would not require cleanup > > No, it's not OK for two reasons: > > 1. It prevents concurrent execution of tests from two different directories > 2. The Java temp directory might be something other tha

Re: RFR: 8255940: localStorage is null after window.close() [v2]

2022-02-05 Thread Kevin Rushforth
On Sat, 5 Feb 2022 15:15:26 GMT, Jay Bhaskar wrote: >> 1. My point was that if you initially check for `m_localStorage` being >> non-null, without the check for `isClosing` (see my earlier comment), then >> you don't need to check it here. >> >> 2. Regarding the enabling of local storage in We

Re: RFR: 8255940: localStorage is null after window.close() [v2]

2022-02-05 Thread Jay Bhaskar
On Sat, 5 Feb 2022 15:17:46 GMT, Jay Bhaskar wrote: >> Can you comment on this? > > yes, your are right , i would change it i will test unit case again after your suggested chnage - PR: https://git.openjdk.java.net/jfx/pull/703

Re: RFR: 8255940: localStorage is null after window.close() [v2]

2022-02-05 Thread Jay Bhaskar
On Sat, 5 Feb 2022 15:02:09 GMT, Kevin Rushforth wrote: >> modules/javafx.web/src/test/java/test/javafx/scene/web/LocalStorageTest.java >> line 60: >> >>> 58: assertNotNull(webEngine.executeScript("localStorage;")); >>> 59: getEngine().executeScript("window.close();"); >

Re: RFR: 8255940: localStorage is null after window.close() [v2]

2022-02-05 Thread Jay Bhaskar
On Sat, 5 Feb 2022 15:04:37 GMT, Kevin Rushforth wrote: >> The test runs after testLocalStorageSet , so there would be items in >> localstorage > > No, this is a common misconception when writing JUnit tests. The test > execution order is _not_ guaranteed and will change. Each test method needs

Re: RFR: 8255940: localStorage is null after window.close() [v2]

2022-02-05 Thread Jay Bhaskar
On Sat, 5 Feb 2022 14:58:25 GMT, Kevin Rushforth wrote: >> in recent code base (webkit upgrade)the localstorage is false , >> @@ -1579,7 +1579,7 @@ NeedsSiteSpecificQuirks: >> WebKit: >>default: true >> WebCore: >> - default: false >> + default: true >> >> So , it nee

Re: RFR: 8255940: localStorage is null after window.close() [v2]

2022-02-05 Thread Kevin Rushforth
On Sat, 5 Feb 2022 05:41:25 GMT, Jay Bhaskar wrote: >> modules/javafx.web/src/test/java/test/javafx/scene/web/LocalStorageTest.java >> line 2: >> >>> 1: /* >>> 2: * Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights >>> reserved. >> >> Copyright should be a single year (2022)

Re: RFR: 8255940: localStorage is null after window.close() [v2]

2022-02-05 Thread Kevin Rushforth
On Sat, 5 Feb 2022 12:54:43 GMT, Jay Bhaskar wrote: >> 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_l

Re: RFR: 8255940: localStorage is null after window.close() [v2]

2022-02-05 Thread Kevin Rushforth
On Fri, 28 Jan 2022 00:09:11 GMT, Kevin Rushforth 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 >> commit

Re: RFR: 8255940: localStorage is null after window.close() [v2]

2022-02-05 Thread Jay Bhaskar
On Sat, 5 Feb 2022 12:51:58 GMT, Jay Bhaskar wrote: >> 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 modificati

Re: RFR: 8255940: localStorage is null after window.close() [v2]

2022-02-05 Thread Jay Bhaskar
On Fri, 28 Jan 2022 00:10:31 GMT, Kevin Rushforth 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 >> commit

Re: RFR: 8255940: localStorage is null after window.close() [v2]

2022-02-04 Thread Jay Bhaskar
On Fri, 28 Jan 2022 00:11:40 GMT, Kevin Rushforth 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 >> commit

Re: RFR: 8255940: localStorage is null after window.close() [v2]

2022-02-04 Thread Jay Bhaskar
> 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 l

Re: RFR: 8255940: localStorage is null after window.close()

2022-01-27 Thread Kevin Rushforth
On Mon, 27 Dec 2021 09:31:08 GMT, Jay Bhaskar 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-2

RFR: 8255940: localStorage is null after window.close()

2022-01-13 Thread Jay Bhaskar
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 stora