Closed
Bug 960694
Opened 11 years ago
Closed 11 years ago
Support serializing JS implemented objects in nsBinaryOutputStream
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: jst, Assigned: jst)
References
Details
(Whiteboard: [qa-])
Attachments
(1 file)
1.05 KB,
patch
|
benjamin
:
review+
lsblakk
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
We ran into this in bug 911547 where we need to serialize a CSP object which is implemented in JS. The nsBinaryOutputStream calls GetClassIDNoAlloc() on the object's classinfo, which in this case is also a JS implemented object, and thus can not implement GetClassIDNoAlloc() (which is a [notxpcom] method).
We probably want to keep calling GetClassIDNoAlloc(), cause it's faster and does exist in the common case, but if it fails, we should fall back on the scriptable method.
Assignee | ||
Updated•11 years ago
|
OS: Linux → All
Hardware: x86_64 → All
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8361259 -
Flags: review?(benjamin)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → jst
Assignee | ||
Updated•11 years ago
|
Blocks: CVE-2014-1504
Comment 2•11 years ago
|
||
FWIW, I'm trying a patch now which just replaces GetClassID with GetClassIDNoAlloc and makes that one scriptable (there's no reason it shouldn't be scriptable, from what I can see). We'll see whether it actually works and is scriptable in reality in a bit. If that doesn't pan out, this is fine.
Comment 3•11 years ago
|
||
Comment on attachment 8361259 [details] [diff] [review]
Support writing out JS implemented classes.
Yeah so, making this an nsIDRef gives the right signatures but xpconnect isn't prepared to handle it *and* currently doesn't distinguish between nsIDPtr and nsIDRef, which is strange. So land this as is and I'll see if I can unify them in a followup.
Attachment #8361259 -
Flags: review?(benjamin) → review+
Comment 4•11 years ago
|
||
Landed on inbound: https://hg.mozilla.org/integration/mozilla-inbound/rev/e0667142d36a
Updated•11 years ago
|
Target Milestone: --- → mozilla29
Comment 5•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 6•11 years ago
|
||
Comment on attachment 8361259 [details] [diff] [review]
Support writing out JS implemented classes.
[Approval Request Comment]
Bug caused by (feature/regressing bug #): prevents serialization of js-implemented xpcom objects.
User impact if declined: can't uplift bug 911547.
Testing completed (on m-c, etc.): landed on m-c
Risk to taking this patch (and alternatives if risky): low risk; no js-implemented objects that are currently serialized exist in mozilla-aurora
String or IDL/UUID changes made by this patch: none
Attachment #8361259 -
Flags: approval-mozilla-aurora?
Updated•11 years ago
|
Attachment #8361259 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 7•11 years ago
|
||
status-firefox28:
--- → fixed
status-firefox29:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•