Bug 979730 part 3 - Remove JS_SaveFrameChain from testChromeBuffer jsapi-test. r=luke
authorJan de Mooij <jdemooij@mozilla.com>
Fri, 27 May 2016 17:58:05 +0200
changeset 338357 b1a9f082d0ae4a34f63f27202ff8c146bd38a54c
parent 338356 d835e1ad42221c0d52aa434c8efdcc06d17813cd
child 338358 f4e2f8a9df189af509d9b78c0918731e26fd6248
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs979730
milestone49.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 979730 part 3 - Remove JS_SaveFrameChain from testChromeBuffer jsapi-test. r=luke
js/src/jsapi-tests/testChromeBuffer.cpp
--- 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",