Bug 784739 - Switch from NULL to nullptr in js/ductwork/, js/ipc/, and js/public/; r=ehsan

This commit is contained in:
Birunthan Mohanathas
2013-09-19 15:24:53 -04:00
parent 5db97459fa
commit 49598e3eb0
16 changed files with 89 additions and 69 deletions

View File

@@ -484,7 +484,7 @@ JavaScriptParent::className(JSContext *cx, HandleObject proxy)
nsString name;
if (!CallClassName(objId, &name))
return NULL;
return nullptr;
return ToNewCString(name);
}
@@ -557,13 +557,13 @@ JavaScriptParent::unwrap(JSContext *cx, ObjectId objId)
RootedObject obj(cx, findObject(objId));
if (obj) {
if (!JS_WrapObject(cx, obj.address()))
return NULL;
return nullptr;
return obj;
}
if (objId > MAX_CPOW_IDS) {
JS_ReportError(cx, "unusable CPOW id");
return NULL;
return nullptr;
}
bool callable = !!(objId & OBJECT_IS_CALLABLE);
@@ -574,14 +574,14 @@ JavaScriptParent::unwrap(JSContext *cx, ObjectId objId)
obj = NewProxyObject(cx,
&CPOWProxyHandler::singleton,
v,
NULL,
nullptr,
global,
callable ? ProxyIsCallable : ProxyNotCallable);
if (!obj)
return NULL;
return nullptr;
if (!objects_.add(objId, obj))
return NULL;
return nullptr;
// Incref once we know the decref will be called.
incref();