author | Jan de Mooij <jdemooij@mozilla.com> |
Fri, 27 May 2016 17:58:05 +0200 | |
changeset 340370 | b1a9f082d0ae4a34f63f27202ff8c146bd38a54c |
parent 340369 | d835e1ad42221c0d52aa434c8efdcc06d17813cd |
child 340371 | f4e2f8a9df189af509d9b78c0918731e26fd6248 |
push id | 1183 |
push user | raliiev@mozilla.com |
push date | Mon, 05 Sep 2016 20:01:49 +0000 |
treeherder | mozilla-release@3148731bed45 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | luke |
bugs | 979730 |
milestone | 49.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
|
--- a/js/src/jsapi-tests/testChromeBuffer.cpp +++ b/js/src/jsapi-tests/testChromeBuffer.cpp @@ -32,26 +32,22 @@ static const JSClass global_class = { static JS::PersistentRootedObject trusted_glob; static JS::PersistentRootedObject trusted_fun; static bool CallTrusted(JSContext* cx, unsigned argc, JS::Value* vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (!JS_SaveFrameChain(cx)) - return false; - bool ok = false; { JSAutoCompartment ac(cx, trusted_glob); JS::RootedValue funVal(cx, JS::ObjectValue(*trusted_fun)); ok = JS_CallFunctionValue(cx, nullptr, funVal, JS::HandleValueArray::empty(), args.rval()); } - JS_RestoreFrameChain(cx); return ok; } BEGIN_TEST(testChromeBuffer) { JS_SetTrustedPrincipals(rt, &system_principals); JS::CompartmentOptions options; @@ -154,20 +150,16 @@ BEGIN_TEST(testChromeBuffer) JS::RootedValue rval(cx); 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); } - /* - * Check that JS_SaveFrameChain called on the way from content to chrome - * (say, as done by XPCJSContextSTack::Push) works. - */ { { JSAutoCompartment ac(cx, trusted_glob); const char* bytes = "return 42"; JS::CompileOptions options(cx); options.setFileAndLine("", 0); JS::AutoObjectVector emptyScopeChain(cx); CHECK(JS::CompileFunction(cx, emptyScopeChain, options, "trusted",