Closed
Bug 1215139
Opened 9 years ago
Closed 9 years ago
Handle stale native calls after nsWindow destruction
Categories
(Core Graveyard :: Widget: Android, defect)
Core Graveyard
Widget: Android
Tracking
(firefox44 fixed)
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: jchen, Assigned: jchen)
Details
Attachments
(3 files)
3.51 KB,
patch
|
snorp
:
review+
|
Details | Diff | Splinter Review |
8.96 KB,
patch
|
snorp
:
review+
|
Details | Diff | Splinter Review |
3.83 KB,
patch
|
snorp
:
review+
|
Details | Diff | Splinter Review |
I'm noticing some test failures related to native calls arriving from the UI thread after the Gecko nsWindow has been destroyed, when the test is shutting down. We should discard these stale calls instead of trying to complete them, which leads to a null pointer exception.
Assignee | ||
Comment 1•9 years ago
|
||
It's helpful to have a static DisposeNative when disposing of instances that are still associated with a native object through an null weak pointer. In that case, we can't call instance methods because the weak pointer is null, but we can still call static methods.
Attachment #8674426 -
Flags: review?(snorp)
Assignee | ||
Comment 2•9 years ago
|
||
This patch adds a separate close() call to nsWindow, and let the GeckoView decide whether to make that call or not. This lets us use the static version of disposeNative. If nsWindow is destroyed in the meantime, we still want to call disposeNative, which would only be possible using the static version of disposeNative.
Attachment #8674427 -
Flags: review?(snorp)
Assignee | ||
Comment 3•9 years ago
|
||
In the period after nsWindow is destroyed, but before disposeNative is called, we should discard any pending native calls. These calls would result in exceptions anyways because the nsWindow weak pointer is now null. After disposeNative is called, any native calls will still result in exceptions, because in that case, it's Java code's responsibility to ensure that calls are not made after disposeNative is called.
Attachment #8674429 -
Flags: review?(snorp)
Attachment #8674426 -
Flags: review?(snorp) → review+
Attachment #8674427 -
Flags: review?(snorp) → review+
Attachment #8674429 -
Flags: review?(snorp) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/adc70fa9aa35 https://hg.mozilla.org/integration/mozilla-inbound/rev/3fde465d5226 https://hg.mozilla.org/integration/mozilla-inbound/rev/cc90b297f32f
Comment 5•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/adc70fa9aa35 https://hg.mozilla.org/mozilla-central/rev/3fde465d5226 https://hg.mozilla.org/mozilla-central/rev/cc90b297f32f
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Updated•3 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•