From a1b85dbc2a5a2506efc93024b74bbbf2b481e92f Mon Sep 17 00:00:00 2001 From: Terrence Cole Date: Thu, 13 Jun 2013 17:10:00 -0700 Subject: [PATCH] Bug 884410 - Handlify the JS_ResolveStandardClass interface; r=jonco --HG-- extra : rebase_source : 3ba45931aad97fb7cbca517ae9bccb974d42e57a --- content/xbl/src/nsXBLDocumentInfo.cpp | 2 +- content/xul/document/src/nsXULPrototypeDocument.cpp | 2 +- dom/workers/WorkerScope.cpp | 2 +- js/src/jsapi.cpp | 3 +-- js/src/jsapi.h | 2 +- js/xpconnect/src/XPCComponents.cpp | 2 +- js/xpconnect/src/XPCJSContextStack.cpp | 2 +- 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/content/xbl/src/nsXBLDocumentInfo.cpp b/content/xbl/src/nsXBLDocumentInfo.cpp index e20e7e31872..81b3efaae4d 100644 --- a/content/xbl/src/nsXBLDocumentInfo.cpp +++ b/content/xbl/src/nsXBLDocumentInfo.cpp @@ -163,7 +163,7 @@ nsXBLDocGlobalObject_finalize(JSFreeOp *fop, JSObject *obj) } static JSBool -nsXBLDocGlobalObject_resolve(JSContext *cx, JSHandleObject obj, JSHandleId id) +nsXBLDocGlobalObject_resolve(JSContext *cx, JS::HandleObject obj, JS::HandleId id) { JSBool did_resolve = JS_FALSE; return JS_ResolveStandardClass(cx, obj, id, &did_resolve); diff --git a/content/xul/document/src/nsXULPrototypeDocument.cpp b/content/xul/document/src/nsXULPrototypeDocument.cpp index 2a086cff739..76a7767f102 100644 --- a/content/xul/document/src/nsXULPrototypeDocument.cpp +++ b/content/xul/document/src/nsXULPrototypeDocument.cpp @@ -103,7 +103,7 @@ nsXULPDGlobalObject_finalize(JSFreeOp *fop, JSObject *obj) JSBool -nsXULPDGlobalObject_resolve(JSContext *cx, JSHandleObject obj, JSHandleId id) +nsXULPDGlobalObject_resolve(JSContext *cx, JS::HandleObject obj, JS::HandleId id) { JSBool did_resolve = JS_FALSE; diff --git a/dom/workers/WorkerScope.cpp b/dom/workers/WorkerScope.cpp index 91a12dea88a..8776f8cf612 100644 --- a/dom/workers/WorkerScope.cpp +++ b/dom/workers/WorkerScope.cpp @@ -812,7 +812,7 @@ private: } static JSBool - Resolve(JSContext* aCx, JSHandleObject aObj, JSHandleId aId, unsigned aFlags, + Resolve(JSContext* aCx, JS::HandleObject aObj, JS::HandleId aId, unsigned aFlags, JS::MutableHandle aObjp) { JSBool resolved; diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index e77a89a5fbd..d60f24857aa 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -1914,9 +1914,8 @@ static const JSStdName object_prototype_names[] = { }; JS_PUBLIC_API(JSBool) -JS_ResolveStandardClass(JSContext *cx, JSObject *objArg, jsid id, JSBool *resolved) +JS_ResolveStandardClass(JSContext *cx, HandleObject obj, HandleId id, JSBool *resolved) { - RootedObject obj(cx, objArg); JSRuntime *rt; JSAtom *atom; const JSStdName *stdnm; diff --git a/js/src/jsapi.h b/js/src/jsapi.h index b3689e991ba..42be4e28266 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -2101,7 +2101,7 @@ JS_InitStandardClasses(JSContext *cx, JSObject *obj); * loops any classes not yet resolved lazily. */ extern JS_PUBLIC_API(JSBool) -JS_ResolveStandardClass(JSContext *cx, JSObject *obj, jsid id, +JS_ResolveStandardClass(JSContext *cx, JS::HandleObject obj, JS::HandleId id, JSBool *resolved); extern JS_PUBLIC_API(JSBool) diff --git a/js/xpconnect/src/XPCComponents.cpp b/js/xpconnect/src/XPCComponents.cpp index 47dd8ab674e..58a368d3d7c 100644 --- a/js/xpconnect/src/XPCComponents.cpp +++ b/js/xpconnect/src/XPCComponents.cpp @@ -2942,7 +2942,7 @@ sandbox_enumerate(JSContext *cx, JSHandleObject obj) } static JSBool -sandbox_resolve(JSContext *cx, JSHandleObject obj, JSHandleId id) +sandbox_resolve(JSContext *cx, HandleObject obj, HandleId id) { JSBool resolved; return JS_ResolveStandardClass(cx, obj, id, &resolved); diff --git a/js/xpconnect/src/XPCJSContextStack.cpp b/js/xpconnect/src/XPCJSContextStack.cpp index 031857684ba..602b4c13319 100644 --- a/js/xpconnect/src/XPCJSContextStack.cpp +++ b/js/xpconnect/src/XPCJSContextStack.cpp @@ -105,7 +105,7 @@ XPCJSContextStack::HasJSContext(JSContext *cx) } static JSBool -SafeGlobalResolve(JSContext *cx, JSHandleObject obj, JSHandleId id) +SafeGlobalResolve(JSContext *cx, HandleObject obj, HandleId id) { JSBool resolved; return JS_ResolveStandardClass(cx, obj, id, &resolved);