Bug 1252075 - use UniquePtr instead of ScopedDeletePtr in testGCHeapPostBarriers; r=terrence
authorNathan Froyd <froydnj@mozilla.com>
Mon, 29 Feb 2016 09:37:27 -0500
changeset 322456 65a12991543fac6bd8b8595161ed0ea3f1053f26
parent 322455 06a4d2d48fb2cdb90d93a942808eae19190d5d60
child 322457 2a613f5a58663485f3c20b18a9fc867a09bc532a
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence
bugs1252075
milestone47.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 1252075 - use UniquePtr instead of ScopedDeletePtr in testGCHeapPostBarriers; r=terrence
js/src/jsapi-tests/testGCHeapPostBarriers.cpp
--- a/js/src/jsapi-tests/testGCHeapPostBarriers.cpp
+++ b/js/src/jsapi-tests/testGCHeapPostBarriers.cpp
@@ -3,17 +3,17 @@
 */
 /* 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;
+using mozilla::MakeUnique;
 
 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. */
@@ -41,17 +41,17 @@ 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>);
+    auto heapData = MakeUnique<JS::Heap<T>>();
     CHECK(heapData.get());
     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. */