Closed Bug 403574 Opened 12 years ago Closed 12 years ago

"ASSERTION: Infinite loop! Calling EnsureScriptEnvironment() from within EnsureScriptEnvironment()!" with XBL, <frame>

Categories

(Core :: Document Navigation, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla1.9beta4

People

(Reporter: jruderman, Assigned: jst)

References

(Blocks 2 open bugs)

Details

(Keywords: assertion, testcase)

Attachments

(3 files)

Steps to reproduce:
1. Load the testcase.
2. Quit Firefox (or wait for a GC?)

Result:

###!!! ASSERTION: Infinite loop! Calling EnsureScriptEnvironment() from within EnsureScriptEnvironment()!: '!mInEnsureScriptEnv', file /Users/jruderman/trunk/mozilla/docshell/base/nsDocShell.cpp, line 8679

(no hang or crash, though)

This assertion was added yesterday, in bug 392532.
I can't seem to reproduce this.... (with a build that does contain that patch).
Attached file stack to the assertion
Looks like the problem are the early returns between setting mInEnsureScriptEnv to true and setting it to false.  Presumably we take one of those at some point...  Should use a little debug object to reset  mInEnsureScriptEnv, I think.
Attached patch Fix.Splinter Review
Assignee: nobody → jst
Status: NEW → ASSIGNED
Attachment #288519 - Flags: superreview?(bzbarsky)
Attachment #288519 - Flags: review?(bzbarsky)
Attachment #288519 - Flags: superreview?(bzbarsky)
Attachment #288519 - Flags: superreview+
Attachment #288519 - Flags: review?(bzbarsky)
Attachment #288519 - Flags: review+
I'm experiencing a vaguely similar problem when porting AllPeers to Firefox 3 -- if I open  AllPeers sidebar, then close it and open again, I get an infinite loop, with this output repeatedly printed on the console:

++DOMWINDOW == 39 (0x391d450) [serial = 43] [Outer = 0x2d53c00]
JavaScript strict warning: chrome://allpeers/content/workbench/apCommon.js, line 2271: assignment to undeclared variable apUrlClass
++WEBSHELL 0x3973400 == 19
++DOMWINDOW == 40 (0x3974050) [serial = 44] [Outer = (nil)]
++WEBSHELL 0x3975400 == 20
++DOMWINDOW == 41 (0x3976050) [serial = 45] [Outer = (nil)]
++DOMWINDOW == 42 (0x39b9050) [serial = 46] [Outer = 0x3974000]
++DOMWINDOW == 43 (0x3b75c50) [serial = 47] [Outer = 0x3976000]
WARNING: empty langgroup: file /home/luigi/dev/mozilla/gfx/thebes/src/gfxFont.cpp, line 898
WARNING: NS_ENSURE_SUCCESS(EnsureContentViewer(), ((nsresult) 0x80004005L)) failed with result 0x80004005: file /home/luigi/dev/mozilla/docshell/base/nsDocShell.cpp, line 3384
###!!! ASSERTION: Shouldn't be observing anymore!: '!mObservedDocument', file /home/luigi/dev/mozilla/content/xul/templates/src/nsXULTemplateBuilder.cpp, line 240
WARNING: NS_ENSURE_SUCCESS(EnsureScriptEnvironment(), 0) failed with result 0x80040111: file /home/luigi/dev/mozilla/docshell/base/nsDocShell.cpp, line 4285
WARNING: NS_ENSURE_TRUE(scriptGO) failed: file /home/luigi/dev/mozilla/docshell/base/nsDocShell.cpp, line 8901
WARNING: NS_ENSURE_TRUE(mWebBrowserFind) failed: file /home/luigi/dev/mozilla/toolkit/components/typeaheadfind/src/nsTypeAheadFind.cpp, line 205
WARNING: NS_ENSURE_SUCCESS(EnsureScriptEnvironment(), 0) failed with result 0x80040111: file /home/luigi/dev/mozilla/docshell/base/nsDocShell.cpp, line 4285
WARNING: NS_ENSURE_TRUE(scriptGO) failed: file /home/luigi/dev/mozilla/docshell/base/nsDocShell.cpp, line 8901
WARNING: NS_ENSURE_TRUE(mWebBrowserFind) failed: file /home/luigi/dev/mozilla/toolkit/components/typeaheadfind/src/nsTypeAheadFind.cpp, line 205
WARNING: NS_ENSURE_SUCCESS(EnsureScriptEnvironment(), 0) failed with result 0x80040111: file /home/luigi/dev/mozilla/docshell/base/nsDocShell.cpp, line 4285
WARNING: NS_ENSURE_TRUE(scriptGO) failed: file /home/luigi/dev/mozilla/docshell/base/nsDocShell.cpp, line 8901
WARNING: NS_ENSURE_TRUE(mWebBrowserFind) failed: file /home/luigi/dev/mozilla/toolkit/components/typeaheadfind/src/nsTypeAheadFind.cpp, line 205

I tried applying the above patch, but it didn't help. Is this issue related to this bug at all?
If you're not seeing that assertion, you're not seeing this bug.

jst, do you want to land that patch?
Keywords: checkin-needed
Checking in docshell/base/nsDocShell.cpp;
/cvsroot/mozilla/docshell/base/nsDocShell.cpp,v  <--  nsDocShell.cpp
new revision: 1.886; previous revision: 1.885
done
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Component: XBL → Embedding: Docshell
Keywords: checkin-needed
OS: Mac OS X → All
QA Contact: xbl → docshell
Hardware: PC → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9beta4
Crashtest checked in.
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.