Closed
Bug 432556
Opened 18 years ago
Closed 18 years ago
Null pointer de-reference in [ToolbarWindow _toolbarPillButtonClicked:]
Categories
(Core :: Widget: Cocoa, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: smichaud, Assigned: smichaud)
Details
Attachments
(1 file)
|
1.02 KB,
patch
|
jaas
:
review+
roc
:
superreview+
mtschrep
:
approval1.9+
|
Details | Diff | Splinter Review |
The [ToolbarWindow _toolbarPillButtonClicked:] method (in
nsCocoaWindow.mm) sets its geckoWindow local variable as follows:
nsCocoaWindow *geckoWindow = [[self delegate] geckoWidget];
But if the current ToolbarWindow's widget has been destroyed, [self
delegate] will return nil, as will [[self delegate] geckoWidget]. So
geckoWindow will be nil, and a crash will happen when it's
de-referenced at the bottom of the method.
Breakpad has recorded a couple of these crashes in the last week:
http://crash-stats.mozilla.com/report/list?range_unit=weeks&query_search=signature&query_type=exact&platform=mac&branch=1.9&signature=-%5BToolbarWindow+_toolbarPillButtonClicked%3A%5D&query=-%5BToolbarWindow+_toolbarPillButtonClicked%3A%5D&range_value=1
The following two lines should be added after the line that sets
geckoWindow:
if (!geckoWindow)
return;
Flags: wanted1.9.0.x?
| Assignee | ||
Comment 1•18 years ago
|
||
Josh and Stuart: This fix is a no-brainer, and will need to be done
at some point anyway. It's also possible that it could resolve bug
432005. Do you think it's worth trying to get it landed quickly, so
that the guy who reported bug 432005 can try it in a nightly?
Comment 2•18 years ago
|
||
(In reply to comment #1)
> It's also possible that it could resolve bug 432005.
I don't see how, since it should never be possible to create a ToolbarWindow (or any of the other custom window classes used in XUL apps) in Camino.
Can we please get an actual patch on this bug with review flags set instead of a description of the patch?
| Assignee | ||
Comment 4•18 years ago
|
||
>> It's also possible that it could resolve bug 432005.
>
> I don't see how, since it should never be possible to create a
> ToolbarWindow (or any of the other custom window classes used in XUL
> apps) in Camino.
Oops, you're right. Sorry for the confusion.
| Assignee | ||
Comment 5•18 years ago
|
||
Here it is.
Attachment #319815 -
Flags: superreview?(roc)
Attachment #319815 -
Flags: review?(joshmoz)
Attachment #319815 -
Flags: review+
Comment on attachment 319815 [details] [diff] [review]
Fix
trivial fix, no risk
Attachment #319815 -
Flags: superreview?(roc)
Attachment #319815 -
Flags: superreview+
Attachment #319815 -
Flags: approval1.9?
Updated•18 years ago
|
Attachment #319815 -
Flags: approval1.9? → approval1.9+
landed on trunk
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Updated•17 years ago
|
Flags: wanted1.9.0.x?
You need to log in
before you can comment on or make changes to this bug.
Description
•