mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1210554 - Fix unified build breakage. r=sfink
This commit is contained in:
parent
81957d8bcb
commit
a971a298d8
@ -9,6 +9,7 @@
|
||||
|
||||
#include "mozilla/Move.h"
|
||||
|
||||
#include "js/Utility.h"
|
||||
#include "js/Vector.h"
|
||||
|
||||
namespace js {
|
||||
|
@ -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,
|
||||
|
@ -12,6 +12,8 @@
|
||||
|
||||
#include "jsapi-tests/tests.h"
|
||||
|
||||
using namespace js;
|
||||
|
||||
BEGIN_TEST(testGCExactRooting)
|
||||
{
|
||||
JS::RootedObject rootCx(cx, JS_NewPlainObject(cx));
|
||||
|
@ -8,6 +8,8 @@
|
||||
#include "gc/GCInternals.h"
|
||||
#include "gc/Zone.h"
|
||||
|
||||
#include "jsapi-tests/tests.h"
|
||||
|
||||
static void
|
||||
MinimizeHeap(JSRuntime* rt)
|
||||
{
|
||||
|
@ -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);
|
||||
|
@ -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());
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user