Bug 1210554 - Fix unified build breakage. r=sfink

This commit is contained in:
Jakob Olesen 2015-11-23 15:28:46 -08:00
parent 81957d8bcb
commit a971a298d8
7 changed files with 21 additions and 4 deletions

View File

@ -9,6 +9,7 @@
#include "mozilla/Move.h"
#include "js/Utility.h"
#include "js/Vector.h"
namespace js {

View File

@ -2,10 +2,15 @@
* 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,

View File

@ -12,6 +12,8 @@
#include "jsapi-tests/tests.h"
using namespace js;
BEGIN_TEST(testGCExactRooting)
{
JS::RootedObject rootCx(cx, JS_NewPlainObject(cx));

View File

@ -8,6 +8,8 @@
#include "gc/GCInternals.h"
#include "gc/Zone.h"
#include "jsapi-tests/tests.h"
static void
MinimizeHeap(JSRuntime* rt)
{

View File

@ -8,6 +8,8 @@
#include "gc/Barrier.h"
#include "js/RootingAPI.h"
#include "jsapi-tests/tests.h"
struct MyHeap : JS::Traceable
{
explicit MyHeap(JSObject* obj) : weak(obj) {}
@ -27,7 +29,7 @@ BEGIN_TEST(testGCWeakRef)
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);
@ -37,7 +39,7 @@ BEGIN_TEST(testGCWeakRef)
// 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);
@ -46,7 +48,7 @@ BEGIN_TEST(testGCWeakRef)
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);

View File

@ -2,10 +2,13 @@
* 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());

View File

@ -5,6 +5,8 @@
* 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"
@ -85,7 +87,7 @@ BEGIN_TEST(testWeakMap_keyDelegates)
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;