Closed
Bug 792890
Opened 14 years ago
Closed 13 years ago
Fix JS-wrapping for callback interfaces to comply with the spec
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla19
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file)
Per spec, we should be "wrapping" callback interfaces to the underlying JS object, not double-wrapping in an XPCWrappedNative as we do now.
| Assignee | ||
Comment 1•14 years ago
|
||
1) When wrapping a callback interface object for JS, just extract the
underlying JSObject from inside it and hand that object out.
2) Flag callback interface descriptors as "not concrete" (only matters
for cases when they have constants on the interface object) and not
wrappercached (will catch bugs if someone tries to treat them as a
Gecko object).
3) Fix a preexisting bug in sequence wrapping where we'd try to
JS_DefineElement twice if we were wrapping a null value for a
sequence of nullable interface objects.
Attachment #663060 -
Flags: review?(peterv)
Comment 2•14 years ago
|
||
Comment on attachment 663060 [details] [diff] [review]
Fix JS-wrapping of callback interfaces to just return the underlying JS object. are several changes here:
Review of attachment 663060 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/bindings/Codegen.py
@@ +2658,5 @@
> + } while (0);
> + if (!JS_DefineElement(cx, returnArray, i, tmp,
> + nullptr, nullptr, JSPROP_ENUMERATE)) {
> + return false;
> + }
Trailing whitespace
| Assignee | ||
Updated•14 years ago
|
Attachment #663060 -
Flags: review?(jst)
Comment 3•14 years ago
|
||
Comment on attachment 663060 [details] [diff] [review]
Fix JS-wrapping of callback interfaces to just return the underlying JS object. are several changes here:
Looks good, r=jst
Attachment #663060 -
Flags: review?(jst) → review+
| Assignee | ||
Updated•14 years ago
|
Attachment #663060 -
Flags: review?(peterv)
| Assignee | ||
Comment 4•14 years ago
|
||
Flags: in-testsuite?
Whiteboard: [need review]
Target Milestone: --- → mozilla19
| Assignee | ||
Comment 5•14 years ago
|
||
Comment 6•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•