Bug 868110 - Remove JS_GetGlobalObject. r=luke

\o/
This commit is contained in:
Bobby Holley 2013-05-22 15:42:45 -06:00
parent d1daeb827a
commit c1dc65c3ef
3 changed files with 5 additions and 13 deletions

View File

@ -55,7 +55,9 @@ protected:
}
PObjectWrapperChild* AllocPObjectWrapper(const bool&) {
return AllocPObjectWrapper(JS_GetGlobalObject(mContext));
// This stuff is unused and billm has a patch to delete it.
JSAutoRequest ar(mContext);
return AllocPObjectWrapper(JS_GetGlobalForScopeChain(mContext));
}
bool DeallocPObjectWrapper(PObjectWrapperChild* actor) {

View File

@ -1764,12 +1764,6 @@ JS_RefreshCrossCompartmentWrappers(JSContext *cx, JSObject *objArg)
return RemapAllWrappersForObject(cx, obj, obj);
}
JS_PUBLIC_API(JSObject *)
JS_GetGlobalObject(JSContext *cx)
{
return cx->maybeDefaultCompartmentObject();
}
JS_PUBLIC_API(void)
JS_SetGlobalObject(JSContext *cx, JSObject *obj)
{

View File

@ -1940,9 +1940,8 @@ JS_StringToVersion(const char *string);
will be passed to each call
to JS_ExecuteScript. */
#define JSOPTION_UNROOTED_GLOBAL JS_BIT(13) /* The GC will not root the
contexts' global objects
(see JS_GetGlobalObject),
leaving that up to the
contexts' default compartment
object, leaving that up to the
embedding. */
#define JSOPTION_BASELINE JS_BIT(14) /* Baseline compiler. */
@ -2079,9 +2078,6 @@ extern JS_PUBLIC_API(void)
JS_IterateCompartments(JSRuntime *rt, void *data,
JSIterateCompartmentCallback compartmentCallback);
extern JS_PUBLIC_API(JSObject *)
JS_GetGlobalObject(JSContext *cx);
extern JS_PUBLIC_API(void)
JS_SetGlobalObject(JSContext *cx, JSObject *obj);