Bug 871303 - Remove JS_GetGlobalObject from gdb tests. r=sfink

This commit is contained in:
Bobby Holley 2013-05-13 13:57:25 -07:00
parent 171a9e7ce6
commit af1abaf13d
4 changed files with 7 additions and 7 deletions

View File

@ -1,14 +1,14 @@
#include "gdb-tests.h"
FRAGMENT(JSObject, simple) {
JS::Rooted<JSObject *> glob(cx, JS_GetGlobalObject(cx));
JS::Rooted<JSObject *> glob(cx, JS_GetGlobalForScopeChain(cx));
JS::Rooted<JSObject *> plain(cx, JS_NewObject(cx, 0, 0, 0));
JS::Rooted<JSObject *> func(cx, (JSObject *) JS_NewFunction(cx, (JSNative) 1, 0, 0,
JS_GetGlobalObject(cx), "dys"));
JS_GetGlobalForScopeChain(cx), "dys"));
JS::Rooted<JSObject *> anon(cx, (JSObject *) JS_NewFunction(cx, (JSNative) 1, 0, 0,
JS_GetGlobalObject(cx), 0));
JS_GetGlobalForScopeChain(cx), 0));
JS::Rooted<JSFunction *> funcPtr(cx, JS_NewFunction(cx, (JSNative) 1, 0, 0,
JS_GetGlobalObject(cx), "formFollows"));
JS_GetGlobalForScopeChain(cx), "formFollows"));
JSObject &plainRef = *plain;
JSFunction &funcRef = *funcPtr;

View File

@ -17,7 +17,7 @@ void callee(JS::Handle<JSObject *> obj, JS::MutableHandle<JSObject *> mutableObj
}
FRAGMENT(Root, handle) {
JS::Rooted<JSObject *> global(cx, JS_GetGlobalObject(cx));
JS::Rooted<JSObject *> global(cx, JS_GetGlobalForScopeChain(cx));
callee(global, &global);
(void) global;
}

View File

@ -6,7 +6,7 @@ FRAGMENT(jsid, simple) {
JS::Rooted<jsid> string_id(cx, INTERNED_STRING_TO_JSID(cx, interned));
jsid int_id = INT_TO_JSID(1729);
jsid void_id = JSID_VOID;
JS::Rooted<jsid> object_id(cx, OBJECT_TO_JSID(JS_GetGlobalObject(cx)));
JS::Rooted<jsid> object_id(cx, OBJECT_TO_JSID(JS_GetGlobalForScopeChain(cx)));
breakpoint();

View File

@ -15,7 +15,7 @@ FRAGMENT(jsval, simple) {
friendly_string.setString(JS_NewStringCopyZ(cx, "Hello!"));
JS::Rooted<jsval> global(cx);
global.setObject(*JS_GetGlobalObject(cx));
global.setObject(*JS_GetGlobalForScopeChain(cx));
// Some interesting value that floating-point won't munge.
JS::Rooted<jsval> onehundredthirtysevenonehundredtwentyeighths(cx, DOUBLE_TO_JSVAL(137.0 / 128.0));