diff options
author | dewittj <dewittj@chromium.org> | 2016-03-15 13:49:40 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-15 20:52:45 +0000 |
commit | 0bfd25d460a1cff98f9f0573a0d6cc072ecbe359 (patch) | |
tree | 7ab48054430a4554246176f08a4d6c4045c63240 /extensions/renderer | |
parent | 04c8fd5e7c57f75262f477e6ac94e18ca76b6371 (diff) | |
download | chromium_src-0bfd25d460a1cff98f9f0573a0d6cc072ecbe359.zip chromium_src-0bfd25d460a1cff98f9f0573a0d6cc072ecbe359.tar.gz chromium_src-0bfd25d460a1cff98f9f0573a0d6cc072ecbe359.tar.bz2 |
Revert of Remove V8RecrusionScope, cleanup call sites. (patchset #8 id:140001 of https://codereview.chromium.org/1769273004/ )
Reason for revert:
Speculative revert, this patch most likely to cause browser_tests failures for Linux (https://build.chromium.org/p/chromium.linux/builders/Linux%20Tests%20%28dbg%29%281%29%2832%29/builds/26678) Windows (https://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%28dbg%29%281%29/builds/46875) and Mac
Original issue's description:
> Remove V8RecrusionScope, cleanup call sites.
>
> - blink-side usages migrated to v8::MicrotasksScope;
> - clients of WebScopedMicrotaskSuppression migrated to v8::MicrotasksScope;
> - moved Microtask.{h,cpp} to bindings/core/v8;
> - removed extra wrappers from V8DebuggerClient;
> - fixed a couple of inspector tests which relied on trace event not emitted from debugger anymore.
>
> BUG=585949
>
> Committed: https://crrev.com/133a1579d2a087acdcdd4e9247062edb0bd1e5a3
> Cr-Commit-Position: refs/heads/master@{#381103}
Also reverts https://codereview.chromium.org/1807513002/,
commit 0d194e62ee499d1310e74537aecfa5c6543b8811
Author: dgozman <dgozman@chromium.org>
Also reverts https://codereview.chromium.org/1805543002
commit 974fa818537a8d00fb3537a836db79e2539a7889
Author: dgozman <dgozman@chromium.org>
R=csharp@chromium.org
TBR=jochen@chromium.org,pfeldman@chromium.org,dgozman@chromium.org
BUG=585949,594974
NOTRY=true
Review URL: https://codereview.chromium.org/1806643002
Cr-Commit-Position: refs/heads/master@{#381305}
Diffstat (limited to 'extensions/renderer')
-rw-r--r-- | extensions/renderer/activity_log_converter_strategy_unittest.cc | 4 | ||||
-rw-r--r-- | extensions/renderer/guest_view/extensions_guest_view_container.cc | 4 | ||||
-rw-r--r-- | extensions/renderer/messaging_bindings.cc | 1 | ||||
-rw-r--r-- | extensions/renderer/module_system.cc | 1 | ||||
-rw-r--r-- | extensions/renderer/safe_builtins.cc | 4 | ||||
-rw-r--r-- | extensions/renderer/script_context.cc | 7 | ||||
-rw-r--r-- | extensions/renderer/utils_native_handler.cc | 1 | ||||
-rw-r--r-- | extensions/renderer/v8_helpers.h | 4 |
8 files changed, 14 insertions, 12 deletions
diff --git a/extensions/renderer/activity_log_converter_strategy_unittest.cc b/extensions/renderer/activity_log_converter_strategy_unittest.cc index fbb9597..aa80447 100644 --- a/extensions/renderer/activity_log_converter_strategy_unittest.cc +++ b/extensions/renderer/activity_log_converter_strategy_unittest.cc @@ -6,6 +6,7 @@ #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; @@ -122,8 +123,7 @@ TEST_F(ActivityLogConverterStrategyTest, ConversionTest) { "};" "})();"; - v8::MicrotasksScope microtasks( - isolate_, v8::MicrotasksScope::kDoNotRunMicrotasks); + blink::WebScopedMicrotaskSuppression microtasks_scope; v8::Local<v8::Script> script( v8::Script::Compile(v8::String::NewFromUtf8(isolate_, source))); v8::Local<v8::Object> v8_object = script->Run().As<v8::Object>(); diff --git a/extensions/renderer/guest_view/extensions_guest_view_container.cc b/extensions/renderer/guest_view/extensions_guest_view_container.cc index ffa3580..3fa9882 100644 --- a/extensions/renderer/guest_view/extensions_guest_view_container.cc +++ b/extensions/renderer/guest_view/extensions_guest_view_container.cc @@ -5,6 +5,7 @@ #include "extensions/renderer/guest_view/extensions_guest_view_container.h" #include "content/public/renderer/render_frame.h" +#include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h" #include "ui/gfx/geometry/size.h" namespace extensions { @@ -55,8 +56,7 @@ void ExtensionsGuestViewContainer::CallElementResizeCallback( v8::Integer::New(element_resize_isolate_, new_size.height())}; v8::Context::Scope context_scope(context); - v8::MicrotasksScope microtasks( - element_resize_isolate_, v8::MicrotasksScope::kDoNotRunMicrotasks); + blink::WebScopedMicrotaskSuppression suppression; callback->Call(context->Global(), argc, argv); } diff --git a/extensions/renderer/messaging_bindings.cc b/extensions/renderer/messaging_bindings.cc index 0d87c4c..722bc72 100644 --- a/extensions/renderer/messaging_bindings.cc +++ b/extensions/renderer/messaging_bindings.cc @@ -35,6 +35,7 @@ #include "extensions/renderer/v8_helpers.h" #include "third_party/WebKit/public/web/WebDocument.h" #include "third_party/WebKit/public/web/WebLocalFrame.h" +#include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h" #include "third_party/WebKit/public/web/WebScopedUserGesture.h" #include "third_party/WebKit/public/web/WebScopedWindowFocusAllowedIndicator.h" #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" diff --git a/extensions/renderer/module_system.cc b/extensions/renderer/module_system.cc index 692939e..4ca689a 100644 --- a/extensions/renderer/module_system.cc +++ b/extensions/renderer/module_system.cc @@ -22,6 +22,7 @@ #include "extensions/renderer/v8_helpers.h" #include "gin/modules/module_registry.h" #include "third_party/WebKit/public/web/WebFrame.h" +#include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h" namespace extensions { diff --git a/extensions/renderer/safe_builtins.cc b/extensions/renderer/safe_builtins.cc index fbd88bd..3a66eaf 100644 --- a/extensions/renderer/safe_builtins.cc +++ b/extensions/renderer/safe_builtins.cc @@ -9,6 +9,7 @@ #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 { @@ -200,8 +201,7 @@ class ExtensionImpl : public v8::Extension { return; } - v8::MicrotasksScope microtasks( - info.GetIsolate(), v8::MicrotasksScope::kDoNotRunMicrotasks); + blink::WebScopedMicrotaskSuppression microtasks_scope; v8::Local<v8::Value> return_value; if (function->Call(context, recv, argc, argv.get()).ToLocal(&return_value)) info.GetReturnValue().Set(return_value); diff --git a/extensions/renderer/script_context.cc b/extensions/renderer/script_context.cc index 4bcec51..f6f47f3 100644 --- a/extensions/renderer/script_context.cc +++ b/extensions/renderer/script_context.cc @@ -29,6 +29,7 @@ #include "third_party/WebKit/public/web/WebDocument.h" #include "third_party/WebKit/public/web/WebFrame.h" #include "third_party/WebKit/public/web/WebLocalFrame.h" +#include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h" #include "third_party/WebKit/public/web/WebView.h" #include "v8/include/v8.h" @@ -184,8 +185,7 @@ v8::Local<v8::Value> ScriptContext::CallFunction( v8::EscapableHandleScope handle_scope(isolate()); v8::Context::Scope scope(v8_context()); - v8::MicrotasksScope microtasks( - isolate(), v8::MicrotasksScope::kDoNotRunMicrotasks); + blink::WebScopedMicrotaskSuppression suppression; if (!is_valid_) { return handle_scope.Escape( v8::Local<v8::Primitive>(v8::Undefined(isolate()))); @@ -434,8 +434,7 @@ v8::Local<v8::Value> ScriptContext::RunScript( return v8::Undefined(isolate()); } - v8::MicrotasksScope microtasks( - isolate(), v8::MicrotasksScope::kDoNotRunMicrotasks); + blink::WebScopedMicrotaskSuppression suppression; v8::TryCatch try_catch(isolate()); try_catch.SetCaptureMessage(true); v8::ScriptOrigin origin( diff --git a/extensions/renderer/utils_native_handler.cc b/extensions/renderer/utils_native_handler.cc index 1ded40c..d93f2e6 100644 --- a/extensions/renderer/utils_native_handler.cc +++ b/extensions/renderer/utils_native_handler.cc @@ -7,6 +7,7 @@ #include "base/macros.h" #include "base/strings/stringprintf.h" #include "extensions/renderer/script_context.h" +#include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h" #include "third_party/WebKit/public/web/WebSerializedScriptValue.h" namespace extensions { diff --git a/extensions/renderer/v8_helpers.h b/extensions/renderer/v8_helpers.h index 0a3b2eb..b0dd17a 100644 --- a/extensions/renderer/v8_helpers.h +++ b/extensions/renderer/v8_helpers.h @@ -9,6 +9,7 @@ #include <string.h> #include "base/strings/string_number_conversions.h" +#include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h" #include "v8/include/v8.h" namespace extensions { @@ -155,8 +156,7 @@ inline bool CallFunction(v8::Local<v8::Context> context, int argc, v8::Local<v8::Value> argv[], v8::Local<v8::Value>* out) { - v8::MicrotasksScope microtasks_scope( - context->GetIsolate(), v8::MicrotasksScope::kDoNotRunMicrotasks); + blink::WebScopedMicrotaskSuppression microtasks_scope; return function->Call(context, recv, argc, argv).ToLocal(out); } |