If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Applescript quit command is working, but ... destructively

RESOLVED INCOMPLETE

Status

()

Firefox
Shell Integration
RESOLVED INCOMPLETE
11 years ago
11 days ago

People

(Reporter: Ray Kiddy, Unassigned)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

11 years ago
Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.9a3pre) Gecko/20070317 Minefield/3.0a3pre

I am running a script that checks for leaks. I can use the page below, and when the page loads, it quits with no spew and with no objects leaked:

<html><head><title>foo</title>
</head>
<body onload="finish();">
<script>
    function finish() {
        netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
        var appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"].getService(Components.interfaces.nsIAppStartup);
        appStartup.quit(Components.interfaces.nsIAppStartup.eForceQuit);
    }
</script>
xxx</body></html>

When I do a "kill -QUIT" on the app, it spews a bunch of error messages and reports a bunch of leaks, though the app then terminates.

Leaked document at address 2287800.
 ... with URI "chrome://global/content/bindings/toolbar.xml".
 ... with URI "jar:file:///Applications/Mozilla/Minefield_3.0a3pre_N_20070317.app/Contents/MacOS/chrome/toolkit.jar!/content/global/bindings/toolbar.xml".
Leaked document at address 2298800.
 ... with URI "chrome://global/content/bindings/tabbox.xml".
 ... with URI "jar:file:///Applications/Mozilla/Minefield_3.0a3pre_N_20070317.app/Contents/MacOS/chrome/toolkit.jar!/content/global/bindings/tabbox.xml".
Leaked docshell at address 1427d8a0.
 ... which loaded URI "about:blank".
 ... which loaded URI "chrome://browser/content/browser.xul".
Leaked docshell at address 19eba20.
 ... which loaded URI "about:blank".
 ... which loaded URI "chrome://browser/content/hiddenWindow.xul".
Leaked docshell at address 18f8b460.
 ... which loaded URI "about:blank".
 ... which loaded URI "file:///Users/ray/mo/trowser/mozilla/content/base/test/test_bug218236.html".
Summary:
Leaked 10 out of 11 DOM Windows
Leaked 38 out of 42 documents
Leaked 3 out of 5 docshells

BOOM!

If I do the following:

osascript -e 'tell application "Minefield"' -e 'quit' -e 'end tell'

I get the much spew quit and not the earlier, nice and quiet quit.

It is just a guess, but I would bet that the AppleEvent listener for the 'quit' is not doing the most elegant thing. It is probably just tossing a grenade and ducking, instead of executing a quit in a way that allows Firefox to shut down gracefully.

I will look at the AppleEvent handler and see if I can fix this, unless someone else jumps at it.
Not a shell integration bug and no activity so resolving -> incomplete. If this is still an issue please file an untriaged bug and it will hopefully end up in the correct component for someone to work on.
Status: NEW → RESOLVED
Last Resolved: 11 days ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.