Bug 980180 - remove principals as an argument to compilation, part 1 (r=terrence)
This commit is contained in:
@@ -65,8 +65,7 @@ BEGIN_TEST(testChromeBuffer)
|
||||
const char *bytes = "return x ? 1 + trusted(x-1) : 0";
|
||||
JS::HandleObject global = JS::HandleObject::fromMarkedLocation(&trusted_glob);
|
||||
JS::CompileOptions options(cx);
|
||||
options.setFileAndLine("", 0)
|
||||
.setPrincipals(&system_principals);
|
||||
options.setFileAndLine("", 0);
|
||||
CHECK(fun = JS_CompileFunction(cx, global, "trusted", 1, ¶mName,
|
||||
bytes, strlen(bytes), options));
|
||||
trusted_fun = JS_GetFunctionObject(fun);
|
||||
@@ -112,8 +111,7 @@ BEGIN_TEST(testChromeBuffer)
|
||||
"} ";
|
||||
JS::HandleObject global = JS::HandleObject::fromMarkedLocation(&trusted_glob);
|
||||
JS::CompileOptions options(cx);
|
||||
options.setFileAndLine("", 0)
|
||||
.setPrincipals(&system_principals);
|
||||
options.setFileAndLine("", 0);
|
||||
CHECK(fun = JS_CompileFunction(cx, global, "trusted", 1, ¶mName,
|
||||
bytes, strlen(bytes), options));
|
||||
trusted_fun = JS_GetFunctionObject(fun);
|
||||
@@ -150,8 +148,7 @@ BEGIN_TEST(testChromeBuffer)
|
||||
const char *bytes = "return 42";
|
||||
JS::HandleObject global = JS::HandleObject::fromMarkedLocation(&trusted_glob);
|
||||
JS::CompileOptions options(cx);
|
||||
options.setFileAndLine("", 0)
|
||||
.setPrincipals(&system_principals);
|
||||
options.setFileAndLine("", 0);
|
||||
CHECK(fun = JS_CompileFunction(cx, global, "trusted", 0, nullptr,
|
||||
bytes, strlen(bytes), options));
|
||||
trusted_fun = JS_GetFunctionObject(fun);
|
||||
|
||||
Reference in New Issue
Block a user