summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authordgozman <dgozman@chromium.org>2016-03-16 15:30:50 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-16 22:32:33 +0000
commit8ce1943be5284c67fb79cae9bf1576624fba97b6 (patch)
treece2eafcf6457a8f815dc7798404506d3b7a05161 /extensions
parent4aedd4df4e2cbad0a315cf8bbb2bc5787a77ff02 (diff)
downloadchromium_src-8ce1943be5284c67fb79cae9bf1576624fba97b6.zip
chromium_src-8ce1943be5284c67fb79cae9bf1576624fba97b6.tar.gz
chromium_src-8ce1943be5284c67fb79cae9bf1576624fba97b6.tar.bz2
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. Attempt #2. First one failed due to missing scopes in platform/v8_inspector. See issue 594974. BUG=585949 Review URL: https://codereview.chromium.org/1769273004 Cr-Commit-Position: refs/heads/master@{#381569}
Diffstat (limited to 'extensions')
-rw-r--r--extensions/renderer/activity_log_converter_strategy_unittest.cc4
-rw-r--r--extensions/renderer/guest_view/extensions_guest_view_container.cc4
-rw-r--r--extensions/renderer/messaging_bindings.cc1
-rw-r--r--extensions/renderer/module_system.cc1
-rw-r--r--extensions/renderer/safe_builtins.cc4
-rw-r--r--extensions/renderer/script_context.cc7
-rw-r--r--extensions/renderer/utils_native_handler.cc1
-rw-r--r--extensions/renderer/v8_helpers.h4
8 files changed, 12 insertions, 14 deletions
diff --git a/extensions/renderer/activity_log_converter_strategy_unittest.cc b/extensions/renderer/activity_log_converter_strategy_unittest.cc
index aa80447..fbb9597 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,8 @@ TEST_F(ActivityLogConverterStrategyTest, ConversionTest) {
"};"
"})();";
- blink::WebScopedMicrotaskSuppression microtasks_scope;
+ v8::MicrotasksScope microtasks(
+ isolate_, v8::MicrotasksScope::kDoNotRunMicrotasks);
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 3fa9882..ffa3580 100644
--- a/extensions/renderer/guest_view/extensions_guest_view_container.cc
+++ b/extensions/renderer/guest_view/extensions_guest_view_container.cc
@@ -5,7 +5,6 @@
#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 {
@@ -56,7 +55,8 @@ void ExtensionsGuestViewContainer::CallElementResizeCallback(
v8::Integer::New(element_resize_isolate_, new_size.height())};
v8::Context::Scope context_scope(context);
- blink::WebScopedMicrotaskSuppression suppression;
+ v8::MicrotasksScope microtasks(
+ element_resize_isolate_, v8::MicrotasksScope::kDoNotRunMicrotasks);
callback->Call(context->Global(), argc, argv);
}
diff --git a/extensions/renderer/messaging_bindings.cc b/extensions/renderer/messaging_bindings.cc
index 722bc72..0d87c4c 100644
--- a/extensions/renderer/messaging_bindings.cc
+++ b/extensions/renderer/messaging_bindings.cc
@@ -35,7 +35,6 @@
#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 4ca689a..692939e 100644
--- a/extensions/renderer/module_system.cc
+++ b/extensions/renderer/module_system.cc
@@ -22,7 +22,6 @@
#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 3a66eaf..fbd88bd 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,8 @@ class ExtensionImpl : public v8::Extension {
return;
}
- blink::WebScopedMicrotaskSuppression microtasks_scope;
+ v8::MicrotasksScope microtasks(
+ info.GetIsolate(), v8::MicrotasksScope::kDoNotRunMicrotasks);
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 f6f47f3..4bcec51 100644
--- a/extensions/renderer/script_context.cc
+++ b/extensions/renderer/script_context.cc
@@ -29,7 +29,6 @@
#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"
@@ -185,7 +184,8 @@ v8::Local<v8::Value> ScriptContext::CallFunction(
v8::EscapableHandleScope handle_scope(isolate());
v8::Context::Scope scope(v8_context());
- blink::WebScopedMicrotaskSuppression suppression;
+ v8::MicrotasksScope microtasks(
+ isolate(), v8::MicrotasksScope::kDoNotRunMicrotasks);
if (!is_valid_) {
return handle_scope.Escape(
v8::Local<v8::Primitive>(v8::Undefined(isolate())));
@@ -434,7 +434,8 @@ v8::Local<v8::Value> ScriptContext::RunScript(
return v8::Undefined(isolate());
}
- blink::WebScopedMicrotaskSuppression suppression;
+ v8::MicrotasksScope microtasks(
+ isolate(), v8::MicrotasksScope::kDoNotRunMicrotasks);
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 d93f2e6..1ded40c 100644
--- a/extensions/renderer/utils_native_handler.cc
+++ b/extensions/renderer/utils_native_handler.cc
@@ -7,7 +7,6 @@
#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 b0dd17a..0a3b2eb 100644
--- a/extensions/renderer/v8_helpers.h
+++ b/extensions/renderer/v8_helpers.h
@@ -9,7 +9,6 @@
#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 {
@@ -156,7 +155,8 @@ inline bool CallFunction(v8::Local<v8::Context> context,
int argc,
v8::Local<v8::Value> argv[],
v8::Local<v8::Value>* out) {
- blink::WebScopedMicrotaskSuppression microtasks_scope;
+ v8::MicrotasksScope microtasks_scope(
+ context->GetIsolate(), v8::MicrotasksScope::kDoNotRunMicrotasks);
return function->Call(context, recv, argc, argv).ToLocal(out);
}