Last Comment Bug 696665 - nsJSContext::JSObjectFromInterface should take a JSObject scope parameter
: nsJSContext::JSObjectFromInterface should take a JSObject scope parameter
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla10
Assigned To: :Ms2ger
:
Mentors:
Depends on:
Blocks: 696666 696668
  Show dependency treegraph
 
Reported: 2011-10-23 12:45 PDT by :Ms2ger
Modified: 2011-10-30 05:29 PDT (History)
2 users (show)
Ms2ger: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (3.91 KB, patch)
2011-10-23 12:45 PDT, :Ms2ger
mounir: review+
Details | Diff | Review

Description :Ms2ger 2011-10-23 12:45:20 PDT
Created attachment 568966 [details] [diff] [review]
Patch v1
Comment 1 Mounir Lamouri (:mounir) 2011-10-24 01:01:36 PDT
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
Comment 2 :Ms2ger 2011-10-25 09:54:33 PDT
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 3 Mounir Lamouri (:mounir) 2011-10-25 10:15:26 PDT
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.

Note You need to log in before you can comment on or make changes to this bug.