OpenNewWindow does not open the requested URL when startup session restore happens
Categories
(Core :: DOM: Service Workers, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox142 | --- | fixed |
People
(Reporter: saschanaz, Assigned: saschanaz)
References
Details
Attachments
(1 file)
What's happening is that the attempt to load the URI from WaitForLoad is immediately overridden by SessionStoreUtils:
xul.dll!mozilla::dom::BrowsingContext::LoadURI(nsDocShellLoadState * aLoadState, bool aSetNavigating) Line 2012 (d:\gecko\docshell\base\BrowsingContext.cpp:2012)
xul.dll!nsSHistory::LoadURIOrBFCache(nsSHistory::LoadEntryResult & aLoadEntry) Line 1455 (d:\gecko\docshell\shistory\nsSHistory.cpp:1455)
xul.dll!nsSHistory::LoadURIs(nsTArray<nsSHistory::LoadEntryResult> & aLoadResults) Line 1459 (d:\gecko\docshell\shistory\nsSHistory.cpp:1459)
xul.dll!nsSHistory::ReloadCurrentEntry() Line 1525 (d:\gecko\docshell\shistory\nsSHistory.cpp:1525)
xul.dll!mozilla::dom::SessionStoreUtils::InitializeRestore(const mozilla::dom::GlobalObject & aGlobal, mozilla::dom::CanonicalBrowsingContext & aContext, nsISessionStoreRestoreData * aData, mozilla::ErrorResult & aError) Line 1667 (d:\gecko\toolkit\components\sessionstore\SessionStoreUtils.cpp:1667)
xul.dll!mozilla::dom::SessionStoreUtils_Binding::initializeRestore(JSContext * cx_, unsigned int argc, JS::Value * vp) Line 1783 (d:\gecko\obj-x86_64-pc-windows-msvc\dom\bindings\SessionStoreUtilsBinding.cpp:1783)
xul.dll!mozilla::dom::StaticMethodPromiseWrapper(JSContext * cx, unsigned int argc, JS::Value * vp) Line 3345 (d:\gecko\dom\bindings\BindingUtils.cpp:3345)
[Inline Frame] xul.dll!CallJSNative(JSContext * cx, bool(*)(JSContext *, unsigned int, JS::Value *) native, js::CallReason reason, const JS::CallArgs & args) Line 501 (d:\gecko\js\src\vm\Interpreter.cpp:501)
xul.dll!js::InternalCallOrConstruct(JSContext * cx, const JS::CallArgs & args, js::MaybeConstruct construct, js::CallReason reason) Line 597 (d:\gecko\js\src\vm\Interpreter.cpp:597)
xul.dll!InternalCall(JSContext * cx, const js::AnyInvokeArgs & args, js::CallReason reason) Line 664 (d:\gecko\js\src\vm\Interpreter.cpp:664)
xul.dll!js::CallFromStack(JSContext * cx, const JS::CallArgs & args, js::CallReason reason) Line 669 (d:\gecko\js\src\vm\Interpreter.cpp:669)
xul.dll!js::Interpret(JSContext * cx, js::RunState & state) Line 3287 (d:\gecko\js\src\vm\Interpreter.cpp:3287)
[Inline Frame] xul.dll!MaybeEnterInterpreterTrampoline(JSContext * cx, js::RunState & state) Line 395 (d:\gecko\js\src\vm\Interpreter.cpp:395)
xul.dll!js::RunScript(JSContext * cx, js::RunState & state) Line 471 (d:\gecko\js\src\vm\Interpreter.cpp:471)
xul.dll!js::InternalCallOrConstruct(JSContext * cx, const JS::CallArgs & args, js::MaybeConstruct construct, js::CallReason reason) Line 629 (d:\gecko\js\src\vm\Interpreter.cpp:629)
xul.dll!InternalCall(JSContext * cx, const js::AnyInvokeArgs & args, js::CallReason reason) Line 664 (d:\gecko\js\src\vm\Interpreter.cpp:664)
xul.dll!js::CallFromStack(JSContext * cx, const JS::CallArgs & args, js::CallReason reason) Line 669 (d:\gecko\js\src\vm\Interpreter.cpp:669)
xul.dll!js::jit::DoCallFallback(JSContext * cx, js::jit::BaselineFrame * frame, js::jit::ICFallbackStub * stub, unsigned int argc, JS::Value * vp, JS::MutableHandle<JS::Value> res) Line 1705 (d:\gecko\js\src\jit\BaselineIC.cpp:1705)
00000155d1733a02() (Unknown Source:0)
00000155d1739d66() (Unknown Source:0)
LoadURI is called for the same BrowsingContext, and thus the first load by service worker is overridden.
| Assignee | ||
Updated•5 months ago
|
| Assignee | ||
Comment 1•5 months ago
|
||
Currently we load the URI using the resulting BrowsingContext, but that causes race with session restore. Passing the URI as an argument to the browser chrome page solves the issue.
Updated•5 months ago
|
Backed out for causing junit failures @openWindowSameSession.
| Assignee | ||
Comment 6•5 months ago
|
||
Maybe shouldLoadURI should be always true for GV.
| Assignee | ||
Comment 8•5 months ago
|
||
Probably the same reason as comment #6, thanks!
| Assignee | ||
Comment 9•5 months ago
|
||
(because GeckoViewOpenWindow never sets bc at all... 😅)
Comment 10•5 months ago
|
||
Comment 11•5 months ago
|
||
Comment 12•5 months ago
|
||
Backed out for causing mochitest failures @ test_notification_serviceworker_openWindow.html
Backout link: https://hg-edge.mozilla.org/integration/autoland/rev/f0be9859bd7b66952fe44f2fbc699f4faba04d88
Comment 13•5 months ago
|
||
| Assignee | ||
Comment 14•5 months ago
|
||
No backout so far and I hope it stay that way 🙏🏻
Comment 15•5 months ago
|
||
| bugherder | ||
Updated•4 months ago
|
Description
•