Closed
Bug 1287235
Opened 9 years ago
Closed 9 years ago
sdk/event/utils.js WeakValueGetterSetter should use try/cache around Cu.getWeakReference
Categories
(Add-on SDK Graveyard :: General, defect)
Add-on SDK Graveyard
General
Tracking
(firefox49 fixed, firefox50 fixed)
RESOLVED
FIXED
mozilla50
People
(Reporter: bkelly, Assigned: bkelly)
References
Details
Attachments
(2 files)
|
1.45 KB,
patch
|
bzbarsky
:
review+
Sylvestre
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
|
13.82 KB,
application/zip
|
Details |
In bug 1267693 I made input.value a weak reference in most cases. This is done using Cu.getWeakReference when the event value is an object.
We should really put the getWeakReference() call in a try/catch, though. If a native object that does not implement nsISupportsWeakReference is passed as the event then the current code will throw.
I don't know of any instance of this, but we should just do it proactively to be correct.
I'll fix this on Monday.
| Assignee | ||
Comment 1•9 years ago
|
||
Boris, this is an issue we spoke about a few days ago. I added a Cu.getWeakReference() to addon-sdk, but I can't guarantee the value I'm wrapping is safe to be a weak reference. It can be a js value or a native object. Per your suggestion I'm just wrapping it in a try/catch here.
Attachment #8772427 -
Flags: review?(bzbarsky)
Comment 2•9 years ago
|
||
Comment on attachment 8772427 [details] [diff] [review]
Wrap addon-sdk's Cu.getWeakReference() in a try/catch in case native objects are passed. r=bz
r=me
Attachment #8772427 -
Flags: review?(bzbarsky) → review+
Pushed by bkelly@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/402ae3d3dec6
Wrap addon-sdk's Cu.getWeakReference() in a try/catch in case native objects are passed. r=bz
Comment 4•9 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Updated•9 years ago
|
status-firefox49:
--- → affected
| Assignee | ||
Comment 5•9 years ago
|
||
Comment on attachment 8772427 [details] [diff] [review]
Wrap addon-sdk's Cu.getWeakReference() in a try/catch in case native objects are passed. r=bz
Approval Request Comment
[Feature/regressing bug #]: Minor fix to bug 1267693 which is being uplifted.
[User impact if declined]: Avoid some rare, but potential addon compat issues with bug 1267693.
[Describe test coverage new/current, TreeHerder]: Existing tests.
[Risks and why]: None.
[String/UUID change made/needed]: None
Attachment #8772427 -
Flags: approval-mozilla-aurora?
Comment 6•9 years ago
|
||
Comment on attachment 8772427 [details] [diff] [review]
Wrap addon-sdk's Cu.getWeakReference() in a try/catch in case native objects are passed. r=bz
sure, let's take it in aurora. Thanks
Attachment #8772427 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
| Assignee | ||
Comment 7•9 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•