Pass --harmony-object-observe in tests that depend on it
This is in preparation for turning the flag off by default. BUG=chromium:552100 LOG=n Review URL: https://codereview.chromium.org/1511293002 Cr-Commit-Position: refs/heads/master@{#32729}
This commit is contained in:
parent
caea1bbda0
commit
2f9c68cfb1
@ -8702,6 +8702,7 @@ TEST(ApiUncaughtException) {
|
||||
|
||||
|
||||
TEST(ApiUncaughtExceptionInObjectObserve) {
|
||||
v8::internal::FLAG_harmony_object_observe = true;
|
||||
v8::internal::FLAG_stack_size = 150;
|
||||
report_count = 0;
|
||||
LocalContext env;
|
||||
@ -20424,6 +20425,7 @@ static void DebugEventInObserver(const v8::Debug::EventDetails& event_details) {
|
||||
|
||||
|
||||
TEST(Regress385349) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
i::FLAG_allow_natives_syntax = true;
|
||||
v8::Isolate* isolate = CcTest::isolate();
|
||||
HandleScope handle_scope(isolate);
|
||||
|
@ -7950,6 +7950,7 @@ TEST(DebugPromiseRejectedByCallback) {
|
||||
|
||||
|
||||
TEST(DebugBreakOnExceptionInObserveCallback) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
DebugLocalContext env;
|
||||
v8::Isolate* isolate = env->GetIsolate();
|
||||
v8::HandleScope scope(isolate);
|
||||
|
@ -55,6 +55,7 @@ class HarmonyIsolate {
|
||||
|
||||
|
||||
TEST(MicrotaskDeliverySimple) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
HarmonyIsolate isolate;
|
||||
v8::HandleScope scope(isolate.GetIsolate());
|
||||
LocalContext context(isolate.GetIsolate());
|
||||
@ -100,6 +101,7 @@ TEST(MicrotaskDeliverySimple) {
|
||||
|
||||
|
||||
TEST(MicrotaskPerIsolateState) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
HarmonyIsolate isolate;
|
||||
v8::HandleScope scope(isolate.GetIsolate());
|
||||
LocalContext context1(isolate.GetIsolate());
|
||||
|
@ -39,6 +39,7 @@ inline int32_t ToInt32(v8::Local<v8::Value> value) {
|
||||
|
||||
|
||||
TEST(PerIsolateState) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
HandleScope scope(CcTest::isolate());
|
||||
LocalContext context1(CcTest::isolate());
|
||||
|
||||
@ -102,6 +103,7 @@ TEST(PerIsolateState) {
|
||||
|
||||
|
||||
TEST(EndOfMicrotaskDelivery) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
HandleScope scope(CcTest::isolate());
|
||||
LocalContext context(CcTest::isolate());
|
||||
CompileRun(
|
||||
@ -115,6 +117,7 @@ TEST(EndOfMicrotaskDelivery) {
|
||||
|
||||
|
||||
TEST(DeliveryOrdering) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
HandleScope scope(CcTest::isolate());
|
||||
LocalContext context(CcTest::isolate());
|
||||
CompileRun(
|
||||
@ -146,6 +149,7 @@ TEST(DeliveryOrdering) {
|
||||
|
||||
|
||||
TEST(DeliveryCallbackThrows) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
HandleScope scope(CcTest::isolate());
|
||||
LocalContext context(CcTest::isolate());
|
||||
CompileRun(
|
||||
@ -174,6 +178,7 @@ TEST(DeliveryCallbackThrows) {
|
||||
|
||||
|
||||
TEST(DeliveryChangesMutationInCallback) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
HandleScope scope(CcTest::isolate());
|
||||
LocalContext context(CcTest::isolate());
|
||||
CompileRun(
|
||||
@ -199,6 +204,7 @@ TEST(DeliveryChangesMutationInCallback) {
|
||||
|
||||
|
||||
TEST(DeliveryOrderingReentrant) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
HandleScope scope(CcTest::isolate());
|
||||
LocalContext context(CcTest::isolate());
|
||||
CompileRun(
|
||||
@ -230,6 +236,7 @@ TEST(DeliveryOrderingReentrant) {
|
||||
|
||||
|
||||
TEST(DeliveryOrderingDeliverChangeRecords) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
HandleScope scope(CcTest::isolate());
|
||||
LocalContext context(CcTest::isolate());
|
||||
CompileRun(
|
||||
@ -254,6 +261,7 @@ TEST(DeliveryOrderingDeliverChangeRecords) {
|
||||
|
||||
|
||||
TEST(ObjectHashTableGrowth) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
HandleScope scope(CcTest::isolate());
|
||||
// Initializing this context sets up initial hash tables.
|
||||
LocalContext context(CcTest::isolate());
|
||||
@ -349,6 +357,7 @@ static void ExpectRecords(v8::Isolate* isolate, Local<Value> records,
|
||||
arraysize(expectations))
|
||||
|
||||
TEST(APITestBasicMutation) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
v8::Isolate* v8_isolate = CcTest::isolate();
|
||||
HandleScope scope(v8_isolate);
|
||||
LocalContext context(v8_isolate);
|
||||
@ -408,6 +417,7 @@ TEST(APITestBasicMutation) {
|
||||
|
||||
|
||||
TEST(HiddenPrototypeObservation) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
v8::Isolate* v8_isolate = CcTest::isolate();
|
||||
HandleScope scope(v8_isolate);
|
||||
LocalContext context(v8_isolate);
|
||||
@ -470,6 +480,7 @@ static int NumberOfElements(i::Handle<i::JSWeakMap> map) {
|
||||
|
||||
|
||||
TEST(ObservationWeakMap) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
HandleScope scope(CcTest::isolate());
|
||||
LocalContext context(CcTest::isolate());
|
||||
CompileRun(
|
||||
@ -540,6 +551,7 @@ static int TestObserveSecurity(Local<Context> observer_context,
|
||||
|
||||
|
||||
TEST(ObserverSecurityAAA) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
v8::Isolate* isolate = CcTest::isolate();
|
||||
v8::HandleScope scope(isolate);
|
||||
v8::Local<Context> contextA = Context::New(isolate);
|
||||
@ -548,6 +560,7 @@ TEST(ObserverSecurityAAA) {
|
||||
|
||||
|
||||
TEST(ObserverSecurityA1A2A3) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
v8::Isolate* isolate = CcTest::isolate();
|
||||
v8::HandleScope scope(isolate);
|
||||
|
||||
@ -565,6 +578,7 @@ TEST(ObserverSecurityA1A2A3) {
|
||||
|
||||
|
||||
TEST(ObserverSecurityAAB) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
v8::Isolate* isolate = CcTest::isolate();
|
||||
v8::HandleScope scope(isolate);
|
||||
v8::Local<Context> contextA = Context::New(isolate);
|
||||
@ -574,6 +588,7 @@ TEST(ObserverSecurityAAB) {
|
||||
|
||||
|
||||
TEST(ObserverSecurityA1A2B) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
v8::Isolate* isolate = CcTest::isolate();
|
||||
v8::HandleScope scope(isolate);
|
||||
|
||||
@ -590,6 +605,7 @@ TEST(ObserverSecurityA1A2B) {
|
||||
|
||||
|
||||
TEST(ObserverSecurityABA) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
v8::Isolate* isolate = CcTest::isolate();
|
||||
v8::HandleScope scope(isolate);
|
||||
v8::Local<Context> contextA = Context::New(isolate);
|
||||
@ -599,6 +615,7 @@ TEST(ObserverSecurityABA) {
|
||||
|
||||
|
||||
TEST(ObserverSecurityA1BA2) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
v8::Isolate* isolate = CcTest::isolate();
|
||||
v8::HandleScope scope(isolate);
|
||||
v8::Local<Context> contextA1 = Context::New(isolate);
|
||||
@ -614,6 +631,7 @@ TEST(ObserverSecurityA1BA2) {
|
||||
|
||||
|
||||
TEST(ObserverSecurityBAA) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
v8::Isolate* isolate = CcTest::isolate();
|
||||
v8::HandleScope scope(isolate);
|
||||
v8::Local<Context> contextA = Context::New(isolate);
|
||||
@ -623,6 +641,7 @@ TEST(ObserverSecurityBAA) {
|
||||
|
||||
|
||||
TEST(ObserverSecurityBA1A2) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
v8::Isolate* isolate = CcTest::isolate();
|
||||
v8::HandleScope scope(isolate);
|
||||
v8::Local<Context> contextA1 = Context::New(isolate);
|
||||
@ -638,6 +657,7 @@ TEST(ObserverSecurityBA1A2) {
|
||||
|
||||
|
||||
TEST(ObserverSecurityNotify) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
v8::Isolate* isolate = CcTest::isolate();
|
||||
v8::HandleScope scope(isolate);
|
||||
v8::Local<Context> contextA = Context::New(isolate);
|
||||
@ -673,6 +693,7 @@ TEST(ObserverSecurityNotify) {
|
||||
|
||||
|
||||
TEST(HiddenPropertiesLeakage) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
HandleScope scope(CcTest::isolate());
|
||||
LocalContext context(CcTest::isolate());
|
||||
CompileRun("var obj = {};"
|
||||
@ -694,6 +715,7 @@ TEST(HiddenPropertiesLeakage) {
|
||||
|
||||
|
||||
TEST(GetNotifierFromOtherContext) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
HandleScope scope(CcTest::isolate());
|
||||
LocalContext context(CcTest::isolate());
|
||||
CompileRun("var obj = {};");
|
||||
@ -710,6 +732,7 @@ TEST(GetNotifierFromOtherContext) {
|
||||
|
||||
|
||||
TEST(GetNotifierFromOtherOrigin) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
HandleScope scope(CcTest::isolate());
|
||||
Local<Value> foo = v8_str("foo");
|
||||
Local<Value> bar = v8_str("bar");
|
||||
@ -730,6 +753,7 @@ TEST(GetNotifierFromOtherOrigin) {
|
||||
|
||||
|
||||
TEST(GetNotifierFromSameOrigin) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
HandleScope scope(CcTest::isolate());
|
||||
Local<Value> foo = v8_str("foo");
|
||||
LocalContext context(CcTest::isolate());
|
||||
@ -781,6 +805,7 @@ static void CheckSurvivingGlobalObjectsCount(int expected) {
|
||||
|
||||
|
||||
TEST(DontLeakContextOnObserve) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
HandleScope scope(CcTest::isolate());
|
||||
Local<Value> foo = v8_str("foo");
|
||||
LocalContext context(CcTest::isolate());
|
||||
@ -806,6 +831,7 @@ TEST(DontLeakContextOnObserve) {
|
||||
|
||||
|
||||
TEST(DontLeakContextOnGetNotifier) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
HandleScope scope(CcTest::isolate());
|
||||
Local<Value> foo = v8_str("foo");
|
||||
LocalContext context(CcTest::isolate());
|
||||
@ -829,6 +855,7 @@ TEST(DontLeakContextOnGetNotifier) {
|
||||
|
||||
|
||||
TEST(DontLeakContextOnNotifierPerformChange) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
HandleScope scope(CcTest::isolate());
|
||||
Local<Value> foo = v8_str("foo");
|
||||
LocalContext context(CcTest::isolate());
|
||||
@ -866,6 +893,7 @@ static void ObserverCallback(const FunctionCallbackInfo<Value>& args) {
|
||||
|
||||
|
||||
TEST(ObjectObserveCallsCppFunction) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
Isolate* isolate = CcTest::isolate();
|
||||
HandleScope scope(isolate);
|
||||
LocalContext context(isolate);
|
||||
@ -888,6 +916,7 @@ TEST(ObjectObserveCallsCppFunction) {
|
||||
|
||||
|
||||
TEST(ObjectObserveCallsFunctionTemplateInstance) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
Isolate* isolate = CcTest::isolate();
|
||||
HandleScope scope(isolate);
|
||||
LocalContext context(isolate);
|
||||
@ -923,6 +952,7 @@ static void AccessorSetter(Local<Name> property, Local<Value> value,
|
||||
|
||||
|
||||
TEST(APIAccessorsShouldNotNotify) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
Isolate* isolate = CcTest::isolate();
|
||||
HandleScope handle_scope(isolate);
|
||||
LocalContext context(isolate);
|
||||
@ -956,6 +986,7 @@ void MockUseCounterCallback(v8::Isolate* isolate,
|
||||
|
||||
|
||||
TEST(UseCountObjectObserve) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
i::Isolate* isolate = CcTest::i_isolate();
|
||||
i::HandleScope scope(isolate);
|
||||
LocalContext env;
|
||||
@ -983,6 +1014,7 @@ TEST(UseCountObjectObserve) {
|
||||
|
||||
|
||||
TEST(UseCountObjectGetNotifier) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
i::Isolate* isolate = CcTest::i_isolate();
|
||||
i::HandleScope scope(isolate);
|
||||
LocalContext env;
|
||||
@ -1002,6 +1034,7 @@ static bool NamedAccessCheckAlwaysAllow(Local<v8::Context> accessing_context,
|
||||
|
||||
|
||||
TEST(DisallowObserveAccessCheckedObject) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
v8::Isolate* isolate = CcTest::isolate();
|
||||
v8::HandleScope scope(isolate);
|
||||
LocalContext env;
|
||||
@ -1023,6 +1056,7 @@ TEST(DisallowObserveAccessCheckedObject) {
|
||||
|
||||
|
||||
TEST(DisallowGetNotifierAccessCheckedObject) {
|
||||
i::FLAG_harmony_object_observe = true;
|
||||
v8::Isolate* isolate = CcTest::isolate();
|
||||
v8::HandleScope scope(isolate);
|
||||
LocalContext env;
|
||||
|
@ -1,6 +1,8 @@
|
||||
// Copyright 2014 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
//
|
||||
// Flags: --harmony-object-observe
|
||||
|
||||
var records;
|
||||
function observer(r) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flags: --stack-size=100
|
||||
// Flags: --harmony-object-observe --stack-size=100
|
||||
|
||||
var a = [];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user