Closed
Bug 865961
Opened 13 years ago
Closed 13 years ago
Root the "scope" argument to methods we use to wrap XPConnect objects in WebIDL
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla23
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file, 1 obsolete file)
|
19.74 KB,
patch
|
Ms2ger
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Assignee | ||
Comment 1•13 years ago
|
||
Attachment #742160 -
Flags: review?(Ms2ger)
| Assignee | ||
Updated•13 years ago
|
Blocks: ExactRootingBrowser
| Assignee | ||
Comment 2•13 years ago
|
||
Comment on attachment 742160 [details] [diff] [review]
Root the scope argument of wrap-the-xpconnect-object helpers in WebIDL bindings.
Needs more work.
Attachment #742160 -
Attachment is obsolete: true
Attachment #742160 -
Flags: review?(Ms2ger)
| Assignee | ||
Comment 3•13 years ago
|
||
Attachment #742205 -
Flags: review?(Ms2ger)
Comment 4•13 years ago
|
||
Comment on attachment 742205 [details] [diff] [review]
Root the scope argument of wrap-the-xpconnect-object helpers in WebIDL bindings.
Review of attachment 742205 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/bindings/BindingUtils.cpp
@@ +664,5 @@
>
> JSBool
> QueryInterface(JSContext* cx, unsigned argc, JS::Value* vp)
> {
> JS::Value thisv = JS_THIS(cx, vp);
(Interesting; everyone else uses JS_THIS_OBJECT.
This is probably another rooting hazard, given that we use thisv at the end of the function.)
::: dom/bindings/BindingUtils.h
@@ +896,5 @@
> // Only set allowNativeWrapper to false if you really know you need it, if in
> // doubt use true. Setting it to false disables security wrappers.
> bool
> +XPCOMObjectToJsval(JSContext* cx, JS::Handle<JSObject*> scope,
> + xpcObjectHelper &helper, const nsIID* iid,
& to the left while you're here
@@ +955,5 @@
>
> // Helper to make it possible to wrap directly out of an nsCOMPtr
> template<class T>
> inline bool
> +WrapObject(JSContext* cx, JS::Handle<JSObject*> scope, const nsCOMPtr<T> &p,
&, and three more times below
Attachment #742205 -
Flags: review?(Ms2ger) → review+
| Assignee | ||
Comment 5•13 years ago
|
||
> Interesting; everyone else uses JS_THIS_OBJECT.
Which calls JS_ComputeThis, note....
This only really matters for bareword QueryInterface once Window is using WebIDL, in practice.
> This is probably another rooting hazard
Indeed. Will fix when I do a final sweep through this stuff.
Comment 6•13 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #5)
> > Interesting; everyone else uses JS_THIS_OBJECT.
>
> Which calls JS_ComputeThis, note....
So does JS_THIS; JS_THIS_VALUE is the one that doesn't.
| Assignee | ||
Comment 7•13 years ago
|
||
Ah, right. Anyway, CallArgs will make us revisit all that junk. ;)
| Assignee | ||
Comment 8•13 years ago
|
||
| Assignee | ||
Updated•13 years ago
|
Flags: in-testsuite-
Whiteboard: [need review]
Target Milestone: --- → mozilla23
Comment 9•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
•