Closed Bug 606430 Opened 14 years ago Closed 14 years ago

"ASSERTION: EnsureEditorInitialized has been called while a previous call was in progress"

Categories

(Core :: DOM: Editor, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b7
Tracking Status
blocking2.0 --- final+

People

(Reporter: jruderman, Assigned: ehsan.akhgari)

References

Details

(Keywords: assertion, regression, testcase)

Attachments

(2 files)

Attached file testcase (deleted) —
###!!! ASSERTION: EnsureEditorInitialized has been called while a previous call was in progress: '!tracker.EnteredMoreThanOnce()', file layout/forms/nsTextControlFrame.cpp, line 406 This assertion was added in: changeset: 20d96fa137dd user: Ehsan Akhgari date: Tue Feb 09 20:29:11 2010 -0500 summary: Bug 221820 - Part 3: Debug-only assertion for reentrancy detection; r=bzbarsky
The call stack for the recursion looks like this: #0 0x100801541 in NS_DebugBreak_P at nsDebugImpl.cpp:274 #1 0x113bb4f8a in nsTextControlFrame::EnsureEditorInitialized at nsTextControlFrame.cpp:405 #2 0x113bb22b8 in nsTextControlFrame::SetSelectionRange at nsTextControlFrame.cpp:945 #3 0x113fd65ab in nsTextEditorState::PrepareEditor at nsTextEditorState.cpp:1332 #4 0x1140077d0 in nsHTMLInputElement::CreateEditor at nsHTMLInputElement.cpp:1277 #5 0x113bb4ffc in nsTextControlFrame::EnsureEditorInitialized at nsTextControlFrame.cpp:412 #6 0x11400e38b in nsHTMLInputElement::PreHandleEvent at nsHTMLInputElement.cpp:1959 #7 0x113fa422d in nsEventTargetChainItem::PreHandleEvent at nsEventDispatcher.cpp:272 #8 0x113fa4b75 in nsEventDispatcher::Dispatch at nsEventDispatcher.cpp:602 #9 0x113fa4ff9 in nsEventDispatcher::DispatchDOMEvent at nsEventDispatcher.cpp:691 #10 0x113f74db5 in nsEventListenerManager::DispatchEvent at nsEventListenerManager.cpp:1326 #11 0x113e9f521 in nsDOMEventRTTearoff::DispatchEvent at nsGenericElement.cpp:1970 #12 0x113e1d9f1 in nsContentUtils::DispatchTrustedEvent at nsContentUtils.cpp:3432 #13 0x113ee3b85 in nsScriptLoader::ProcessRequest at nsScriptLoader.cpp:708 #14 0x113ee8ccd in nsScriptRequestProcessor::Run at nsScriptLoader.cpp:359 #15 0x113e2058e in nsContentUtils::RemoveScriptBlocker at nsContentUtils.cpp:4751 #16 0x113eb3c52 in nsContentUtils::RemoveRemovableScriptBlocker at nsContentUtils.h:1483 #17 0x113e75985 in nsDocument::EndUpdate at nsDocument.cpp:3966 #18 0x11407f2d7 in nsHTMLDocument::EndUpdate at nsHTMLDocument.cpp:2963 #19 0x113c152b2 in mozAutoDocUpdate::~mozAutoDocUpdate at mozAutoDocUpdate.h:66 #20 0x113ea893c in nsINode::doInsertChildAt at nsGenericElement.cpp:3626 #21 0x113e65283 in nsDocument::InsertChildAt at nsDocument.cpp:3429 #22 0x113ea7c8e in nsINode::ReplaceOrInsertBefore at nsGenericElement.cpp:4282 #23 0x113fc9a94 in nsINode::ReplaceOrInsertBefore at nsINode.h:1222 #24 0x113fc9b13 in nsINode::InsertBefore at nsINode.h:457 #25 0x113fc9b40 in nsINode::AppendChild at nsINode.h:467 #26 0x1147be919 in nsIDOMNode_AppendChild at dom_quickstubs.cpp:5469 #27 0x1001b3d80 in js::CallJSNative at jscntxtinlines.h:652 #28 0x10035cc79 in CallCompiler::generateNativeStub at MonoIC.cpp:635 #29 0x10035a261 in js::mjit::ic::NativeCall at MonoIC.cpp:859 #30 0x11b4d3307 in ?? #31 0x1003103ad in js::mjit::EnterMethodJIT at MethodJIT.cpp:742 #32 0x1003104a4 in CheckStackAndEnterMethodJIT at MethodJIT.cpp:767 #33 0x1003105c1 in js::mjit::JaegerShot at MethodJIT.cpp:784 #34 0x1001b787a in js::RunScript at jsinterp.cpp:634 #35 0x1001b869b in js::Invoke at jsinterp.cpp:740 #36 0x1001b8d0d in js::ExternalInvoke at jsinterp.cpp:855 #37 0x1000e792b in js::ExternalInvoke at jsinterp.h:955 #38 0x1000e7a66 in JS_CallFunctionValue at jsapi.cpp:4960 #39 0x11418db5a in nsJSContext::CallEventHandler at nsJSEnvironment.cpp:2157 #40 0x114219ad3 in nsJSEventListener::HandleEvent at nsJSEventListener.cpp:228 #41 0x113f75aa0 in nsEventListenerManager::HandleEventSubType at nsEventListenerManager.cpp:1112 #42 0x113f75f18 in nsEventListenerManager::HandleEventInternal at nsEventListenerManager.cpp:1208 #43 0x113fa5a2b in nsEventListenerManager::HandleEvent at nsEventListenerManager.h:146 #44 0x113fa5bd6 in nsEventTargetChainItem::HandleEvent at nsEventDispatcher.cpp:212 #45 0x113fa3fe7 in nsEventTargetChainItem::HandleEventTargetChain at nsEventDispatcher.cpp:341 #46 0x113fa4c7e in nsEventDispatcher::Dispatch at nsEventDispatcher.cpp:628 #47 0x113b4115d in DocumentViewerImpl::LoadComplete at nsDocumentViewer.cpp:1034 #48 0x1163f7a69 in nsDocShell::EndPageLoad at nsDocShell.cpp:6006 #49 0x1163fe4c6 in nsDocShell::OnStateChange at nsDocShell.cpp:5860 #50 0x116439458 in nsDocLoader::FireOnStateChange at nsDocLoader.cpp:1334 #51 0x116439ae0 in nsDocLoader::doStopDocumentLoad at nsDocLoader.cpp:942 #52 0x116439e4e in nsDocLoader::DocLoaderIsEmpty at nsDocLoader.cpp:818 #53 0x11643b0d0 in nsDocLoader::OnStopRequest at nsDocLoader.cpp:702 #54 0x11292f7cd in nsLoadGroup::RemoveRequest at nsLoadGroup.cpp:680 #55 0x113e75bbb in nsDocument::DoUnblockOnload at nsDocument.cpp:7257 #56 0x113e75ce6 in nsDocument::UnblockOnload at nsDocument.cpp:7199 #57 0x11414585a in nsBindingManager::DoProcessAttachedQueue at nsBindingManager.cpp:999 #58 0x114148ff1 in nsRunnableMethodImpl<void (nsBindingManager::*)(), true>::Run at nsThreadUtils.h:347 #59 0x1008985f0 in nsThread::ProcessNextEvent at nsThread.cpp:547 #60 0x100811745 in NS_ProcessPendingEvents_P at nsThreadUtils.cpp:200 #61 0x1138f78b8 in nsBaseAppShell::NativeEventCallback at nsBaseAppShell.cpp:131 #62 0x1138a72b2 in nsAppShell::ProcessGeckoEvents at nsAppShell.mm:399 #63 0x7fff81f5ce91 in __CFRunLoopDoSources0 #64 0x7fff81f5b089 in __CFRunLoopRun #65 0x7fff81f5a84f in CFRunLoopRunSpecific #66 0x7fff84b3991a in RunCurrentEventLoopInMode #67 0x7fff84b3967d in ReceiveNextEventCommon #68 0x7fff84b395d8 in BlockUntilNextEventMatchingListInMode #69 0x7fff801c529e in _DPSNextEvent #70 0x7fff801c4bed in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] #71 0x1138a6fdf in nsAppShell::ProcessNextNativeEvent at nsAppShell.mm:675 #72 0x1138f7374 in nsBaseAppShell::DoProcessNextNativeEvent at nsBaseAppShell.cpp:161 #73 0x1138f7f97 in nsBaseAppShell::OnProcessNextEvent at nsBaseAppShell.cpp:299 #74 0x1138a68fa in nsAppShell::OnProcessNextEvent at nsAppShell.mm:833 #75 0x100898507 in nsThread::ProcessNextEvent at nsThread.cpp:517 #76 0x100811745 in NS_ProcessPendingEvents_P at nsThreadUtils.cpp:200 #77 0x1138f78b8 in nsBaseAppShell::NativeEventCallback at nsBaseAppShell.cpp:131 #78 0x1138a72b2 in nsAppShell::ProcessGeckoEvents at nsAppShell.mm:399 #79 0x7fff81f5ce91 in __CFRunLoopDoSources0 #80 0x7fff81f5b089 in __CFRunLoopRun #81 0x7fff81f5a84f in CFRunLoopRunSpecific #82 0x7fff84b3991a in RunCurrentEventLoopInMode #83 0x7fff84b3967d in ReceiveNextEventCommon #84 0x7fff84b395d8 in BlockUntilNextEventMatchingListInMode #85 0x7fff801c529e in _DPSNextEvent #86 0x7fff801c4bed in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] #87 0x7fff8018a8d3 in -[NSApplication run] #88 0x1138a6bca in nsAppShell::Run at nsAppShell.mm:746 #89 0x116d99fb8 in nsAppStartup::Run at nsAppStartup.cpp:191 #90 0x1000116cb in XRE_main at nsAppRunner.cpp:3682 #91 0x100001066 in main at nsBrowserApp.cpp:158
This is actually a regression from bug 597331, which added a call to nsTextControlFrame::SetSelectionRange to nsTextEditorState::PrepareEditor.
Blocks: 597331
No longer blocks: 221820
Attached patch Patch (v1) (deleted) — Splinter Review
Running nsTextControlFrame::SetSelectionRange from a script runner is safe, because a script blocker is set in nsTextControlFrame::EnsureEditorInitialized, which causes this call to happen after mUseEditor has been set to true, at the end of EnsureEditorInitialized.
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #485351 - Flags: review?(bzbarsky)
Attachment #485351 - Flags: approval2.0?
blocking2.0: --- → ?
Whiteboard: [has patch][needs review bz]
Comment on attachment 485351 [details] [diff] [review] Patch (v1) r=me
Attachment #485351 - Flags: review?(bzbarsky) → review+
Attachment #485351 - Flags: approval2.0? → approval2.0+
Whiteboard: [has patch][needs review bz] → [needs landing]
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [needs landing]
Target Milestone: --- → mozilla2.0b8
Keywords: regression
Target Milestone: mozilla2.0b8 → mozilla2.0b7
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: