Closed Bug 356308 Opened 19 years ago Closed 16 years ago

<body onunload="javascript:alert();"> pops up browser window again, and crashes upon closing the browser

Categories

(Firefox :: General, defect)

2.0 Branch
PowerPC
macOS
defect
Not set
critical

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: copaseticg, Unassigned)

Details

(Keywords: crash, testcase, Whiteboard: closeme 2009-07-14)

Attachments

(4 files)

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; de; rv:1.8.1) Gecko/20061003 Firefox/2.0 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; de; rv:1.8.1) Gecko/20061003 Firefox/2.0 As there is no way to ensure that Firefox leaves a JavaScript/Flash module enough time when the user closes the browser window using the mouse, I am popping up an alert window upon "unload", so that my scripts can do final processing until the user has closed the alert window. However, on the Macintosh, Firefox sometimes does not pop up this alert box at all, until the last browser window is being closed. Also, as soon as the alert box is closed by the user, the browser window that was actually closed before (causing the unload event) pops up AGAIN (albeit completely empty in its client area). Finally, Firefox 2 even crashes after this happens; at least Firefox 1.x doesn't crash at this point. Reproducible: Always Steps to Reproduce: Simply use the following BODY tag in your HTML file, and open it with Firefox on Mac OS X: <BODY onunload="javascript:alert('hello');"> Expected Results: It would be nice for Firefox to pop up the alert window right away, and leave the window that caused the "unload" event closed. This is what happens under Windows.
I was unable to reproduce on the PPC version of RC2. Is this an intel issue? Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1) Gecko/20061003 Firefox/2.0 I am also attaching a test case
Keywords: crash, qawanted, testcase
Version: unspecified → 2.0 Branch
Can you get a Talkback ID for an Apple crash log for the crash? http://kb.mozillazine.org/Talkback
Hi! Here's a crash log for the problem - maybe this helps? Date/Time: 2006-10-19 16:36:58.340 +0200 OS Version: 10.4.8 (Build 8L2127) Report Version: 4 Command: firefox-bin Path: /Applications/Firefox.app/Contents/MacOS/firefox-bin Parent: WindowServer [68] Version: 2.0 (2.0) PID: 271 Thread: 0 Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000004 Thread 0 Crashed: 0 com.apple.HIToolbox 0x92de17e6 TestWindowGroupAttributes + 26 1 com.apple.HIToolbox 0x92e0d852 HiliteAndActivateWindow + 456 2 com.apple.HIToolbox 0x92ea2cd7 PostWindowActivateEvent + 61 3 com.apple.HIToolbox 0x92eb9b9f ActivateWindow + 51 4 org.mozilla.firefox 0x005702a5 nsMacEventHandler::HandleActivateEvent(OpaqueEventRef*) + 107 5 org.mozilla.firefox 0x00244d15 nsMacWindow::WindowEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 433 6 com.apple.HIToolbox 0x92dc686b DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1093 7 com.apple.HIToolbox 0x92dc5f10 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 304 8 com.apple.HIToolbox 0x92dc5dd5 SendEventToEventTargetWithOptions + 55 9 com.apple.HIToolbox 0x92e0e660 PostActivateEvent + 344 10 com.apple.HIToolbox 0x92e0d823 HiliteAndActivateWindow + 409 11 com.apple.HIToolbox 0x92e0d5eb AdjustToNewWindowActivation(WindowData*, WindowContext*, OpaqueWindowPtr*, WindowData*) + 217 12 com.apple.HIToolbox 0x92de2362 WindowData::Destruct() + 566 13 com.apple.CoreFoundation 0x9080a1a9 _CFRelease + 188 14 org.mozilla.firefox 0x00244e83 nsMacWindow::~nsMacWindow [in-charge deleting]() + 231 15 org.mozilla.firefox 0x0056dd1c nsBaseWidget::Release() + 44 16 libxpcom_core.dylib 0x0180a0cc nsCOMPtr_base::~nsCOMPtr_base [not-in-charge]() + 20 17 org.mozilla.firefox 0x0056b588 nsMacMessagePump::DispatchOSEventToRaptor(EventRecord&, OpaqueWindowPtr*) + 86 18 org.mozilla.firefox 0x0056b737 nsMacMessagePump::DoMouseDown(EventRecord&) + 231 19 org.mozilla.firefox 0x0056bc30 nsMacMessagePump::WNETransitionEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 40 20 com.apple.HIToolbox 0x92dc686b DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1093 21 com.apple.HIToolbox 0x92dc5f10 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 304 22 com.apple.HIToolbox 0x92dcd1f0 SendEventToEventTarget + 56 23 com.apple.HIToolbox 0x92dcdc0d ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 2587 24 com.apple.HIToolbox 0x92dc6c22 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 2044 25 com.apple.HIToolbox 0x92dc5f10 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 304 26 com.apple.HIToolbox 0x92dcd1f0 SendEventToEventTarget + 56 27 com.apple.HIToolbox 0x92e110c7 ToolboxEventDispatcher + 81 28 com.apple.HIToolbox 0x92e0fadf RunApplicationEventLoop + 165 29 org.mozilla.firefox 0x0023feb3 nsAppShell::Run() + 39 30 org.mozilla.firefox 0x002d7f8a nsAppStartup::Run() + 50 31 org.mozilla.firefox 0x000064f9 XRE_main + 5539 32 org.mozilla.firefox 0x00003258 main + 32 33 org.mozilla.firefox 0x000031de start + 270 34 org.mozilla.firefox 0x000030f9 start + 41 Thread 1: 0 libSystem.B.dylib 0x90019d3c select + 12 1 libnspr4.dylib 0x00fc1878 PR_Poll + 134 2 org.mozilla.firefox 0x0035692b nsSocketTransportService::Poll(unsigned*) + 99 3 org.mozilla.firefox 0x00356f7c nsSocketTransportService::Run() + 480 4 libxpcom_core.dylib 0x01849f21 nsThread::Main(void*) + 41 5 libnspr4.dylib 0x00fc2eb9 PR_Select + 813 6 libSystem.B.dylib 0x90023d87 _pthread_body + 84 Thread 2: 0 libSystem.B.dylib 0x90048a47 semaphore_timedwait_signal_trap + 7 1 libnspr4.dylib 0x00fbe550 PR_Lock + 246 2 libnspr4.dylib 0x00fbe8a7 PR_WaitCondVar + 75 3 libxpcom_core.dylib 0x0184c238 TimerThread::Run() + 74 4 libxpcom_core.dylib 0x01849f21 nsThread::Main(void*) + 41 5 libnspr4.dylib 0x00fc2eb9 PR_Select + 813 6 libSystem.B.dylib 0x90023d87 _pthread_body + 84 Thread 3: 0 libSystem.B.dylib 0x90048a47 semaphore_timedwait_signal_trap + 7 1 libnspr4.dylib 0x00fbe550 PR_Lock + 246 2 libnspr4.dylib 0x00fbe8a7 PR_WaitCondVar + 75 3 org.mozilla.firefox 0x0036b300 nsSSLThread::Run() + 166 4 libnspr4.dylib 0x00fc2eb9 PR_Select + 813 5 libSystem.B.dylib 0x90023d87 _pthread_body + 84 Thread 4: 0 libSystem.B.dylib 0x90048a47 semaphore_timedwait_signal_trap + 7 1 libnspr4.dylib 0x00fbe550 PR_Lock + 246 2 libnspr4.dylib 0x00fbe8a7 PR_WaitCondVar + 75 3 org.mozilla.firefox 0x00367f6c nsCertVerificationThread::Run() + 278 4 libnspr4.dylib 0x00fc2eb9 PR_Select + 813 5 libSystem.B.dylib 0x90023d87 _pthread_body + 84 Thread 5: 0 libSystem.B.dylib 0x90024427 semaphore_wait_signal_trap + 7 1 libnspr4.dylib 0x00fbe931 PR_WaitCondVar + 213 2 org.mozilla.firefox 0x00545298 mozStorageService::FinishAsyncIO() + 784 3 org.mozilla.firefox 0x00894546 AsyncWriteThread::Run() + 14 4 libxpcom_core.dylib 0x01849f21 nsThread::Main(void*) + 41 5 libnspr4.dylib 0x00fc2eb9 PR_Select + 813 6 libSystem.B.dylib 0x90023d87 _pthread_body + 84 Thread 6: 0 libSystem.B.dylib 0x90024427 semaphore_wait_signal_trap + 7 1 libnspr4.dylib 0x00fbe931 PR_WaitCondVar + 213 2 libnspr4.dylib 0x00fbeb91 PR_Wait + 53 3 libxpcom_core.dylib 0x018476a2 PL_WaitForEvent + 62 4 libxpcom_core.dylib 0x018488e7 nsEventQueueImpl::WaitForEvent(PLEvent**) + 47 5 org.mozilla.firefox 0x002ff537 nsUrlClassifierCallbackWrapper::QueryInterface(nsID const&, void**) + 301 6 libnspr4.dylib 0x00fc2eb9 PR_Select + 813 7 libSystem.B.dylib 0x90023d87 _pthread_body + 84 Thread 7: 0 libSystem.B.dylib 0x90009857 mach_msg_trap + 7 1 com.apple.CoreFoundation 0x908292f3 CFRunLoopRunSpecific + 2014 2 com.apple.CoreFoundation 0x90828b0e CFRunLoopRunInMode + 61 3 com.apple.audio.CoreAudio 0x9145c41e HALRunLoop::OwnThread(void*) + 158 4 com.apple.audio.CoreAudio 0x9145c239 CAPThread::Entry(CAPThread*) + 93 5 libSystem.B.dylib 0x90023d87 _pthread_body + 84 Thread 8: 0 libSystem.B.dylib 0x90048a47 semaphore_timedwait_signal_trap + 7 1 libnspr4.dylib 0x00fbe550 PR_Lock + 246 2 libnspr4.dylib 0x00fbe8a7 PR_WaitCondVar + 75 3 org.mozilla.firefox 0x0031af09 nsIOThreadPool::ThreadFunc(void*) + 145 4 libnspr4.dylib 0x00fc2eb9 PR_Select + 813 5 libSystem.B.dylib 0x90023d87 _pthread_body + 84 Thread 0 crashed with X86 Thread State (32-bit): eax: 0x00000000 ebx: 0x01bd88f0 ecx: 0x00000000 edx: 0x01bdaad0 edi: 0x00000008 esi: 0x00000000 ebp: 0xbfffeb98 esp: 0xbfffeb90 ss: 0x0000001f efl: 0x00010246 eip: 0x92de17e6 cs: 0x00000017 ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 Binary Images Description: 0x1000 - 0x9aefff org.mozilla.firefox 2.0 /Applications/Firefox.app/Contents/MacOS/firefox-bin 0xee2000 - 0xf73fff libmozjs.dylib /Applications/Firefox.app/Contents/MacOS/libmozjs.dylib 0xf8e000 - 0xf8efff libxpcom.dylib /Applications/Firefox.app/Contents/MacOS/libxpcom.dylib 0xf92000 - 0xf97fff libplds4.dylib /Applications/Firefox.app/Contents/MacOS/libplds4.dylib 0xf9c000 - 0xfa2fff libplc4.dylib /Applications/Firefox.app/Contents/MacOS/libplc4.dylib 0xfa8000 - 0xfcdfff libnspr4.dylib /Applications/Firefox.app/Contents/MacOS/libnspr4.dylib 0xfde000 - 0xfedfff libxpcom_compat.dylib /Applications/Firefox.app/Contents/MacOS/libxpcom_compat.dylib 0x1808000 - 0x1878fff libxpcom_core.dylib /Applications/Firefox.app/Contents/MacOS/libxpcom_core.dylib 0x18da000 - 0x18f3fff libsmime3.dylib /Applications/Firefox.app/Contents/MacOS/libsmime3.dylib 0x1a05000 - 0x1a25fff libssl3.dylib /Applications/Firefox.app/Contents/MacOS/libssl3.dylib 0x1a2f000 - 0x1a84fff libnss3.dylib /Applications/Firefox.app/Contents/MacOS/libnss3.dylib 0x1aa0000 - 0x1ae5fff libsoftokn3.dylib /Applications/Firefox.app/Contents/MacOS/libsoftokn3.dylib 0x1c8d000 - 0x1c95fff libmyspell.dylib /Applications/Firefox.app/Contents/MacOS/components/libmyspell.dylib 0x1e7e000 - 0x1eeffff com.DivXInc.DivXDecoder 6.2.5 /Library/QuickTime/DivX Decoder.component/Contents/MacOS/DivX Decoder 0x12808000 - 0x129c9fff com.elgato.mpegsupport EyeTV MPEG Support 1.0.4 (build 35) (1.0.4) /Library/QuickTime/EyeTV MPEG Support.component/Contents/MacOS/EyeTV MPEG Support 0x1608b000 - 0x1608cfff com.apple.textencoding.unicode 2.1 /System/Library/TextEncodings/Unicode Encodings.bundle/Contents/MacOS/Unicode Encodings 0x160d5000 - 0x160dffff libspellchecker.dylib /Applications/Firefox.app/Contents/MacOS/components/libspellchecker.dylib 0x16684000 - 0x166b2fff libnssckbi.dylib /Applications/Firefox.app/Contents/MacOS/libnssckbi.dylib 0x17305000 - 0x17361fff libfreebl3.dylib /Applications/Firefox.app/Contents/MacOS/libfreebl3.dylib 0x18205000 - 0x1871bfff com.macromedia.Flash Player.plugin 9.0.0 (1.0.4f18) /Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player 0x19030000 - 0x19059fff com.apple.audio.SoundManager.Components 3.9.2 /System/Library/Components/SoundManagerComponents.component/Contents/MacOS/SoundManagerComponents 0x1905e000 - 0x19063fff com.apple.audio.AppleHDAHALPlugIn 1.2.4 (1.2.4a21) /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn 0x190fd000 - 0x19139fff com.apple.QuickTimeFireWireDV.component 7.1.3 /System/Library/QuickTime/QuickTimeFireWireDV.component/Contents/MacOS/QuickTimeFireWireDV 0x8fe00000 - 0x8fe49fff dyld 46.9 /usr/lib/dyld 0x90000000 - 0x9016ffff libSystem.B.dylib /usr/lib/libSystem.B.dylib 0x901bf000 - 0x901c1fff libmathCommon.A.dylib /usr/lib/system/libmathCommon.A.dylib 0x901c3000 - 0x90200fff com.apple.CoreText 1.1.1 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText 0x90227000 - 0x902fcfff ATS /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS 0x9031c000 - 0x90770fff com.apple.CoreGraphics 1.258.38 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics 0x90807000 - 0x908cffff com.apple.CoreFoundation 6.4.6 (368.27) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x9090d000 - 0x9090dfff com.apple.CoreServices 10.4 (???) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x9090f000 - 0x90a02fff libicucore.A.dylib /usr/lib/libicucore.A.dylib 0x90a52000 - 0x90ad1fff libobjc.A.dylib /usr/lib/libobjc.A.dylib 0x90afa000 - 0x90b5efff libstdc++.6.dylib /usr/lib/libstdc++.6.dylib 0x90bcd000 - 0x90bd4fff libgcc_s.1.dylib /usr/lib/libgcc_s.1.dylib 0x90bd9000 - 0x90c4cfff com.apple.framework.IOKit 1.4.6 (???) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x90c61000 - 0x90c73fff libauto.dylib /usr/lib/libauto.dylib 0x90c79000 - 0x90f1ffff com.apple.CoreServices.CarbonCore 682.15 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore 0x90f62000 - 0x90fcafff com.apple.CoreServices.OSServices 4.1 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices 0x91002000 - 0x91040fff com.apple.CFNetwork 129.18 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork 0x91053000 - 0x91063fff com.apple.WebServices 1.1.3 (1.1.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/WebServicesCore.framework/Versions/A/WebServicesCore 0x9106e000 - 0x910ecfff com.apple.SearchKit 1.0.5 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit 0x91121000 - 0x9113ffff com.apple.Metadata 10.4.4 (121.36) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata 0x9114b000 - 0x91159fff libz.1.dylib /usr/lib/libz.1.dylib 0x9115c000 - 0x912fbfff com.apple.security 4.5.1 (29002) /System/Library/Frameworks/Security.framework/Versions/A/Security 0x913f9000 - 0x91401fff com.apple.DiskArbitration 2.1.1 /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration 0x91408000 - 0x9142efff com.apple.SystemConfiguration 1.8.6 /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration 0x91440000 - 0x91447fff libbsm.dylib /usr/lib/libbsm.dylib 0x9144b000 - 0x914c1fff com.apple.audio.CoreAudio 3.0.4 /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x91512000 - 0x91512fff com.apple.ApplicationServices 10.4 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices 0x91514000 - 0x9153ffff com.apple.AE 314 (313) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE 0x91552000 - 0x91626fff com.apple.ColorSync 4.4.8 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync 0x91661000 - 0x916d4fff com.apple.print.framework.PrintCore 4.6 (177.13) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore 0x91702000 - 0x917abfff com.apple.QD 3.10.21 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD 0x917d1000 - 0x9181cfff com.apple.HIServices 1.5.2 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices 0x9183b000 - 0x91851fff com.apple.LangAnalysis 1.6.3 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis 0x9185d000 - 0x91877fff com.apple.FindByContent 1.5 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/FindByContent.framework/Versions/A/FindByContent 0x91881000 - 0x918befff com.apple.LaunchServices 181 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices 0x918d2000 - 0x918defff com.apple.speech.synthesis.framework 3.5 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x918e5000 - 0x91920fff com.apple.ImageIO.framework 1.5.0 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO 0x91932000 - 0x919e4fff libcrypto.0.9.7.dylib /usr/lib/libcrypto.0.9.7.dylib 0x91a2a000 - 0x91a40fff libcups.2.dylib /usr/lib/libcups.2.dylib 0x91a45000 - 0x91a63fff libJPEG.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x91a68000 - 0x91ac6fff libJP2.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib 0x91ad8000 - 0x91adcfff libGIF.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x91ade000 - 0x91b5bfff libRaw.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRaw.dylib 0x91b5f000 - 0x91b9cfff libTIFF.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x91ba2000 - 0x91bbcfff libPng.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x91bc1000 - 0x91bc3fff libRadiance.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x91bc5000 - 0x91bc5fff com.apple.Accelerate 1.3.1 (Accelerate 1.3.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x91bc7000 - 0x91c55fff com.apple.vImage 2.5 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage 0x91c5c000 - 0x91c5cfff com.apple.Accelerate.vecLib 3.3.1 (vecLib 3.3.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib 0x91c5e000 - 0x91cb7fff libvMisc.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib 0x91cc0000 - 0x91ce4fff libvDSP.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib 0x91cec000 - 0x920f5fff libBLAS.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 0x9212f000 - 0x924e3fff libLAPACK.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib 0x92510000 - 0x9258dfff com.apple.DesktopServices 1.3.4 /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv 0x925ce000 - 0x927fefff com.apple.Foundation 6.4.7 (567.28) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x9290a000 - 0x929e8fff libxml2.2.dylib /usr/lib/libxml2.2.dylib 0x92a05000 - 0x92af2fff libiconv.2.dylib /usr/lib/libiconv.2.dylib 0x92b02000 - 0x92b19fff libGL.dylib /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x92b24000 - 0x92b7cfff libGLU.dylib /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib 0x92b90000 - 0x92b90fff com.apple.Carbon 10.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x92b92000 - 0x92ba2fff com.apple.ImageCapture 3.0.4 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture 0x92bb1000 - 0x92bb9fff com.apple.speech.recognition.framework 3.6 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition 0x92bbf000 - 0x92bc4fff com.apple.securityhi 2.0.1 (24742) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI 0x92bca000 - 0x92c5bfff com.apple.ink.framework 101.2.1 (71) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink 0x92c6f000 - 0x92c72fff com.apple.help 1.0.3 (32.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help 0x92c75000 - 0x92c93fff com.apple.openscripting 1.2.5 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting 0x92ca5000 - 0x92cabfff com.apple.print.framework.Print 5.1 (192.3) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print 0x92cb1000 - 0x92d14fff com.apple.htmlrendering 66.1 (1.1.3) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering 0x92d38000 - 0x92d79fff com.apple.NavigationServices 3.4.4 (3.4.3) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationServices.framework/Versions/A/NavigationServices 0x92da0000 - 0x92dadfff com.apple.audio.SoundManager 3.9.1 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound 0x92db4000 - 0x92db9fff com.apple.CommonPanels 1.2.3 (73) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels 0x92dbe000 - 0x930b2fff com.apple.HIToolbox 1.4.8 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox 0x931b8000 - 0x931c3fff com.apple.opengl 1.4.12 /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x93233000 - 0x93233fff com.apple.Cocoa 6.4 (???) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x93235000 - 0x938ebfff com.apple.AppKit 6.4.8 (824.42) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x93c6c000 - 0x93ce6fff com.apple.CoreData 90 /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x93d1f000 - 0x93dd7fff com.apple.audio.toolbox.AudioToolbox 1.4.3 /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x93e19000 - 0x93e19fff com.apple.audio.units.AudioUnit 1.4.2 /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x93e1b000 - 0x93fedfff com.apple.QuartzCore 1.4.9 /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x9403e000 - 0x9407ffff libsqlite3.0.dylib /usr/lib/libsqlite3.0.dylib 0x94087000 - 0x940c1fff libGLImage.dylib /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib 0x9424a000 - 0x94259fff libCGATS.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib 0x94260000 - 0x9426bfff libCSync.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x942b7000 - 0x942d1fff libRIP.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x942d7000 - 0x94590fff com.apple.QuickTime 7.1.3 /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime 0x95a2e000 - 0x95a44fff libJapaneseConverter.dylib /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib 0x9643c000 - 0x9643cfff com.apple.vecLib 3.3.1 (vecLib 3.3.1) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x96a9e000 - 0x96aa3fff com.apple.agl 2.5.9 (AGL-2.5.9) /System/Library/Frameworks/AGL.framework/Versions/A/AGL 0x97d84000 - 0x9886efff com.apple.QuickTimeComponents.component 7.1.3 /System/Library/QuickTime/QuickTimeComponents.component/Contents/MacOS/QuickTimeComponents
I took a fairly recently built FF3 (browser_20080302_140635) and created a html file: <html><head><title>closing?</title></head> <body onunload="javascript:alert('hello');"> hello? </body></html> and loaded it into the browser. It does not crash but something weird does occur. First, I clicked on the close button of the window and the window appears to close and then very quickly re-appear and then the "new" window has the alert. I clicked the OK button and the window wnet away. Then I clicked on the File menu and got nothing. The background of the File menu flips to a "selected" appearance but no menu pops up. Actually, none of the menus are responsive. Then I click on the Dock item and a window appears and everything seems to be working again. Well, actually, when I click on the "MinefieldDebug" menu, everything is not find. The browser crashes. Here is the mozconfig I built with: ac_add_options --enable-application=browser ac_add_options --enable-debug ac_add_options --enable-test ac_add_options --enable-mochitest ac_add_options --enable-libIDLtest I will attach the stdout from running the app and the crash log. FYI, it looks as though my crash is very different from the one above.
Attached file from the console
Attached file the crash log
using minefield with clean profile - tried redoing the test.html Got a crash ! Add-ons: {8620c15f-30dc-4dba-a131-7c5d20cf4a29}:1.3,{972ce4c6-7e08-4474-a285-3208198ce6fd}:2.0 BuildID: 2008031404 Comments: bug 356308 crash reporter came up on - saving tabs & quiting Minefield! CrashTime: 1206471763 Email: InstallTime: 1205536019 ProductName: Firefox SecondsSinceLastCrash: 597477 StartupTime: 1206471148 Theme: classic/1.0 URL: file:///Users/bobuliss/Desktop/test.html UserID: 15297963-35fc-4343-8854-a7b00ae259e8 Vendor: Mozilla Version: 3.0b5pre This report also contains technical information about the state of the application when it crashed. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Style-Type" content="text/css"> <title></title> <meta name="Generator" content="Cocoa HTML Writer"> <meta name="CocoaVersion" content="949.27"> <style type="text/css"> p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Courier} </style> </head> <body> <p class="p1">&lt;html&gt;&lt;head&gt;&lt;title&gt;closing?&lt;/title&gt;&lt;/head&gt;</p> <p class="p1">&lt;body onunload="javascript:alert('hello');"&gt;</p> <p class="p1">hello?</p> <p class="p1">&lt;/body&gt;&lt;/html&gt;</p> </body> </html>
Bob, do you still have the crash id? It would be really helpful. Can you still reproduce the crash with the given content?
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1 Tried to reproduce crash with clean install and profile - WorksForMe - but error console has 3 errors: I expanded the errors and cut and pasted them here - all are repeatable: //@line 37 "/builds/tinderbox/Fx-Mozilla1.9-Release/Darwin_8.8.4_Depend/mozilla/browser/components/nsBrowserContentHandler.js" const nsISupports = Components.interfaces.nsISupports; const nsIBrowserDOMWindow = Components.interfaces.nsIBrowserDOMWindow; const nsIBrowserHandler = Components.interfaces.nsIBrowserHandler; const nsIBrowserHistory = Components.interfaces.nsIBrowserHistory; const nsIChannel = Components.interfaces.nsIChannel; const nsICommandLine = Components.interfaces.nsICommandLine; const nsICommandLineHandler = Components.interfaces.nsICommandLineHandler; const nsIContentHandler = Components.interfaces.nsIContentHandler; const nsIDocShellTreeItem = Components.interfaces.nsIDocShellTreeItem; const nsIDOMChromeWindow = Components.interfaces.nsIDOMChromeWindow; const nsIDOMWindow = Components.interfaces.nsIDOMWindow; const nsIFactory = Components.interfaces.nsIFactory; const nsIFileURL = Components.interfaces.nsIFileURL; const nsIHttpProtocolHandler = Components.interfaces.nsIHttpProtocolHandler; const nsIInterfaceRequestor = Components.interfaces.nsIInterfaceRequestor; const nsINetUtil = Components.interfaces.nsINetUtil; const nsIPrefBranch = Components.interfaces.nsIPrefBranch; const nsIPrefLocalizedString = Components.interfaces.nsIPrefLocalizedString; const nsISupportsString = Components.interfaces.nsISupportsString; const nsIURIFixup = Components.interfaces.nsIURIFixup; const nsIWebNavigation = Components.interfaces.nsIWebNavigation; const nsIWindowMediator = Components.interfaces.nsIWindowMediator; const nsIWindowWatcher = Components.interfaces.nsIWindowWatcher; const nsICategoryManager = Components.interfaces.nsICategoryManager; const nsIWebNavigationInfo = Components.interfaces.nsIWebNavigationInfo; const nsIBrowserSearchService = Components.interfaces.nsIBrowserSearchService; const nsICommandLineValidator = Components.interfaces.nsICommandLineValidator; const NS_BINDING_ABORTED = 0x804b0002; const NS_ERROR_WONT_HANDLE_CONTENT = 0x805d0001; const NS_ERROR_ABORT = Components.results.NS_ERROR_ABORT; const URI_INHERITS_SECURITY_CONTEXT = nsIHttpProtocolHandler .URI_INHERITS_SECURITY_CONTEXT; function shouldLoadURI(aURI) { if (aURI && !aURI.schemeIs("chrome")) return true; dump("*** Preventing external load of chrome: URI into browser window\n"); dump(" Use -chrome <uri> instead\n"); return false; } function resolveURIInternal(aCmdLine, aArgument) { var uri = aCmdLine.resolveURI(aArgument); if (!(uri instanceof nsIFileURL)) { return uri; } try { if (uri.file.exists()) return uri; } catch (e) { Components.utils.reportError(e); } // We have interpreted the argument as a relative file URI, but the file // doesn't exist. Try URI fixup heuristics: see bug 290782. try { var urifixup = Components.classes["@mozilla.org/docshell/urifixup;1"] .getService(nsIURIFixup); uri = urifixup.createFixupURI(aArgument, 0); } catch (e) { Components.utils.reportError(e); } return uri; } const OVERRIDE_NONE = 0; const OVERRIDE_NEW_PROFILE = 1; const OVERRIDE_NEW_MSTONE = 2; /** * Determines whether a home page override is needed. * Returns: * OVERRIDE_NEW_PROFILE if this is the first run with a new profile. * OVERRIDE_NEW_MSTONE if this is the first run with a build with a different * Gecko milestone (i.e. right after an upgrade). * OVERRIDE_NONE otherwise. */ function needHomepageOverride(prefb) { var savedmstone = null; try { savedmstone = prefb.getCharPref("browser.startup.homepage_override.mstone"); } catch (e) {} if (savedmstone == "ignore") return OVERRIDE_NONE; var mstone = Components.classes["@mozilla.org/network/protocol;1?name=http"] .getService(nsIHttpProtocolHandler).misc; if (mstone != savedmstone) { prefb.setCharPref("browser.startup.homepage_override.mstone", mstone); return (savedmstone ? OVERRIDE_NEW_MSTONE : OVERRIDE_NEW_PROFILE); } return OVERRIDE_NONE; } // Copies a pref override file into the user's profile pref-override folder, // and then tells the pref service to reload it's default prefs. function copyPrefOverride() { try { var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties); const NS_APP_EXISTING_PREF_OVERRIDE = "ExistingPrefOverride"; var prefOverride = fileLocator.get(NS_APP_EXISTING_PREF_OVERRIDE, Components.interfaces.nsIFile); if (!prefOverride.exists()) return; // nothing to do const NS_APP_PREFS_OVERRIDE_DIR = "PrefDOverride"; var prefOverridesDir = fileLocator.get(NS_APP_PREFS_OVERRIDE_DIR, Components.interfaces.nsIFile); // Check for any existing pref overrides, and remove them if present var existingPrefOverridesFile = prefOverridesDir.clone(); existingPrefOverridesFile.append(prefOverride.leafName); if (existingPrefOverridesFile.exists()) existingPrefOverridesFile.remove(false); prefOverride.copyTo(prefOverridesDir, null); // Now that we've installed the new-profile pref override file, // re-read the default prefs. var prefSvcObs = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIObserver); prefSvcObs.observe(null, "reload-default-prefs", null); } catch (ex) { Components.utils.reportError(ex); } } // Flag used to indicate that the arguments to openWindow can be passed directly. const NO_EXTERNAL_URIS = 1; function openWindow(parent, url, target, features, args, noExternalArgs) { var wwatch = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(nsIWindowWatcher); if (noExternalArgs == NO_EXTERNAL_URIS) { // Just pass in the defaultArgs directly var argstring; if (args) { argstring = Components.classes["@mozilla.org/supports-string;1"] .createInstance(nsISupportsString); argstring.data = args; } return wwatch.openWindow(parent, url, target, features, argstring); } // Pass an array to avoid the browser "|"-splitting behavior. var argArray = Components.classes["@mozilla.org/supports-array;1"] .createInstance(Components.interfaces.nsISupportsArray); // add args to the arguments array var stringArgs = null; if (args instanceof Array) // array stringArgs = args; else if (args) // string stringArgs = [args]; if (stringArgs) { // put the URIs into argArray var uriArray = Components.classes["@mozilla.org/supports-array;1"] .createInstance(Components.interfaces.nsISupportsArray); stringArgs.forEach(function (uri) { var sstring = Components.classes["@mozilla.org/supports-string;1"] .createInstance(nsISupportsString); sstring.data = uri; uriArray.AppendElement(sstring); }); argArray.AppendElement(uriArray); } else { argArray.AppendElement(null); } // Pass these as null to ensure that we always trigger the "single URL" // behavior in browser.js's BrowserStartup (which handles the window // arguments) argArray.AppendElement(null); // charset argArray.AppendElement(null); // referer argArray.AppendElement(null); // postData argArray.AppendElement(null); // allowThirdPartyFixup return wwatch.openWindow(parent, url, target, features, argArray); } function openPreferences() { var features = "chrome,titlebar,toolbar,centerscreen,dialog=no"; var url = "chrome://browser/content/preferences/preferences.xul"; var win = getMostRecentWindow("Browser:Preferences"); if (win) { win.focus(); } else { openWindow(null, url, "_blank", features); } } function getMostRecentWindow(aType) { var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(nsIWindowMediator); return wm.getMostRecentWindow(aType); } //@line 261 "/builds/tinderbox/Fx-Mozilla1.9-Release/Darwin_8.8.4_Depend/mozilla/browser/components/nsBrowserContentHandler.js" // this returns the most recent non-popup browser window function getMostRecentBrowserWindow() { var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); //@line 281 "/builds/tinderbox/Fx-Mozilla1.9-Release/Darwin_8.8.4_Depend/mozilla/browser/components/nsBrowserContentHandler.js" var windowList = wm.getZOrderDOMWindowEnumerator("navigator:browser", true); if (!windowList.hasMoreElements()) return null; var win = windowList.getNext(); while (win.document.documentElement.getAttribute("chromehidden")) { if (!windowList.hasMoreElements()) return null; win = windowList.getNext(); } //@line 293 "/builds/tinderbox/Fx-Mozilla1.9-Release/Darwin_8.8.4_Depend/mozilla/browser/components/nsBrowserContentHandler.js" return win; } function doSearch(searchTerm, cmdLine) { var ss = Components.classes["@mozilla.org/browser/search-service;1"] .getService(nsIBrowserSearchService); var submission = ss.defaultEngine.getSubmission(searchTerm, null); // fill our nsISupportsArray with uri-as-wstring, null, null, postData var sa = Components.classes["@mozilla.org/supports-array;1"] .createInstance(Components.interfaces.nsISupportsArray); var wuri = Components.classes["@mozilla.org/supports-string;1"] .createInstance(Components.interfaces.nsISupportsString); wuri.data = submission.uri.spec; sa.AppendElement(wuri); sa.AppendElement(null); sa.AppendElement(null); sa.AppendElement(submission.postData); // XXXbsmedberg: use handURIToExistingBrowser to obey tabbed-browsing // preferences, but need nsIBrowserDOMWindow extensions var wwatch = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(nsIWindowWatcher); return wwatch.openWindow(null, nsBrowserContentHandler.chromeURL, "_blank", "chrome,dialog=no,all" + nsBrowserContentHandler.getFeatures(cmdLine), sa); } var nsBrowserContentHandler = { /* helper functions */ mChromeURL : null, get chromeURL() { if (this.mChromeURL) { return this.mChromeURL; } var prefb = Components.classes["@mozilla.org/preferences-service;1"] .getService(nsIPrefBranch); this.mChromeURL = prefb.getCharPref("browser.chromeURL"); return this.mChromeURL; }, /* nsISupports */ QueryInterface : function bch_QI(iid) { if (!iid.equals(nsISupports) && !iid.equals(nsICommandLineHandler) && !iid.equals(nsIBrowserHandler) && !iid.equals(nsIContentHandler) && !iid.equals(nsICommandLineValidator) && !iid.equals(nsIFactory)) throw Components.results.NS_ERROR_NO_INTERFACE; return this; }, /* nsICommandLineHandler */ handle : function bch_handle(cmdLine) { if (cmdLine.handleFlag("browser", false)) { // Passing defaultArgs, so use NO_EXTERNAL_URIS openWindow(null, this.chromeURL, "_blank", "chrome,dialog=no,all" + this.getFeatures(cmdLine), this.defaultArgs, NO_EXTERNAL_URIS); cmdLine.preventDefault = true; } try { var remoteCommand = cmdLine.handleFlagWithParam("remote", true); } catch (e) { throw NS_ERROR_ABORT; } if (remoteCommand != null) { try { var a = /^\s*(\w+)\(([^\)]*)\)\s*$/.exec(remoteCommand); var remoteVerb; if (a) { remoteVerb = a[1].toLowerCase(); var remoteParams = []; var sepIndex = a[2].lastIndexOf(","); if (sepIndex == -1) remoteParams[0] = a[2]; else { remoteParams[0] = a[2].substring(0, sepIndex); remoteParams[1] = a[2].substring(sepIndex + 1); } } switch (remoteVerb) { case "openurl": case "openfile": // openURL(<url>) // openURL(<url>,new-window) // openURL(<url>,new-tab) // First param is the URL, second param (if present) is the "target" // (tab, window) var url = remoteParams[0]; var target = nsIBrowserDOMWindow.OPEN_DEFAULTWINDOW; if (remoteParams[1]) { var targetParam = remoteParams[1].toLowerCase() .replace(/^\s*|\s*$/g, ""); if (targetParam == "new-tab") target = nsIBrowserDOMWindow.OPEN_NEWTAB; else if (targetParam == "new-window") target = nsIBrowserDOMWindow.OPEN_NEWWINDOW; else { // The "target" param isn't one of our supported values, so // assume it's part of a URL that contains commas. url += "," + remoteParams[1]; } } var uri = resolveURIInternal(cmdLine, url); handURIToExistingBrowser(uri, target, cmdLine); break; case "xfedocommand": // xfeDoCommand(openBrowser) if (remoteParams[0].toLowerCase() != "openbrowser") throw NS_ERROR_ABORT; // Passing defaultArgs, so use NO_EXTERNAL_URIS openWindow(null, this.chromeURL, "_blank", "chrome,dialog=no,all" + this.getFeatures(cmdLine), this.defaultArgs, NO_EXTERNAL_URIS); break; default: // Somebody sent us a remote command we don't know how to process: // just abort. throw "Unknown remote command."; } cmdLine.preventDefault = true; } catch (e) { Components.utils.reportError(e); // If we had a -remote flag but failed to process it, throw // NS_ERROR_ABORT so that the xremote code knows to return a failure // back to the handling code. throw NS_ERROR_ABORT; } } var uriparam; try { while ((uriparam = cmdLine.handleFlagWithParam("new-window", false))) { var uri = resolveURIInternal(cmdLine, uriparam); if (!shouldLoadURI(uri)) continue; openWindow(null, this.chromeURL, "_blank", "chrome,dialog=no,all" + this.getFeatures(cmdLine), uri.spec); cmdLine.preventDefault = true; } } catch (e) { Components.utils.reportError(e); } try { while ((uriparam = cmdLine.handleFlagWithParam("new-tab", false))) { var uri = resolveURIInternal(cmdLine, uriparam); handURIToExistingBrowser(uri, nsIBrowserDOMWindow.OPEN_NEWTAB, cmdLine); cmdLine.preventDefault = true; } } catch (e) { Components.utils.reportError(e); } var chromeParam = cmdLine.handleFlagWithParam("chrome", false); if (chromeParam) { // Handle the old preference dialog URL separately (bug 285416) if (chromeParam == "chrome://browser/content/pref/pref.xul") { openPreferences(); cmdLine.preventDefault = true; } else try { // only load URIs which do not inherit chrome privs var features = "chrome,dialog=no,all" + this.getFeatures(cmdLine); var uri = resolveURIInternal(cmdLine, chromeParam); var netutil = Components.classes["@mozilla.org/network/util;1"] .getService(nsINetUtil); if (!netutil.URIChainHasFlags(uri, URI_INHERITS_SECURITY_CONTEXT)) { openWindow(null, uri.spec, "_blank", features); cmdLine.preventDefault = true; } } catch (e) { Components.utils.reportError(e); } } if (cmdLine.handleFlag("preferences", false)) { openPreferences(); cmdLine.preventDefault = true; } if (cmdLine.handleFlag("silent", false)) cmdLine.preventDefault = true; var searchParam = cmdLine.handleFlagWithParam("search", false); if (searchParam) { doSearch(searchParam, cmdLine); cmdLine.preventDefault = true; } //@line 524 "/builds/tinderbox/Fx-Mozilla1.9-Release/Darwin_8.8.4_Depend/mozilla/browser/components/nsBrowserContentHandler.js" }, helpInfo : " -browser Open a browser window.\n", /* nsIBrowserHandler */ get defaultArgs() { var prefb = Components.classes["@mozilla.org/preferences-service;1"] .getService(nsIPrefBranch); var formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"] .getService(Components.interfaces.nsIURLFormatter); var overridePage = ""; var haveUpdateSession = false; try { switch (needHomepageOverride(prefb)) { case OVERRIDE_NEW_PROFILE: // New profile overridePage = formatter.formatURLPref("startup.homepage_welcome_url"); break; case OVERRIDE_NEW_MSTONE: // Existing profile, new build copyPrefOverride(); // Check whether we have a session to restore. If we do, we assume // that this is an "update" session. var ss = Components.classes["@mozilla.org/browser/sessionstartup;1"] .getService(Components.interfaces.nsISessionStartup); haveUpdateSession = ss.doRestore(); overridePage = formatter.formatURLPref("startup.homepage_override_url"); break; } } catch (ex) {} // formatURLPref might return "about:blank" if getting the pref fails if (overridePage == "about:blank") overridePage = ""; var startPage = ""; try { var choice = prefb.getIntPref("browser.startup.page"); if (choice == 1 || choice == 3) startPage = this.startPage; if (choice == 2) startPage = Components.classes["@mozilla.org/browser/global-history;2"] .getService(nsIBrowserHistory).lastPageVisited; } catch (e) { Components.utils.reportError(e); } if (startPage == "about:blank") startPage = ""; // Only show the startPage if we're not restoring an update session. if (overridePage && startPage && !haveUpdateSession) return overridePage + "|" + startPage; return overridePage || startPage || "about:blank"; }, get startPage() { var prefb = Components.classes["@mozilla.org/preferences-service;1"] .getService(nsIPrefBranch); var uri = prefb.getComplexValue("browser.startup.homepage", nsIPrefLocalizedString).data; if (!uri) { prefb.clearUserPref("browser.startup.homepage"); uri = prefb.getComplexValue("browser.startup.homepage", nsIPrefLocalizedString).data; } var count; try { count = prefb.getIntPref("browser.startup.homepage.count"); } catch (e) { return uri; } for (var i = 1; i < count; ++i) { try { var page = prefb.getComplexValue("browser.startup.homepage." + i, nsIPrefLocalizedString).data; uri += "\n" + page; } catch (e) { } } return uri; }, mFeatures : null, getFeatures : function bch_features(cmdLine) { if (this.mFeatures === null) { this.mFeatures = ""; try { var width = cmdLine.handleFlagWithParam("width", false); var height = cmdLine.handleFlagWithParam("height", false); if (width) this.mFeatures += ",width=" + width; if (height) this.mFeatures += ",height=" + height; } catch (e) { } } return this.mFeatures; }, /* nsIContentHandler */ handleContent : function bch_handleContent(contentType, context, request) { try { var webNavInfo = Components.classes["@mozilla.org/webnavigation-info;1"] .getService(nsIWebNavigationInfo); if (!webNavInfo.isTypeSupported(contentType, null)) { throw NS_ERROR_WONT_HANDLE_CONTENT; } } catch (e) { throw NS_ERROR_WONT_HANDLE_CONTENT; } request.QueryInterface(nsIChannel); handURIToExistingBrowser(request.URI, nsIBrowserDOMWindow.OPEN_DEFAULTWINDOW, null); request.cancel(NS_BINDING_ABORTED); }, /* nsICommandLineValidator */ validate : function bch_validate(cmdLine) { // Other handlers may use osint so only handle the osint flag if the url // flag is also present and the command line is valid. var osintFlagIdx = cmdLine.findFlag("osint", false); var urlFlagIdx = cmdLine.findFlag("url", false); if (urlFlagIdx > -1 && (osintFlagIdx > -1 || cmdLine.state == nsICommandLine.STATE_REMOTE_EXPLICIT)) { var urlParam = cmdLine.getArgument(urlFlagIdx + 1); if (cmdLine.length != urlFlagIdx + 2 || /firefoxurl:/.test(urlParam)) throw NS_ERROR_ABORT; cmdLine.handleFlag("osint", false) } }, /* nsIFactory */ createInstance: function bch_CI(outer, iid) { if (outer != null) throw Components.results.NS_ERROR_NO_AGGREGATION; return this.QueryInterface(iid); }, lockFactory : function bch_lock(lock) { /* no-op */ } }; const bch_contractID = "@mozilla.org/browser/clh;1"; const bch_CID = Components.ID("{5d0ce354-df01-421a-83fb-7ead0990c24e}"); const CONTRACTID_PREFIX = "@mozilla.org/uriloader/content-handler;1?type="; function handURIToExistingBrowser(uri, location, cmdLine) { if (!shouldLoadURI(uri)) return; var navWin = getMostRecentBrowserWindow(); if (!navWin) { // if we couldn't load it in an existing window, open a new one openWindow(null, nsBrowserContentHandler.chromeURL, "_blank", "chrome,dialog=no,all" + nsBrowserContentHandler.getFeatures(cmdLine), uri.spec); return; } var navNav = navWin.QueryInterface(nsIInterfaceRequestor) .getInterface(nsIWebNavigation); var rootItem = navNav.QueryInterface(nsIDocShellTreeItem).rootTreeItem; var rootWin = rootItem.QueryInterface(nsIInterfaceRequestor) .getInterface(nsIDOMWindow); var bwin = rootWin.QueryInterface(nsIDOMChromeWindow).browserDOMWindow; bwin.openURI(uri, null, location, nsIBrowserDOMWindow.OPEN_EXTERNAL); } var nsDefaultCommandLineHandler = { /* nsISupports */ QueryInterface : function dch_QI(iid) { if (!iid.equals(nsISupports) && !iid.equals(nsICommandLineHandler) && !iid.equals(nsIFactory)) throw Components.results.NS_ERROR_NO_INTERFACE; return this; }, // List of uri's that were passed via the command line without the app // running and have already been handled. This is compared against uri's // opened using DDE on Win32 so we only open one of the requests. _handledURIs: [ ], //@line 735 "/builds/tinderbox/Fx-Mozilla1.9-Release/Darwin_8.8.4_Depend/mozilla/browser/components/nsBrowserContentHandler.js" /* nsICommandLineHandler */ handle : function dch_handle(cmdLine) { var urilist = []; //@line 761 "/builds/tinderbox/Fx-Mozilla1.9-Release/Darwin_8.8.4_Depend/mozilla/browser/components/nsBrowserContentHandler.js" try { var ar; while ((ar = cmdLine.handleFlagWithParam("url", false))) { var found = false; var uri = resolveURIInternal(cmdLine, ar); // count will never be greater than zero except on Win32. var count = this._handledURIs.length; for (var i = 0; i < count; ++i) { if (this._handledURIs[i].spec == uri.spec) { this._handledURIs.splice(i, 1); found = true; cmdLine.preventDefault = true; break; } } if (!found) { urilist.push(uri); // The requestpending command line flag is only used on Win32. if (cmdLine.handleFlag("requestpending", false) && cmdLine.state == nsICommandLine.STATE_INITIAL_LAUNCH) this._handledURIs.push(uri) } } } catch (e) { Components.utils.reportError(e); } count = cmdLine.length; for (i = 0; i < count; ++i) { var curarg = cmdLine.getArgument(i); if (curarg.match(/^-/)) { Components.utils.reportError("Warning: unrecognized command line flag " + curarg + "\n"); // To emulate the pre-nsICommandLine behavior, we ignore // the argument after an unrecognized flag. ++i; } else { try { urilist.push(resolveURIInternal(cmdLine, curarg)); } catch (e) { Components.utils.reportError("Error opening URI '" + curarg + "' from the command line: " + e + "\n"); } } } if (urilist.length) { if (cmdLine.state != nsICommandLine.STATE_INITIAL_LAUNCH && urilist.length == 1) { // Try to find an existing window and load our URI into the // current tab, new tab, or new window as prefs determine. try { handURIToExistingBrowser(urilist[0], nsIBrowserDOMWindow.OPEN_DEFAULTWINDOW, cmdLine); return; } catch (e) { } } var URLlist = urilist.filter(shouldLoadURI).map(function (u) u.spec); if (URLlist.length) { openWindow(null, nsBrowserContentHandler.chromeURL, "_blank", "chrome,dialog=no,all" + nsBrowserContentHandler.getFeatures(cmdLine), URLlist); } } else if (!cmdLine.preventDefault) { // Passing defaultArgs, so use NO_EXTERNAL_URIS openWindow(null, nsBrowserContentHandler.chromeURL, "_blank", "chrome,dialog=no,all" + nsBrowserContentHandler.getFeatures(cmdLine), nsBrowserContentHandler.defaultArgs, NO_EXTERNAL_URIS); } }, // XXX localize me... how? helpInfo : "Usage: firefox [-flags] [<url>]\n", /* nsIFactory */ createInstance: function dch_CI(outer, iid) { if (outer != null) throw Components.results.NS_ERROR_NO_AGGREGATION; return this.QueryInterface(iid); }, lockFactory : function dch_lock(lock) { /* no-op */ } }; const dch_contractID = "@mozilla.org/browser/final-clh;1"; const dch_CID = Components.ID("{47cd0651-b1be-4a0f-b5c4-10e5a573ef71}"); var Module = { /* nsISupports */ QueryInterface: function mod_QI(iid) { if (iid.equals(Components.interfaces.nsIModule) || iid.equals(Components.interfaces.nsISupports)) return this; throw Components.results.NS_ERROR_NO_INTERFACE; }, /* nsIModule */ getClassObject: function mod_getco(compMgr, cid, iid) { if (cid.equals(bch_CID)) return nsBrowserContentHandler.QueryInterface(iid); if (cid.equals(dch_CID)) return nsDefaultCommandLineHandler.QueryInterface(iid); throw Components.results.NS_ERROR_NO_INTERFACE; }, registerSelf: function mod_regself(compMgr, fileSpec, location, type) { if (Components.classes["@mozilla.org/xre/app-info;1"]) { // Don't register these if Firefox is launching a XULRunner application const FIREFOX_UID = "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"; var appInfo = Components.classes["@mozilla.org/xre/app-info;1"] .getService(Components.interfaces.nsIXULAppInfo); if (appInfo.ID != FIREFOX_UID) return; } var compReg = compMgr.QueryInterface( Components.interfaces.nsIComponentRegistrar ); compReg.registerFactoryLocation( bch_CID, "nsBrowserContentHandler", bch_contractID, fileSpec, location, type ); compReg.registerFactoryLocation( dch_CID, "nsDefaultCommandLineHandler", dch_contractID, fileSpec, location, type ); function registerType(contentType) { compReg.registerFactoryLocation( bch_CID, "Browser Cmdline Handler", CONTRACTID_PREFIX + contentType, fileSpec, location, type ); } registerType("text/html"); registerType("application/vnd.mozilla.xul+xml"); //@line 916 "/builds/tinderbox/Fx-Mozilla1.9-Release/Darwin_8.8.4_Depend/mozilla/browser/components/nsBrowserContentHandler.js" registerType("image/svg+xml"); //@line 918 "/builds/tinderbox/Fx-Mozilla1.9-Release/Darwin_8.8.4_Depend/mozilla/browser/components/nsBrowserContentHandler.js" registerType("text/rdf"); registerType("text/xml"); registerType("application/xhtml+xml"); registerType("text/css"); registerType("text/plain"); registerType("image/gif"); registerType("image/jpeg"); registerType("image/jpg"); registerType("image/png"); registerType("image/bmp"); registerType("image/x-icon"); registerType("image/vnd.microsoft.icon"); registerType("image/x-xbitmap"); registerType("application/http-index-format"); var catMan = Components.classes["@mozilla.org/categorymanager;1"] .getService(nsICategoryManager); catMan.addCategoryEntry("command-line-handler", "m-browser", bch_contractID, true, true); catMan.addCategoryEntry("command-line-handler", "x-default", dch_contractID, true, true); catMan.addCategoryEntry("command-line-validator", "b-browser", bch_contractID, true, true); }, unregisterSelf : function mod_unregself(compMgr, location, type) { var compReg = compMgr.QueryInterface(nsIComponentRegistrar); compReg.unregisterFactoryLocation(bch_CID, location); compReg.unregisterFactoryLocation(dch_CID, location); var catMan = Components.classes["@mozilla.org/categorymanager;1"] .getService(nsICategoryManager); catMan.deleteCategoryEntry("command-line-handler", "m-browser", true); catMan.deleteCategoryEntry("command-line-handler", "x-default", true); catMan.deleteCategoryEntry("command-line-validator", "b-browser", true); }, canUnload: function(compMgr) { return true; } }; // NSGetModule: Return the nsIModule object. function NSGetModule(compMgr, fileSpec) { return Module; } Error: return not in function Source File: javascript:%20return%20false; Line: 1, Column: 1 Source Code: return false; Error: uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIWebNavigation.loadURI]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: chrome://global/content/viewSource.js :: viewSource :: line 156" data: no]
Bob, please don't post the complete source file here. Thanks. Please use your normal profile where the crash occurred the first time for you. Try to reproduce it and send me please the crash id which can be found when opening the page "about:crashes" within the address bar. I hope you will be able to reproduce the issue. Probably also install the same version of Firefox again if you are gotten updated meanwhile.
Bob, sorry but I mixed-up the persons. Reporter, are you able to reproduce this issue?
Do you have the same problem with Firefox 3.0.1
Flags: in-testsuite-
Flags: in-litmus-
Flags: in-testsuite-
Flags: in-litmus-
do you still see this problem using FF 3.5 beta**, or FF 3.0 started in safe mode***? If yes, please comment If not, please close with resolution set to WORKSFORME or INVALID (if problem was extension or the like) ** http://www.mozilla.com/en-US/firefox/all-beta.html *** http://support.mozilla.com/en-US/kb/Safe+Mode
Whiteboard: closeme 2009-07-14
This bug was reported using a version of Firefox that security and stability updates are no longer provided for. All users are strongly encouraged to upgrade to Firefox 3 by selecting 'Check for Updates' in the Help menu or by going to http://www.mozilla.com/en-US/firefox/firefox.html If you can no longer reproduce this bug using the latest Firefox 3.0.x version, please change the status of this bug to 'RESOLVED' 'WORKSFORME'. If you can still reproduce this bug, please provide additional details to help resolve this issue.
WFM per Kurt
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: