Closed Bug 696665 Opened 13 years ago Closed 13 years ago

nsJSContext::JSObjectFromInterface should take a JSObject scope parameter

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla10

People

(Reporter: Ms2ger, Assigned: Ms2ger)

References

Details

Attachments

(1 file)

Attached patch Patch v1Splinter Review
      No description provided.
Attachment #568966 - Flags: review?(mounir)
Flags: in-testsuite-
Blocks: 696666
Blocks: 696668
Comment on attachment 568966 [details] [diff] [review]
Patch v1

Review of attachment 568966 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/base/nsJSEnvironment.cpp
@@ +1872,5 @@
>  #endif
>  
>    JSAutoRequest ar(mContext);
>    JSObject* target = nsnull;
> +  nsresult rv = JSObjectFromInterface(aTarget, static_cast<JSObject*>(aScope),

Why are you calling static_cast here? aScope is already a JSObject*, isn't it?

@@ +1978,5 @@
>    JSAutoRequest ar(mContext);
>  
>    // Get the jsobject associated with this target
>    JSObject *target = nsnull;
> +  nsresult rv = JSObjectFromInterface(aTarget, static_cast<JSObject*>(aScope),

ditto
I'm afraid not; they are turned into JSObjects in the bugs this one blocks. I can do them in the opposite direction if you prefer.
Comment on attachment 568966 [details] [diff] [review]
Patch v1

Review of attachment 568966 [details] [diff] [review]:
-----------------------------------------------------------------

Oups, I didn't see this was a different method.

Looks good then.
Attachment #568966 - Flags: review?(mounir) → review+
https://hg.mozilla.org/mozilla-central/rev/6b05ed1c92ae
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.