nsJSContext::JSObjectFromInterface should take a JSObject scope parameter

RESOLVED FIXED in mozilla10

Status

()

Core
DOM
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Tracking

Trunk
mozilla10
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Created attachment 568966 [details] [diff] [review]
Patch v1
Attachment #568966 - Flags: review?(mounir)
Flags: in-testsuite-
(Assignee)

Updated

6 years ago
Blocks: 696666
(Assignee)

Updated

6 years ago
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
(Assignee)

Comment 2

6 years ago
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+
(Assignee)

Comment 4

6 years ago
https://hg.mozilla.org/mozilla-central/rev/6b05ed1c92ae
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
You need to log in before you can comment on or make changes to this bug.