Closed Bug 1004648 Opened 10 years ago Closed 8 years ago

Alert + console combo locks up browser

Categories

(Core :: DOM: Core & HTML, defect)

31 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: marcosc, Unassigned)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached file test.html (obsolete) (deleted) —
To reproduce: 
1. run attached test.html
2. browser locks up. 

expected: 
1. To be able to click "ok" on all alerts.

actual:
1. browser locks up after second "ok". Seems to never return.
Attached file testcase (deleted) —
The test case needs to refer to an existing stylesheet...
Attachment #8416054 - Attachment is obsolete: true
This is the backtrace:

(gdb) bt
#0  0x00007fff94410a1a in mach_msg_trap ()
#1  0x00007fff9440fd18 in mach_msg ()
#2  0x00007fff92c8cfc5 in __CFRunLoopServiceMachPort ()
#3  0x00007fff92c8c5e9 in __CFRunLoopRun ()
#4  0x00007fff92c8bf25 in CFRunLoopRunSpecific ()
#5  0x00007fff8dd5eadc in -[NSRunLoop(NSRunLoop) runMode:beforeDate:] ()
#6  0x0000000103215827 in nsAppShell::ProcessNextNativeEvent (this=0x110d2ede0, aMayWait=true) at nsAppShell.mm:664
#7  0x0000000103289bd3 in nsBaseAppShell::DoProcessNextNativeEvent (this=0x110d2ede0, mayWait=true, recursionDepth=0) at nsBaseAppShell.cpp:140
#8  0x000000010328a183 in nsBaseAppShell::OnProcessNextEvent (this=0x110d2ede0, thr=0x1003289c0, mayWait=true, recursionDepth=0) at nsBaseAppShell.cpp:298
#9  0x0000000103215e57 in nsAppShell::OnProcessNextEvent (this=0x110d2ede0, aThread=0x1003289c0, aMayWait=true, aRecursionDepth=0) at nsAppShell.mm:833
#10 0x0000000103215f04 in non-virtual thunk to nsAppShell::OnProcessNextEvent(nsIThreadInternal*, bool, unsigned int) (this=0x110d2ede8, aThread=0x1003289c0, aMayWait=true, aRecursionDepth=0) at Unified_mm_widget_cocoa0.mm:836
#11 0x00000001016ac78f in nsThread::ProcessNextEvent (this=0x1003289c0, mayWait=true, result=0x7fff5fbf33c0) at nsThread.cpp:688
#12 0x00000001016cbe69 in NS_InvokeByIndex (that=0x1003289c0, methodIndex=8, paramCount=2, params=0x7fff5fbf33a8) at xptcinvoke_x86_64_unix.cpp:162
#13 0x00000001033f8c64 in CallMethodHelper::Invoke (this=0x7fff5fbf3360) at XPCWrappedNative.cpp:2399
#14 0x00000001033ecd87 in CallMethodHelper::Call (this=0x7fff5fbf3360) at XPCWrappedNative.cpp:1740
#15 0x00000001033cbc27 in XPCWrappedNative::CallMethod (ccx=@0x7fff5fbf3548, mode=XPCWrappedNative::CALL_METHOD) at XPCWrappedNative.cpp:1707
#16 0x00000001033ce1eb in XPC_WN_CallMethod (cx=0x119879a40, argc=1, vp=0x7fff5fbf3710) at XPCWrappedNativeJSOps.cpp:1277
#17 0x00000001004dda9c in ?? ()
#18 0x000000012480a220 in ?? ()
#19 0x00000001005c9845 in ?? ()
#20 0x0000000105f5012f in EnterBaseline (cx=0x119879a40, data=@0x7fff5fbf3b90) at BaselineJIT.cpp:124
#21 0x0000000105f4fbe4 in js::jit::EnterBaselineMethod (cx=0x119879a40, state=@0x7fff5fbf57c8) at BaselineJIT.cpp:156
#22 0x00000001064bd022 in Interpret (cx=0x119879a40, state=@0x7fff5fbf6b78) at Interpreter.cpp:2658
#23 0x00000001064af989 in js::RunScript (cx=0x119879a40, state=@0x7fff5fbf6b78) at Interpreter.cpp:422
#24 0x00000001064c6bc3 in js::Invoke (cx=0x119879a40, args={<JS::detail::CallArgsBase<0>> = {<JS::CallReceiver> = {<JS::detail::CallReceiverBase<0>> = {<JS::detail::UsedRvalBase<IncludeUsedRval>> = {usedRval_ = false}, argv_ = 0x7fff5fbf6d70}, <No data fields>}, argc_ = 4}, <No data fields>}, construct=js::NO_CONSTRUCT) at Interpreter.cpp:494
#25 0x00000001064c73f2 in js::Invoke (cx=0x119879a40, thisv=@0x7fff5fbf6e40, fval=@0x7fff5fbf77c8, argc=4, argv=0x7fff5fbf7700, rval={<js::MutableHandleBase<JS::Value>> = {<js::MutableValueOperations<JS::MutableHandle<JS::Value> >> = {<js::ValueOperations<JS::MutableHandle<JS::Value> >> = {<No data fields>}, <No data fields>}, <No data fields>}, ptr = 0x7fff5fbf7440}) at Interpreter.cpp:531
#26 0x0000000106247e94 in JS_CallFunctionValue (cx=0x119879a40, obj={<js::HandleBase<JSObject *>> = {<No data fields>}, ptr = 0x7fff5fbf7778}, fval={<js::HandleBase<JS::Value>> = {<js::ValueOperations<JS::Handle<JS::Value> >> = {<No data fields>}, <No data fields>}, ptr = 0x7fff5fbf77c8}, args=@0x7fff5fbf73d0, rval={<js::MutableHandleBase<JS::Value>> = {<js::MutableValueOperations<JS::MutableHandle<JS::Value> >> = {<js::ValueOperations<JS::MutableHandle<JS::Value> >> = {<No data fields>}, <No data fields>}, <No data fields>}, ptr = 0x7fff5fbf7440}) at jsapi.cpp:5184
#27 0x00000001033c19a7 in nsXPCWrappedJSClass::CallMethod (this=0x114873060, wrapper=0x114d39180, methodIndex=4, info_=0x110cba4b0, nativeParams=0x7fff5fbf7af0) at XPCWrappedJSClass.cpp:1272
#28 0x00000001033bb759 in nsXPCWrappedJS::CallMethod (this=0x114d39180, methodIndex=4, info=0x110cba4b0, params=0x7fff5fbf7af0) at XPCWrappedJS.cpp:517
#29 0x00000001016cd950 in PrepareAndDispatch (self=0x1238c67a0, methodIndex=4, args=0x7fff5fbf7c50, gpregs=0x7fff5fbf7bd0, fpregs=0x7fff5fbf7c00) at xptcstubs_x86_64_darwin.cpp:122
#30 0x00000001016cc3ab in SharedStub () at xptcstubs_x86_64_darwin.cpp:35
#31 0x0000000103509a30 in nsGlobalWindow::AlertOrConfirm (this=0x123448800, aAlert=true, aMessage=@0x7fff5fbf8018, aError=@0x7fff5fbf7fe8) at /Users/ehsan/moz/src/dom/base/nsGlobalWindow.cpp:6232
#32 0x0000000103509d64 in nsGlobalWindow::Alert (this=0x123448800, aMessage=@0x7fff5fbf8018, aError=@0x7fff5fbf7fe8) at /Users/ehsan/moz/src/dom/base/nsGlobalWindow.cpp:6252
#33 0x0000000103509d3f in nsGlobalWindow::Alert (this=0x11c233c00, aMessage=@0x7fff5fbf8018, aError=@0x7fff5fbf7fe8) at /Users/ehsan/moz/src/dom/base/nsGlobalWindow.cpp:6251
#34 0x00000001030327d2 in mozilla::dom::WindowBinding::alert (cx=0x119879a40, obj={<js::HandleBase<JSObject *>> = {<No data fields>}, ptr = 0x7fff5fbf8188}, self=0x11c233c00, args=@0x7fff5fbf80c0) at WindowBinding.cpp:1688
#35 0x000000010302c165 in mozilla::dom::WindowBinding::genericMethod (cx=0x119879a40, argc=1, vp=0x112571090) at WindowBinding.cpp:11271
#36 0x00000001064f2435 in js::CallJSNative (cx=0x119879a40, native=0x10302bc30 <mozilla::dom::WindowBinding::genericMethod(JSContext*, unsigned int, JS::Value*)>, args=@0x7fff5fbf87b0) at jscntxtinlines.h:239
#37 0x00000001064c6aa3 in js::Invoke (cx=0x119879a40, args={<JS::detail::CallArgsBase<0>> = {<JS::CallReceiver> = {<JS::detail::CallReceiverBase<0>> = {<JS::detail::UsedRvalBase<IncludeUsedRval>> = {usedRval_ = false}, argv_ = 0x1125710a0}, <No data fields>}, argc_ = 1}, <No data fields>}, construct=js::NO_CONSTRUCT) at Interpreter.cpp:475
#38 0x00000001064bcc3b in Interpret (cx=0x119879a40, state=@0x7fff5fbfb6e8) at Interpreter.cpp:2620
#39 0x00000001064af989 in js::RunScript (cx=0x119879a40, state=@0x7fff5fbfb6e8) at Interpreter.cpp:422
#40 0x00000001064c6bc3 in js::Invoke (cx=0x119879a40, args={<JS::detail::CallArgsBase<0>> = {<JS::CallReceiver> = {<JS::detail::CallReceiverBase<0>> = {<JS::detail::UsedRvalBase<IncludeUsedRval>> = {usedRval_ = false}, argv_ = 0x7fff5fbfb8e0}, <No data fields>}, argc_ = 1}, <No data fields>}, construct=js::NO_CONSTRUCT) at Interpreter.cpp:494
#41 0x00000001064c73f2 in js::Invoke (cx=0x119879a40, thisv=@0x7fff5fbfbc88, fval=@0x7fff5fbfbae8, argc=1, argv=0x7fff5fbfbb58, rval={<js::MutableHandleBase<JS::Value>> = {<js::MutableValueOperations<JS::MutableHandle<JS::Value> >> = {<js::ValueOperations<JS::MutableHandle<JS::Value> >> = {<No data fields>}, <No data fields>}, <No data fields>}, ptr = 0x7fff5fbfbbc8}) at Interpreter.cpp:531
#42 0x0000000106247fb4 in JS::Call (cx=0x119879a40, thisv={<js::HandleBase<JS::Value>> = {<js::ValueOperations<JS::Handle<JS::Value> >> = {<No data fields>}, <No data fields>}, ptr = 0x7fff5fbfbc88}, fval={<js::HandleBase<JS::Value>> = {<js::ValueOperations<JS::Handle<JS::Value> >> = {<No data fields>}, <No data fields>}, ptr = 0x7fff5fbfbae8}, args=@0x7fff5fbfbaa8, rval={<js::MutableHandleBase<JS::Value>> = {<js::MutableValueOperations<JS::MutableHandle<JS::Value> >> = {<js::ValueOperations<JS::MutableHandle<JS::Value> >> = {<No data fields>}, <No data fields>}, <No data fields>}, ptr = 0x7fff5fbfbbc8}) at jsapi.cpp:5196
#43 0x0000000102ad64c7 in mozilla::dom::EventHandlerNonNull::Call (this=0x11b75eb50, cx=0x119879a40, aThisVal={<js::HandleBase<JS::Value>> = {<js::ValueOperations<JS::Handle<JS::Value> >> = {<No data fields>}, <No data fields>}, ptr = 0x7fff5fbfbc88}, event=@0x1003ffd00, aRv=@0x7fff5fbfbf78) at EventHandlerBinding.cpp:36
#44 0x00000001036c2eb8 in mozilla::dom::EventHandlerNonNull::Call<nsISupports*> (this=0x11b75eb50, thisObjPtr=@0x11b75eb08, event=@0x1003ffd00, aRv=@0x7fff5fbfbf78, aExceptionHandling=mozilla::dom::CallbackObject::eReportExceptions) at EventHandlerBinding.h:62
#45 0x00000001036b5073 in mozilla::JSEventHandler::HandleEvent (this=0x11b75eaf0, aEvent=0x1003ffd00) at JSEventHandler.cpp:205
#46 0x0000000103692711 in mozilla::EventListenerManager::HandleEventSubType (this=0x115c761a0, aListener=0x0, aDOMEvent=0x1003ffd00, aCurrentTarget=0x114d6e5c0) at EventListenerManager.cpp:950
#47 0x0000000103692a36 in mozilla::EventListenerManager::HandleEventInternal (this=0x115c761a0, aPresContext=0x1240f0800, aEvent=0x1003ffee0, aDOMEvent=0x7fff5fbfc648, aCurrentTarget=0x114d6e5c0, aEventStatus=0x7fff5fbfc650) at EventListenerManager.cpp:1011
#48 0x00000001036ab739 in mozilla::EventListenerManager::HandleEvent (this=0x115c761a0, aPresContext=0x1240f0800, aEvent=0x1003ffee0, aDOMEvent=0x7fff5fbfc648, aCurrentTarget=0x114d6e5c0, aEventStatus=0x7fff5fbfc650) at EventListenerManager.h:327
#49 0x000000010369933f in mozilla::EventTargetChainItem::HandleEvent (this=0x115a2f008, aVisitor=@0x7fff5fbfc638, aCd=@0x7fff5fbfc708) at EventDispatcher.cpp:196
#50 0x000000010368c959 in mozilla::EventTargetChainItem::HandleEventTargetChain (aChain=@0x7fff5fbfc700, aVisitor=@0x7fff5fbfc638, aCallback=0x0, aCd=@0x7fff5fbfc708) at EventDispatcher.cpp:287
#51 0x000000010368e15f in mozilla::EventDispatcher::Dispatch (aTarget=0x114d6e5c0, aPresContext=0x1240f0800, aEvent=0x1003ffee0, aDOMEvent=0x1003ffd00, aEventStatus=0x7fff5fbfc8cc, aCallback=0x0, aTargets=0x0) at EventDispatcher.cpp:597
#52 0x0000000103672fc8 in mozilla::EventDispatcher::DispatchDOMEvent (aTarget=0x114d6e5c0, aEvent=0x0, aDOMEvent=0x1003ffd00, aPresContext=0x1240f0800, aEventStatus=0x7fff5fbfc8cc) at EventDispatcher.cpp:661
#53 0x0000000103c29cc2 in nsINode::DispatchEvent (this=0x114d6e5c0, aEvent=0x1003ffd00, aRetVal=0x7fff5fbfc98b) at nsINode.cpp:1236
#54 0x0000000103b122a5 in nsContentUtils::DispatchEvent (aDoc=0x1240ca000, aTarget=0x114d6e5c0, aEventName=@0x7fff5fbfcae8, aCanBubble=false, aCancelable=false, aTrusted=true, aDefaultAction=0x0) at /Users/ehsan/moz/src/content/base/src/nsContentUtils.cpp:3391
#55 0x0000000103b12034 in nsContentUtils::DispatchTrustedEvent (aDoc=0x1240ca000, aTarget=0x114d6e5c0, aEventName=@0x7fff5fbfcae8, aCanBubble=false, aCancelable=false, aDefaultAction=0x0) at /Users/ehsan/moz/src/content/base/src/nsContentUtils.cpp:3361
#56 0x000000010432d281 in mozilla::css::SheetLoadData::FireLoadEvent (this=0x129d10ed0, aThread=0x1003289c0) at Loader.cpp:476
#57 0x000000010432d387 in mozilla::css::SheetLoadData::AfterProcessNextEvent (this=0x129d10ed0, aThread=0x1003289c0, aRecursionDepth=0, aEventWasProcessed=true) at Loader.cpp:457
#58 0x000000010432d3e4 in non-virtual thunk to mozilla::css::SheetLoadData::AfterProcessNextEvent(nsIThreadInternal*, unsigned int, bool) (this=0x129d10ee0, aThread=0x1003289c0, aRecursionDepth=0, aEventWasProcessed=true) at Unified_cpp_layout_style0.cpp:458
#59 0x00000001016acb7a in nsThread::ProcessNextEvent (this=0x1003289c0, mayWait=false, result=0x7fff5fbfcd53) at nsThread.cpp:725
#60 0x000000010159997b in NS_ProcessPendingEvents (thread=0x1003289c0, timeout=20) at nsThreadUtils.cpp:210
#61 0x0000000103289a99 in nsBaseAppShell::NativeEventCallback (this=0x110d2ede0) at nsBaseAppShell.cpp:98
#62 0x0000000103214f9c in nsAppShell::ProcessGeckoEvents (aInfo=0x110d2ede0) at nsAppShell.mm:388
#63 0x00007fff92c9b661 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()
#64 0x00007fff92c8cd12 in __CFRunLoopDoSources0 ()
#65 0x00007fff92c8c49f in __CFRunLoopRun ()
#66 0x00007fff92c8bf25 in CFRunLoopRunSpecific ()
#67 0x00007fff9444da0d in RunCurrentEventLoopInMode ()
#68 0x00007fff9444d685 in ReceiveNextEventCommon ()
#69 0x00007fff9444d5bc in _BlockUntilNextEventMatchingListInModeWithFilter ()
#70 0x00007fff8e2553de in _DPSNextEvent ()
#71 0x00007fff8e254a2b in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#72 0x0000000103213f07 in -[GeckoNSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (self=0x100322980, _cmd=0x7fff8ec885c3, mask=18446744073709551615, expiration=0x422d63c37f00000d, mode=0x7fff796b5d00, flag=1 '\001') at nsAppShell.mm:165
#73 0x00007fff8e248b2c in -[NSApplication run] ()
#74 0x0000000103215a82 in nsAppShell::Run (this=0x110d2ede0) at nsAppShell.mm:746
#75 0x0000000104f4733c in nsAppStartup::Run (this=0x1125c49c0) at nsAppStartup.cpp:278
#76 0x0000000104e00d9c in XREMain::XRE_mainRun (this=0x7fff5fbfee30) at /Users/ehsan/moz/src/toolkit/xre/nsAppRunner.cpp:4019
#77 0x0000000104e015fa in XREMain::XRE_main (this=0x7fff5fbfee30, argc=5, argv=0x7fff5fbff730, aAppData=0x7fff5fbff0c8) at /Users/ehsan/moz/src/toolkit/xre/nsAppRunner.cpp:4088
#78 0x0000000104e01a8d in XRE_main (argc=5, argv=0x7fff5fbff730, aAppData=0x7fff5fbff0c8, aFlags=0) at /Users/ehsan/moz/src/toolkit/xre/nsAppRunner.cpp:4300
#79 0x00000001000020c7 in do_main (argc=5, argv=0x7fff5fbff730, xreDirectory=0x100327340) at /Users/ehsan/moz/src/browser/app/nsBrowserApp.cpp:282
#80 0x0000000100001601 in main (argc=5, argv=0x7fff5fbff730) at /Users/ehsan/moz/src/browser/app/nsBrowserApp.cpp:643

Seems like this loop never terminates: <http://mxr.mozilla.org/mozilla-central/source/toolkit/components/prompts/src/nsPrompter.js#422>
This is probably a dup of one of those OSX specific main loop issues.
As best I can tell my patch for bug 996848 fixes this.

There was a tryserver build but it's now disappeared.  I'll update the patch to current trunk and do another tryserver build.

I hope to get that patch reviewed and landed soon -- possibly next week.
Depends on: 996848
This stack trace is similar to bug 1252058, which is why I find myself here - however, I can't reproduce this bug, so I'm assuming it was indeed fixed by bug 996848.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: