Bug 1210554 - Fix unified build breakage. r=sfink
authorJakob Olesen <jolesen@mozilla.com>
Mon, 23 Nov 2015 15:28:46 -0800
changeset 273827 f5efa2ed37acca9e0dc14e9518b5a5f69f97fea2
parent 273826 536455795509134faa9321924793a189c63ba104
child 273828 cbb4146343f329f12e70770445a65cf42aa0853a
push id68407
push userjolesen@mozilla.com
push dateMon, 23 Nov 2015 23:29:11 +0000
treeherdermozilla-inbound@355ed0ade977 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1210554
milestone45.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 1210554 - Fix unified build breakage. r=sfink
js/src/ds/Fifo.h
js/src/jsapi-tests/testArrayBufferView.cpp
js/src/jsapi-tests/testGCExactRooting.cpp
js/src/jsapi-tests/testGCUniqueId.cpp
js/src/jsapi-tests/testGCWeakRef.cpp
js/src/jsapi-tests/testStructuredClone.cpp
js/src/jsapi-tests/testWeakMap.cpp
--- a/js/src/ds/Fifo.h
+++ b/js/src/ds/Fifo.h
@@ -4,16 +4,17 @@
  * 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/. */
 
 #ifndef js_Fifo_h
 #define js_Fifo_h
 
 #include "mozilla/Move.h"
 
