From 34828570d298a402b6964cdfa99521c74c507faa Mon Sep 17 00:00:00 2001 From: tsergeant Date: Wed, 9 Mar 2016 22:20:44 -0800 Subject: Revert of Use v8::MicrotasksScope internally in V8RecursionScope. (patchset #6 id:100001 of https://codereview.chromium.org/1743763004/ ) Reason for revert: This CL appears to be causing test failures on Linux ChromiumOS Tests (dbg)(1). See: https://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%28dbg%29%281%29/builds/12424 Tests are failing with: Fatal error in ../../v8/src/api.cc, line 166 Check failed: handle_scope_implementer->GetMicrotasksScopeDepth() || !handle_scope_implementer->DebugMicrotasksScopeDepthIsZero() Original issue's description: > Use v8::MicrotasksScope internally in V8RecursionScope. > > If this sticks we can just remove V8RecursionScope and WebScopedMicrotaskSuppression, > along with other cleanups. > > Attempt #2. Previous one broke GinJavaBridgeValueConverterTest.TypedArrays. > > BUG=585949 > > Committed: https://crrev.com/95a3bd544fe93629b209797d3251423f3d674463 > Cr-Commit-Position: refs/heads/master@{#380033} TBR=jochen@chromium.org,adamk@chromium.org,dgozman@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=585949 Review URL: https://codereview.chromium.org/1777183002 Cr-Commit-Position: refs/heads/master@{#380356} --- extensions/renderer/activity_log_converter_strategy_unittest.cc | 2 -- extensions/renderer/api_test_base.cc | 2 +- extensions/renderer/module_system_test.cc | 2 +- extensions/renderer/safe_builtins.cc | 2 -- 4 files changed, 2 insertions(+), 6 deletions(-) (limited to 'extensions/renderer') diff --git a/extensions/renderer/activity_log_converter_strategy_unittest.cc b/extensions/renderer/activity_log_converter_strategy_unittest.cc index aa80447..9237cad 100644 --- a/extensions/renderer/activity_log_converter_strategy_unittest.cc +++ b/extensions/renderer/activity_log_converter_strategy_unittest.cc @@ -6,7 +6,6 @@ #include "base/values.h" #include "extensions/renderer/activity_log_converter_strategy.h" #include "testing/gtest/include/gtest/gtest.h" -#include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h" #include "v8/include/v8.h" using content::V8ValueConverter; @@ -123,7 +122,6 @@ TEST_F(ActivityLogConverterStrategyTest, ConversionTest) { "};" "})();"; - blink::WebScopedMicrotaskSuppression microtasks_scope; v8::Local script( v8::Script::Compile(v8::String::NewFromUtf8(isolate_, source))); v8::Local v8_object = script->Run().As(); diff --git a/extensions/renderer/api_test_base.cc b/extensions/renderer/api_test_base.cc index 79f95e2..abf868b 100644 --- a/extensions/renderer/api_test_base.cc +++ b/extensions/renderer/api_test_base.cc @@ -214,7 +214,7 @@ void ApiTestEnvironment::RunTestInner(const std::string& test_name, } void ApiTestEnvironment::RunPromisesAgain() { - v8::MicrotasksScope::PerformCheckpoint(env()->isolate()); + env()->isolate()->RunMicrotasks(); base::MessageLoop::current()->PostTask( FROM_HERE, base::Bind(&ApiTestEnvironment::RunPromisesAgain, base::Unretained(this))); diff --git a/extensions/renderer/module_system_test.cc b/extensions/renderer/module_system_test.cc index 06a4d55..68c4bd1 100644 --- a/extensions/renderer/module_system_test.cc +++ b/extensions/renderer/module_system_test.cc @@ -253,7 +253,7 @@ void ModuleSystemTest::ExpectNoAssertionsMade() { } void ModuleSystemTest::RunResolvedPromises() { - v8::MicrotasksScope::PerformCheckpoint(isolate_); + isolate_->RunMicrotasks(); } } // namespace extensions diff --git a/extensions/renderer/safe_builtins.cc b/extensions/renderer/safe_builtins.cc index 3a66eaf..3bfa01a 100644 --- a/extensions/renderer/safe_builtins.cc +++ b/extensions/renderer/safe_builtins.cc @@ -9,7 +9,6 @@ #include "base/strings/stringprintf.h" #include "extensions/renderer/script_context.h" #include "extensions/renderer/v8_helpers.h" -#include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h" namespace extensions { @@ -201,7 +200,6 @@ class ExtensionImpl : public v8::Extension { return; } - blink::WebScopedMicrotaskSuppression microtasks_scope; v8::Local return_value; if (function->Call(context, recv, argc, argv.get()).ToLocal(&return_value)) info.GetReturnValue().Set(return_value); -- cgit v1.1