Closed Bug 831291 Opened 10 years ago Closed 10 years ago

GC: jsapi test Debugger fails under rooting analysis

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(1 file)

      No description provided.
Attached patch Possible fixSplinter Review
I'm not sure about the use AutoArrayRooter in testIndirectEval.  I couldn't find anything else to root an array of jsval though.
Attachment #702818 - Flags: review?(wmccloskey)
Comment on attachment 702818 [details] [diff] [review]
Possible fix

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

::: js/src/jsapi-tests/testDebugger.cpp
@@ +160,5 @@
>      }
>  
>      js::RootedObject debuggeeWrapper(cx, debuggee);
>      CHECK(JS_WrapObject(cx, debuggeeWrapper.address()));
> +    js::RootedValue v(cx, OBJECT_TO_JSVAL(debuggeeWrapper));

Can you replace OBJECT_TO_JSVAL with ObjectValue? It's just a little cleaner.

@@ +198,5 @@
>      }
>  
>      js::RootedObject gWrapper(cx, g);
>      CHECK(JS_WrapObject(cx, gWrapper.address()));
> +    js::RootedValue v(cx, OBJECT_TO_JSVAL(gWrapper));

Same here.
Attachment #702818 - Flags: review?(wmccloskey) → review+
Blocks: 831376
https://hg.mozilla.org/mozilla-central/rev/935b891ba398
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.