Backed out changeset e602cb65a030 (bug 1142816) for jsapi test segfaults.
authorRyan VanderMeulen <ryanvm@gmail.com>
Fri, 22 May 2015 10:47:29 -0400
changeset 266263 a7e851e4c2d2c86181af38debf33d82bce17394d
parent 266262 affd6aa563ca6a1a0083dfb655e0c5e855ee653c
child 266264 a69094e0f2a47486a85c9d65a6ef3cd7693c1789
child 267353 00c2e00e3c37d714a371e9571c033f80bfe0ad80
push id2231
push usermichael.l.comella@gmail.com
push dateFri, 22 May 2015 20:04:59 +0000
bugs1142816
milestone41.0a1
backs oute602cb65a030c19fecfa912be51f92fc0160d70f
Backed out changeset e602cb65a030 (bug 1142816) for jsapi test segfaults. CLOSED TREE
js/src/jsapi-tests/testGCHeapPostBarriers.cpp
--- a/js/src/jsapi-tests/testGCHeapPostBarriers.cpp
+++ b/js/src/jsapi-tests/testGCHeapPostBarriers.cpp
@@ -3,18 +3,16 @@
 */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "js/RootingAPI.h"
 #include "jsapi-tests/tests.h"
 
-using mozilla::ScopedDeletePtr;
-
 BEGIN_TEST(testGCHeapPostBarriers)
 {
 #ifdef JS_GC_ZEAL
     AutoLeaveZeal nozeal(cx);
 #endif /* JS_GC_ZEAL */
 
     /* Sanity check - objects start in the nursery and then become tenured. */
     JS_GC(cx->runtime());
@@ -41,18 +39,18 @@ Passthrough(bool value)
 template <typename T>
 bool
 TestHeapPostBarriers(T initialObj)
 {
     CHECK(initialObj != nullptr);
     CHECK(js::gc::IsInsideNursery(initialObj));
 
     /* Construct Heap<> wrapper. */
-    ScopedDeletePtr<JS::Heap<T>> heapData(new JS::Heap<T>);
-    CHECK(heapData.get());
+    JS::Heap<T>* heapData = new JS::Heap<T>();
+    CHECK(heapData);
     CHECK(Passthrough(heapData->get() == nullptr));
     *heapData = initialObj;
 
     /* Store the pointer as an integer so that the hazard analysis will miss it. */
     uintptr_t initialObjAsInt = uintptr_t(initialObj);
 
     /* Perform minor GC and check heap wrapper is udated with new pointer. */
     cx->minorGC(JS::gcreason::API);