Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Unified Diff: test/cctest/test-api.cc

Issue 1909433003: Remove support for Object.observe (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/Generators.golden ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 86dcb9e9546d976e0f1f6efed54bbe4a5dc7edd7..86a2ddd9cdf932f55355d376753a4dab6afedf67 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -9046,33 +9046,6 @@ TEST(ApiUncaughtException) {
}
-TEST(ApiUncaughtExceptionInObjectObserve) {
- v8::internal::FLAG_harmony_object_observe = true;
- v8::internal::FLAG_stack_size = 150;
- report_count = 0;
- LocalContext env;
- v8::Isolate* isolate = env->GetIsolate();
- v8::HandleScope scope(isolate);
- isolate->AddMessageListener(ApiUncaughtExceptionTestListener);
- CompileRun(
- "var obj = {};"
- "var observe_count = 0;"
- "function observer1() { ++observe_count; };"
- "function observer2() { ++observe_count; };"
- "function observer_throws() { throw new Error(); };"
- "function stack_overflow() { return (function f(x) { f(x+1); })(0); };"
- "Object.observe(obj, observer_throws.bind());"
- "Object.observe(obj, observer1);"
- "Object.observe(obj, stack_overflow);"
- "Object.observe(obj, observer2);"
- "Object.observe(obj, observer_throws.bind());"
- "obj.foo = 'bar';");
- CHECK_EQ(3, report_count);
- ExpectInt32("observe_count", 2);
- isolate->RemoveMessageListeners(ApiUncaughtExceptionTestListener);
-}
-
-
static const char* script_resource_name = "ExceptionInNativeScript.js";
static void ExceptionInNativeScriptTestListener(v8::Local<v8::Message> message,
v8::Local<Value>) {
@@ -21278,40 +21251,6 @@ TEST(ScopedMicrotasks) {
}
-static void DebugEventInObserver(const v8::Debug::EventDetails& event_details) {
- v8::DebugEvent event = event_details.GetEvent();
- if (event != v8::Break) return;
- Local<Object> exec_state = event_details.GetExecutionState();
- Local<Context> context = CcTest::isolate()->GetCurrentContext();
- Local<Value> break_id =
- exec_state->Get(context, v8_str("break_id")).ToLocalChecked();
- CompileRun("function f(id) { new FrameDetails(id, 0); }");
- Local<Function> fun = Local<Function>::Cast(
- CcTest::global()->Get(context, v8_str("f")).ToLocalChecked());
- fun->Call(context, CcTest::global(), 1, &break_id).ToLocalChecked();
-}
-
-
-TEST(Regress385349) {
- i::FLAG_harmony_object_observe = true;
- i::FLAG_allow_natives_syntax = true;
- v8::Isolate* isolate = CcTest::isolate();
- HandleScope handle_scope(isolate);
- isolate->SetMicrotasksPolicy(v8::MicrotasksPolicy::kExplicit);
- Local<Context> context = Context::New(isolate);
- v8::Debug::SetDebugEventListener(isolate, DebugEventInObserver);
- {
- Context::Scope context_scope(context);
- CompileRun("var obj = {};"
- "Object.observe(obj, function(changes) { debugger; });"
- "obj.a = 0;");
- }
- isolate->RunMicrotasks();
- isolate->SetMicrotasksPolicy(v8::MicrotasksPolicy::kAuto);
- v8::Debug::SetDebugEventListener(isolate, nullptr);
-}
-
-
#ifdef ENABLE_DISASSEMBLER
static int probes_counter = 0;
static int misses_counter = 0;
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/Generators.golden ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698