Closed
Bug 865785
Opened 12 years ago
Closed 12 years ago
Root Constructor for JS-implemented WebIDL
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla23
People
(Reporter: mccr8, Assigned: bzbarsky)
References
Details
Attachments
(2 files)
(deleted),
patch
|
mccr8
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
mccr8
:
review+
|
Details | Diff | Splinter Review |
This method is a big blob of text, so the main trick will be passing in a JSContext* so we can root things. Note that bug 865544 will add another unrooted thing to the stack.
Most Constructor methods are hopefully not messing around with raw JS objects, so I would think we don't need the cx everywhere.
Assignee | ||
Comment 1•12 years ago
|
||
sfink helpfully added our test codegen to the rooting analysis builds, so now we can see what the actual hazards are.
Reporter | ||
Comment 2•12 years ago
|
||
Ah, nice. I think most of the uses here are going to be actual hazards, given that we're running arbitrary blobs of chrome JS.
Assignee | ||
Comment 3•12 years ago
|
||
Some of these hazards will need to be fixed in bug 868715. The rest, patch coming up.
Assignee | ||
Comment 4•12 years ago
|
||
Attachment #745562 -
Flags: review?(continuation)
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → bzbarsky
Assignee | ||
Comment 5•12 years ago
|
||
Attachment #745563 -
Flags: review?(continuation)
Assignee | ||
Updated•12 years ago
|
Whiteboard: [need review]
Reporter | ||
Updated•12 years ago
|
Attachment #745562 -
Flags: review?(continuation) → review+
Reporter | ||
Comment 6•12 years ago
|
||
Comment on attachment 745563 [details] [diff] [review]
part 2. Fix rooting issues in JS-implemented webidl.
Review of attachment 745563 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks for fixing this!
::: dom/bindings/Codegen.py
@@ +8634,5 @@
> }
> // Initialize the object, if it implements nsIDOMGlobalPropertyInitializer.
> nsCOMPtr<nsIDOMGlobalPropertyInitializer> gpi = do_QueryInterface(implISupports);
> if (gpi) {
> + JS::Rooted<JS::Value> initReturn(cx, JSVAL_VOID);
If RootedJS<JS::Value> initializes it to something (anything, really) then you can skip the JSVAL_VOID here.
Attachment #745563 -
Flags: review?(continuation) → review+
Assignee | ||
Comment 7•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/1531a6ec12c1
https://hg.mozilla.org/integration/mozilla-inbound/rev/1a60a6e9d9b8
Flags: in-testsuite-
Whiteboard: [need review]
Target Milestone: --- → mozilla23
Comment 8•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/1531a6ec12c1
https://hg.mozilla.org/mozilla-central/rev/1a60a6e9d9b8
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•