Closed
Bug 1038617
Opened 10 years ago
Closed 10 years ago
B2G NFC: can't access dead object thrown from nsNfc.js
Categories
(Firefox OS Graveyard :: NFC, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
2.1 S1 (1aug)
People
(Reporter: allstars.chh, Assigned: allstars.chh)
References
Details
(Whiteboard: [p=3])
Attachments
(1 file, 3 obsolete files)
(deleted),
patch
|
allstars.chh
:
review+
|
Details | Diff | Splinter Review |
log from https://bugzilla.mozilla.org/show_bug.cgi?id=1034405#c3 It seems there is something wrong in notifyPeerEvent in Nfc.js or maybe the peerEventCallbackMap has problem, so in the end a closure from an previous leaked nsNfc.js is called and throw this error when the closure tried to get __DOM_IMPL__.
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → allstars.chh
Assignee | ||
Comment 1•10 years ago
|
||
Assignee | ||
Comment 3•10 years ago
|
||
Comment on attachment 8459439 [details] [diff] [review] Patch Hi, Kyle When mozNfc.onpeerready is assigned, registerTarget in nsNfc.js will be called. We discovered this bug from Bug 1034405. When Contacts app is ready to share its content, it will set onpeerready callback, However if a mozContact is received through NFC from another device at this moment, this contact would be dispatched through MozActivity and then an Activity Window will try to show this contact and set the onpeeready callback again. So there are two calls to set onpeeready, one is from the Contacts app, and the other is from the Activity Window. When the callback nsINfcPeerCallback is called, the window object and __DOM_IMPL are already invalid so the error "can't access dead object" will be thrown. So I add the check isDeadWrapper for these two objects. Can you help to review this? Thanks
Attachment #8459439 -
Flags: review?(khuey)
Assignee | ||
Comment 4•10 years ago
|
||
Move it into a function.
Attachment #8459439 -
Attachment is obsolete: true
Attachment #8459439 -
Flags: review?(khuey)
Attachment #8462293 -
Flags: review?(khuey)
Assignee | ||
Comment 5•10 years ago
|
||
Comment on attachment 8462293 [details] [diff] [review] Patch. v2 I have sent r? for two weeks and it seems Kyle is busy recently. :P Change r? to smaug. Hi Smaug Do you have time to review this patch for me? Or if you're busy I'll find other reviewer. Thanks
Attachment #8462293 -
Flags: review?(khuey) → review?(bugs)
Comment 6•10 years ago
|
||
Comment on attachment 8462293 [details] [diff] [review] Patch. v2 isDeadWrapper sounds a bit wrong. Perhaps hasDeadWrapper.
Attachment #8462293 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 7•10 years ago
|
||
rename to hasDeadWrapper
Attachment #8462293 -
Attachment is obsolete: true
Attachment #8464468 -
Flags: review+
Assignee | ||
Updated•10 years ago
|
Whiteboard: [p=3]
Target Milestone: --- → 2.1 S1 (1aug)
Assignee | ||
Comment 9•10 years ago
|
||
I think this has been landed on m-c http://hg.mozilla.org/mozilla-central/rev/447fd3d98aa4 Tom, can we close this ? Thank you.
Flags: needinfo?(cbook)
Comment 10•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/447fd3d98aa4
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(cbook)
You need to log in
before you can comment on or make changes to this bug.
Description
•