Bug 1164602 - Replace js::NullPtr and JS::NullPtr with nullptr_t; r=sfink

This commit is contained in:
Terrence Cole
2015-05-13 14:07:34 -07:00
parent c350c5f526
commit 3ffd505617
106 changed files with 304 additions and 346 deletions

View File

@@ -41,7 +41,7 @@ CallTrusted(JSContext* cx, unsigned argc, jsval* vp)
{
JSAutoCompartment ac(cx, trusted_glob);
JS::RootedValue funVal(cx, JS::ObjectValue(*trusted_fun));
ok = JS_CallFunctionValue(cx, JS::NullPtr(), funVal, JS::HandleValueArray::empty(), args.rval());
ok = JS_CallFunctionValue(cx, nullptr, funVal, JS::HandleValueArray::empty(), args.rval());
}
JS_RestoreFrameChain(cx);
return ok;
@@ -100,7 +100,7 @@ BEGIN_TEST(testChromeBuffer)
CHECK(JS_DefineProperty(cx, global, "untrusted", fun, JSPROP_ENUMERATE));
JS::RootedValue rval(cx);
CHECK(JS_CallFunction(cx, JS::NullPtr(), fun, JS::HandleValueArray(v), &rval));
CHECK(JS_CallFunction(cx, nullptr, fun, JS::HandleValueArray(v), &rval));
CHECK(rval.toInt32() == 100);
JS::RuntimeOptionsRef(rt) = oldOptions;
}
@@ -149,7 +149,7 @@ BEGIN_TEST(testChromeBuffer)
CHECK(JS_DefineProperty(cx, global, "untrusted", fun, JSPROP_ENUMERATE));
JS::RootedValue rval(cx);
CHECK(JS_CallFunction(cx, JS::NullPtr(), fun, JS::HandleValueArray(v), &rval));
CHECK(JS_CallFunction(cx, nullptr, fun, JS::HandleValueArray(v), &rval));
bool match;
CHECK(JS_StringEqualsAscii(cx, rval.toString(), "From trusted: InternalError: too much recursion", &match));
CHECK(match);
@@ -190,7 +190,7 @@ BEGIN_TEST(testChromeBuffer)
JS::RootedValue arg(cx, JS::ObjectValue(*callTrusted));
JS::RootedValue rval(cx);
CHECK(JS_CallFunction(cx, JS::NullPtr(), fun, JS::HandleValueArray(arg), &rval));
CHECK(JS_CallFunction(cx, nullptr, fun, JS::HandleValueArray(arg), &rval));
CHECK(rval.toInt32() == 42);
}