+#include "js/Utility.h"
 #include "js/Vector.h"
 
 namespace js {
 
 // A first-in-first-out queue container type. Fifo calls constructors and
 // destructors of all elements added so non-PODs may be used safely. |Fifo|
 // stores the first |MinInlineCapacity| elements in-place before resorting to
 // dynamic allocation.
--- a/js/src/jsapi-tests/testArrayBufferView.cpp
+++ b/js/src/jsapi-tests/testArrayBufferView.cpp
@@ -1,16 +1,21 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  * vim: set ts=8 sts=4 et sw=4 tw=99:
  */
 
+#include "jscompartment.h"
 #include "jsfriendapi.h"
 
 #include "jsapi-tests/tests.h"
 
+#include "jscompartmentinlines.h"
+
+using namespace js;
+
 BEGIN_TEST(testArrayBufferView_type)
 {
     CHECK((TestViewType<uint8_t,
                         Create<JS_NewUint8Array, 7>,
                         JS_GetObjectAsUint8Array,
                         js::Scalar::Uint8,
                         7, 7>(cx)));
 
--- a/js/src/jsapi-tests/testGCExactRooting.cpp
+++ b/js/src/jsapi-tests/testGCExactRooting.cpp
@@ -7,16 +7,18 @@
 
 #include "ds/TraceableFifo.h"
 #include "js/GCHashTable.h"
 #include "js/RootingAPI.h"
 #include "js/TraceableVector.h"
 
 #include "jsapi-tests/tests.h"
 
+using namespace js;
+
 BEGIN_TEST(testGCExactRooting)
 {
     JS::RootedObject rootCx(cx, JS_NewPlainObject(cx));
     JS::RootedObject rootRt(cx->runtime(), JS_NewPlainObject(cx));
 
     JS_GC(cx->runtime());
 
     /* Use the objects we just created to ensure that they are still alive. */
--- a/js/src/jsapi-tests/testGCUniqueId.cpp
+++ b/js/src/jsapi-tests/testGCUniqueId.cpp
@@ -3,16 +3,18 @@
 */
 /* 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 "gc/GCInternals.h"
 #include "gc/Zone.h"
 
+#include "jsapi-tests/tests.h"
+
 static void
 MinimizeHeap(JSRuntime* rt)
 {
     // The second collection is to force us to wait for the background
     // sweeping that the first GC started to finish.
     JS_GC(rt);
     JS_GC(rt);
     js::gc::AutoFinishGC finish(rt);
--- a/js/src/jsapi-tests/testGCWeakRef.cpp
+++ b/js/src/jsapi-tests/testGCWeakRef.cpp
@@ -3,16 +3,18 @@
 */
 /* 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 "gc/Barrier.h"
 #include "js/RootingAPI.h"
 
+#include "jsapi-tests/tests.h"
+
 struct MyHeap : JS::Traceable
 {
     explicit MyHeap(JSObject* obj) : weak(obj) {}
     js::WeakRef<JSObject*> weak;
 
     static void trace(MyHeap* self, JSTracer* trc) {
         js::TraceWeakEdge(trc, &self->weak, "weak");
     }
@@ -22,36 +24,36 @@ BEGIN_TEST(testGCWeakRef)
 {
     // Create an object and add a property to it so that we can read the
     // property back later to verify that object internals are not garbage.
     JS::RootedObject obj(cx, JS_NewPlainObject(cx));
     CHECK(obj);
     CHECK(JS_DefineProperty(cx, obj, "x", 42, 0));
 
     // Store the object behind a weak pointer and remove other references.
-    Rooted<MyHeap> heap(cx, MyHeap(obj));
+    JS::Rooted<MyHeap> heap(cx, MyHeap(obj));
     obj = nullptr;
 
     rt->gc.minorGC(JS::gcreason::API);
 
     // The minor collection should have treated the weak ref as a strong ref,
     // so the object should still be live, despite not having any other live
     // references.
     CHECK(heap.get().weak.unbarrieredGet() != nullptr);
     obj = heap.get().weak;
-    RootedValue v(cx);
+    JS::RootedValue v(cx);
     CHECK(JS_GetProperty(cx, obj, "x", &v));
     CHECK(v.isInt32());
     CHECK(v.toInt32() == 42);
 
     // A full collection with a second ref should keep the object as well.
     CHECK(obj == heap.get().weak);
     JS_GC(rt);
     CHECK(obj == heap.get().weak);
-    v = UndefinedValue();
+    v = JS::UndefinedValue();
     CHECK(JS_GetProperty(cx, obj, "x", &v));
     CHECK(v.isInt32());
     CHECK(v.toInt32() == 42);
 
     // A full collection after nulling the root should collect the object, or
     // at least null out the weak reference before returning to the mutator.
     obj = nullptr;
     JS_GC(rt);
--- a/js/src/jsapi-tests/testStructuredClone.cpp
+++ b/js/src/jsapi-tests/testStructuredClone.cpp
@@ -1,16 +1,19 @@
 /* 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 "builtin/TestingFunctions.h"
 #include "js/StructuredClone.h"
 
 #include "jsapi-tests/tests.h"
 
+using namespace js;
+
 BEGIN_TEST(testStructuredClone_object)
 {
     JS::RootedObject g1(cx, createGlobal());
     JS::RootedObject g2(cx, createGlobal());
     CHECK(g1);
     CHECK(g2);
 
     JS::RootedValue v1(cx);
--- a/js/src/jsapi-tests/testWeakMap.cpp
+++ b/js/src/jsapi-tests/testWeakMap.cpp
@@ -1,15 +1,17 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 * vim: set ts=8 sts=4 et sw=4 tw=99:
 */
 /* 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 "jscompartment.h"
+
 #include "gc/Zone.h"
 
 #include "jsapi-tests/tests.h"
 
 JSObject* keyDelegate = nullptr;
 
 BEGIN_TEST(testWeakMap_basicOperations)
 {
@@ -80,17 +82,17 @@ BEGIN_TEST(testWeakMap_keyDelegates)
     CHECK(delegate);
     keyDelegate = delegate;
 
     JS::RootedObject delegateRoot(cx);
     {
         JSAutoCompartment ac(cx, delegate);
         delegateRoot = JS_NewPlainObject(cx);
         CHECK(delegateRoot);
-        JS::RootedValue delegateValue(cx, ObjectValue(*delegate));
+        JS::RootedValue delegateValue(cx, JS::ObjectValue(*delegate));
         CHECK(JS_DefineProperty(cx, delegateRoot, "delegate", delegateValue, 0));
     }
     delegate = nullptr;
 
     /*
      * Perform an incremental GC, introducing an unmarked CCW to force the map
      * zone to finish marking before the delegate zone.
      */