Bug 1057601 - Use UncheckedUnwrap in CPOW code (r=mrbkap)
authorBill McCloskey <wmccloskey@mozilla.com>
Fri, 22 Aug 2014 18:18:00 -0700
changeset 222914 184bbe9eacf4b6c60ecbdc8baf5fece63b111b75
parent 222913 2dd8e4e95c55256c0c65be8a24b5c9bd3cb87261
child 222915 bf2bf138571c10690583eb6e14d780adb1bbb205
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs1057601
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1057601 - Use UncheckedUnwrap in CPOW code (r=mrbkap)
js/ipc/WrapperOwner.cpp
--- a/js/ipc/WrapperOwner.cpp
+++ b/js/ipc/WrapperOwner.cpp
@@ -674,17 +674,17 @@ bool
 IsCPOW(JSObject *obj)
 {
     return IsProxy(obj) && GetProxyHandler(obj) == &CPOWProxyHandler::singleton;
 }
 
 bool
 IsWrappedCPOW(JSObject *obj)
 {
-    JSObject *unwrapped = js::CheckedUnwrap(obj, true);
+    JSObject *unwrapped = js::UncheckedUnwrap(obj, true);
     if (!unwrapped)
         return false;
     return IsCPOW(unwrapped);
 }
 
 nsresult
 InstanceOf(JSObject *proxy, const nsID *id, bool *bp)
 {
@@ -770,17 +770,17 @@ WrapperOwner::toObjectVariant(JSContext 
 {
     RootedObject obj(cx, objArg);
     JS_ASSERT(obj);
 
     // We always save objects unwrapped in the CPOW table. If we stored
     // wrappers, then the wrapper might be GCed while the target remained alive.
     // Whenever operating on an object that comes from the table, we wrap it
     // in findObjectById.
-    obj = js::CheckedUnwrap(obj, false);
+    obj = js::UncheckedUnwrap(obj, false);
     if (obj && IsCPOW(obj) && OwnerOf(obj) == this) {
         *objVarp = LocalObject(idOf(obj));
         return true;
     }
 
     ObjectId id = objectIds_.find(obj);
     if (id) {
         *objVarp = RemoteObject(id);