diff options
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); } |