Closed Bug 631553 Opened 9 years ago Closed 9 years ago
crash [@ PL
_DHash Table Operate | ns Frame Script Executor::Load Frame Script Internal]
This bug was filed from the Socorro interface and is report bp-049a1da3-0f33-42dc-9150-097b32110203 . ============================================================= According to the stack, we're trying to load a frame script in-process due to a DOM event being fired, and meanwhile XPCOM is shutting down. 0 libxul.so PL_DHashTableOperate pldhash.c:615 1 libxul.so nsFrameScriptExecutor::LoadFrameScriptInternal nsTHashtable.h:171 2 libxul.so nsInProcessTabChildGlobal::LoadFrameScript content/base/src/nsInProcessTabChildGlobal.cpp:334 ... 37 libxul.so mozilla::ShutdownXPCOM xpcom/build/nsXPComInit.cpp:637 38 libxul.so NS_ShutdownXPCOM_P xpcom/build/nsXPComInit.cpp:595 39 libxul.so ScopedXPCOMStartup::~ScopedXPCOMStartup toolkit/xre/nsAppRunner.cpp:1119 Since this is just the script caching breaking (sCachedScripts is null), I'm hoping we can change a couple lines and avoid this: >620 nsFrameScriptExecutorJSObjectHolder* holder = sCachedScripts->Get(aURL); >703 sCachedScripts->Put(aURL, holder);
Component: General → IPC
Product: Fennec → Core
QA Contact: general → ipc
Add a null check?
Comment on attachment 511039 [details] [diff] [review] Avoid caching frame scripts during xpcom shutdown. Could you just return early if !sCachedScripts?
Do you really want to just not execute the script if we can't cache it? Granted, this is during shutdown, but it makes me nervous.
We shouldn't run any new scripts during shutdown, IMO.
When you say new, do you mean never-seen-before, or just scripts in general? Because there's no way to determine if a script is new or not, as we've destroyed the script cache.
I mean we shouldn't allow executing nsFrameScriptExecutor::LoadFrameScriptInternal. The whole DOM and layout has been already shutdown if sScriptCacheCleaner is null.
Attachment #512822 - Attachment is obsolete: true
Attachment #512823 - Flags: review?(Olli.Pettay) → review+
Comment on attachment 512823 [details] [diff] [review] Avoid caching frame scripts during xpcom shutdown. This is a safe crash-on-shutdown fix that was popping up fairly regularly in b4 crash stats.
Attachment #512823 - Flags: approval2.0?
Attachment #512823 - Flags: approval2.0? → approval2.0+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Crash Signature: [@ PL_DHashTableOperate | nsFrameScriptExecutor::LoadFrameScriptInternal]
You need to log in before you can comment on or make changes to this bug.