Assertion nsContentUtils::IsSafeToRunScript() fails when a JSProcessActor observes docshell creation
Categories
(Core :: DOM: Content Processes, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox80 | --- | fixed |
People
(Reporter: enndeakin, Assigned: kmag)
References
Details
Attachments
(1 file)
I added a JSProcessActorChild which listens to the 'webnavigation-create' observer notification.
When running the test browser/base/content/test/tabcrashed/browser_printpreview_crash.js, I get an assertion:
Assertion failure: nsContentUtils::IsSafeToRunScript(), at /builds/worker/checkouts/gecko/dom/ipc/jsactor/JSProcessActorProtocol.cpp:89
#01: non-virtual thunk to mozilla::dom::JSProcessActorProtocol::Observe(nsISupports*, char const*, char16_t const*) [dom/ipc/jsactor/JSProcessActorProtocol.cpp:0]
#02: nsObserverList::NotifyObservers(nsISupports*, char const*, char16_t const*) [xpcom/ds/nsObserverList.cpp:64]
#03: nsObserverService::NotifyObservers(nsISupports*, char const*, char16_t const*) [xpcom/ds/nsObserverService.cpp:290]
#04: nsDocShell::Create() [docshell/base/nsDocShell.cpp:0]
#05: nsFrameLoader::MaybeCreateDocShell() [dom/base/nsFrameLoader.cpp:2191]
#06: nsFrameLoader::FinishStaticClone(nsFrameLoader*, nsIDocShell**, mozilla::dom::Document**) [dom/base/nsFrameLoader.cpp:2782]
#07: BuildNestedPrintObjects(mozilla::dom::Document*, mozilla::UniquePtr<nsPrintObject, mozilla::DefaultDelete<nsPrintObject> > const&, nsTArray<nsPrintObject*>) [layout/printing/nsPrintJob.cpp:343]
#08: nsPrintJob::DoCommonPrint(bool, nsIPrintSettings, nsIWebProgressListener*, mozilla::dom::Document*) [layout/printing/nsPrintJob.cpp:685]
#09: nsPrintJob::CommonPrint(bool, nsIPrintSettings*, nsIWebProgressListener*, mozilla::dom::Document*) [layout/printing/nsPrintJob.cpp:595]
#10: nsPrintJob::PrintPreview(mozilla::dom::Document*, nsIPrintSettings*, nsIWebProgressListener*) [layout/printing/nsPrintJob.cpp:999]
#11: nsDocumentViewer::PrintPreview(nsIPrintSettings*, mozIDOMWindowProxy*, nsIWebProgressListener*) [layout/base/nsDocumentViewer.cpp:3239]
This is the only test that asserts.
It can easily be reproduced in a debug build by adding a 'webnavigation-create' observer to one of the existing JSProcessActors in ActorManagerParent.jsm
Comment 1•5 years ago
|
||
We should change https://searchfox.org/mozilla-central/rev/1b95a0179507a4dc7d4b0c94c2df420dc1a72885/docshell/base/nsDocShell.cpp#4108 to instead call nsIObserverService::NotifyWhenScriptSafe
.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Updated•5 years ago
|
Comment 4•5 years ago
|
||
bugherder |
Description
•