can't access dead object in forms.js line 49

RESOLVED FIXED

Status

Firefox OS
General
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: ttaubert, Assigned: ttaubert)

Tracking

unspecified
All
Gonk (Firefox OS)

Firefox Tracking Flags

(blocking-basecamp:-, firefox18 fixed, firefox19 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
I can't exactly reproduce this but saw this in some logs. If the focusedElement is set and its document goes away in the meantime (crash or close?), the wrapper will be dead and this will yield an error on next access.

Requesting blocking+ as this might render any input element interaction and other stuff impossible until the device is rebooted.
(Assignee)

Comment 1

5 years ago
Created attachment 674437 [details] [diff] [review]
check if the wrapper is dead before accessing it
Attachment #674437 - Flags: review?(dflanagan)
(Assignee)

Comment 2

5 years ago
Created attachment 674439 [details] [diff] [review]
check if the wrapper is dead before accessing it

Small correction.
Attachment #674437 - Attachment is obsolete: true
Attachment #674437 - Flags: review?(dflanagan)
Attachment #674439 - Flags: review?(dflanagan)
Component: Gaia → General
Hardware: ARM → All
Comment on attachment 674439 [details] [diff] [review]
check if the wrapper is dead before accessing it

Review of attachment 674439 [details] [diff] [review]:
-----------------------------------------------------------------

Nice catch. I can see how this.focusedElement would have a longer lifetime than the element to which it refers.  I have no experience with Cu.isDeadWrapper(), but it sounds like this is exactly what you need to detect that issue.
Attachment #674439 - Flags: review?(dflanagan) → review+
(Assignee)

Comment 4

5 years ago
Thanks for the review! Just to reassure you:

http://mxr.mozilla.org/mozilla-central/source/js/xpconnect/idl/xpccomponents.idl#319

We also use it here already:

http://mxr.mozilla.org/mozilla-central/source/dom/browser-element/BrowserElementParent.js
(Assignee)

Comment 5

5 years ago
Waiting for an approval-mozilla-aurora flag.
Depends on: 804945
(Assignee)

Comment 6

5 years ago
Comment on attachment 674439 [details] [diff] [review]
check if the wrapper is dead before accessing it

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
User impact if declined: This might render any input element interaction and other stuff impossible until the device is rebooted.
Testing completed (on m-c, etc.): 
Risk to taking this patch (and alternatives if risky): Small, self-contained patch that adds error checking. Low risk.
String or UUID changes made by this patch: None
Attachment #674439 - Flags: approval-mozilla-aurora?
Comment on attachment 674439 [details] [diff] [review]
check if the wrapper is dead before accessing it

Review of attachment 674439 [details] [diff] [review]:
-----------------------------------------------------------------

Make sure to mark as status-firefox18:fixed when landing
Attachment #674439 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Fabrice says we should take this fix but not block on it.
blocking-basecamp: ? → -
(Assignee)

Comment 9

5 years ago
https://hg.mozilla.org/integration/fx-team/rev/6c5e1a6e2e71
https://hg.mozilla.org/releases/mozilla-aurora/rev/5d42b4fd95e6
status-firefox18: --- → fixed
status-firefox19: --- → fixed
Whiteboard: [fixed-in-fx-team]
(Assignee)

Comment 10

5 years ago
Had to push a little bustage fix to not pass null values to Cu.isDeadWrapper():

https://hg.mozilla.org/integration/fx-team/rev/a60c5629e19b
https://hg.mozilla.org/releases/mozilla-aurora/rev/dc78bc1f81af
Tim, we usually push to inbound for b2g, not to fx-team.
(Assignee)

Comment 12

5 years ago
I know but I don't have an inbound checkout. I usually push to fx-team and merge to m-c from there. Shouldn't make a difference.
(Assignee)

Comment 13

5 years ago
https://hg.mozilla.org/mozilla-central/rev/6c5e1a6e2e71
https://hg.mozilla.org/mozilla-central/rev/a60c5629e19b
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]

Updated

5 years ago
Duplicate of this bug: 798193
You need to log in before you can comment on or make changes to this bug.