Backed out changeset 8adc00c59534 (bug 1369712) for crashes in xpcshell tests on Linux and OS X, e.g. in test_captive_portal_not_found.js @ JS::HeapObjectPostBarrier. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Tue, 06 Jun 2017 15:30:02 +0200
changeset 410693 5df249f4aee1e3b33de2f4822d47b49839eb922a
parent 410692 ee3c032059e517cf3d25b80c835dc45e2711b504
child 410694 028a9e5e1355fb2a099f32200c09fb2d9b7e8ec4
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1369712
milestone55.0a1
backs out8adc00c59534ca1ad6c30908d1e166c679bcf4fc
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
Backed out changeset 8adc00c59534 (bug 1369712) for crashes in xpcshell tests on Linux and OS X, e.g. in test_captive_portal_not_found.js @ JS::HeapObjectPostBarrier. r=backout
js/src/jsapi.cpp
js/src/jsgc.cpp
xpcom/base/CycleCollectedJSRuntime.cpp
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -1325,17 +1325,17 @@ JS_PUBLIC_API(bool)
 JS_AddExtraGCRootsTracer(JSContext* cx, JSTraceDataOp traceOp, void* data)
 {
     return cx->runtime()->gc.addBlackRootsTracer(traceOp, data);
 }
 
 JS_PUBLIC_API(void)
 JS_RemoveExtraGCRootsTracer(JSContext* cx, JSTraceDataOp traceOp, void* data)
 {
-    cx->runtime()->gc.removeBlackRootsTracer(traceOp, data);
+    return cx->runtime()->gc.removeBlackRootsTracer(traceOp, data);
 }
 
 JS_PUBLIC_API(void)
 JS_GC(JSContext* cx)
 {
     AssertHeapIsIdle();
     JS::PrepareForFullGC(cx);
     cx->runtime()->gc.gc(GC_NORMAL, JS::gcreason::API);
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -1431,26 +1431,22 @@ GCRuntime::addBlackRootsTracer(JSTraceDa
     AssertHeapIsIdle();
     return !!blackRootTracers.ref().append(Callback<JSTraceDataOp>(traceOp, data));
 }
 
 void
 GCRuntime::removeBlackRootsTracer(JSTraceDataOp traceOp, void* data)
 {
     // Can be called from finalizers
-    mozilla::DebugOnly<bool> removed = false;
     for (size_t i = 0; i < blackRootTracers.ref().length(); i++) {
         Callback<JSTraceDataOp>* e = &blackRootTracers.ref()[i];
         if (e->op == traceOp && e->data == data) {
             blackRootTracers.ref().erase(e);
-            removed = true;
-            break;
         }
     }
-    MOZ_ASSERT(removed);
 }
 
 void
 GCRuntime::setGrayRootsTracer(JSTraceDataOp traceOp, void* data)
 {
     AssertHeapIsIdle();
     grayRootTracer.op = traceOp;
     grayRootTracer.data = data;
--- a/xpcom/base/CycleCollectedJSRuntime.cpp
+++ b/xpcom/base/CycleCollectedJSRuntime.cpp
@@ -552,17 +552,17 @@ CycleCollectedJSRuntime::CycleCollectedJ
 
   JS::dbg::SetDebuggerMallocSizeOf(aCx, moz_malloc_size_of);
 }
 
 void
 CycleCollectedJSRuntime::Shutdown(JSContext* cx)
 {
   JS_RemoveExtraGCRootsTracer(cx, TraceBlackJS, this);
-  JS_SetGrayGCRootsTracer(cx, nullptr, nullptr);
+  JS_RemoveExtraGCRootsTracer(cx, TraceGrayJS, this);
 }
 
 CycleCollectedJSRuntime::~CycleCollectedJSRuntime()
 {
   MOZ_COUNT_DTOR(CycleCollectedJSRuntime);
   MOZ_ASSERT(!mDeferredFinalizerTable.Count());
 }