Closed Bug 338728 Opened 18 years ago Closed 18 years ago

Don't dispatch native events after [NSApplication terminate:] is called

Categories

(Core :: Widget: Cocoa, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mark, Assigned: mark)

References

Details

Attachments

(1 file, 1 obsolete file)

Forking from bug 338249.  Native events should not be dispatched after [NSApplication terminate:] is called.  This affects applications that embed Gecko and expect native event processing to stop after calling [NSApp terminate:].  Bug 338249 comment 0 and bug 338249 comment 10 contain representative console output that Camino produces when it's asked to quit (or, as in that bug, when it quits spontaneously).

There is a patch in bug 338249, attachment 222334 [details] [diff] [review].
Attached patch Patch (obsolete) — Splinter Review
This is the command-Q patch from bug 338249 (attachment 222334 [details] [diff] [review]) brought up to date, but I'm not sure it's exactly the right thing to do.  When someone calls [NSApplication terminate:], we want to discontinue processing native events for sure, but an early return from ProcessNextNativeEvent like this will cause the nsBaseAppShell to spin a really quick loop without any blocking - blocking is ordinarily handled by calling ProcessNextNativeEvent(PR_TRUE).

On top of that, this doesn't clean up all of the autoreleased-to-no-pool messages I see when quitting Camino.
It seems like this isn't necessary with the patch in bug 339371.
*** Bug 340467 has been marked as a duplicate of this bug. ***
OK, fine, maybe it is necessary.
Talkback for recent trunk builds is still showing this, too.  My own builds have stopped crashing on quit, so the other bug seems to have helped but apparently didn't get everything.
Attached patch Up-to-dateSplinter Review
Attachment #223481 - Attachment is obsolete: true
Comment on attachment 224813 [details] [diff] [review]
Up-to-date

kreeger points out that we can add the observer with object:nil.
Attachment #224813 - Flags: review?(joshmoz)
Attachment #224813 - Flags: review?(joshmoz) → review+
Attachment #224813 - Flags: superreview?(darin)
*** Bug 341129 has been marked as a duplicate of this bug. ***
*** Bug 341129 has been marked as a duplicate of this bug. ***
How do you install the patches?
Attachment #224813 - Flags: superreview?(darin) → superreview+
Checked in on trunk.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: