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

Unified Diff: chrome/renderer/module_system.cc

Issue 9865015: Make renderer calls into script declare there "type" (internal or author). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: pre-review Created 8 years, 9 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 | « chrome/renderer/extensions/miscellaneous_bindings.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/module_system.cc
diff --git a/chrome/renderer/module_system.cc b/chrome/renderer/module_system.cc
index fd940abbbae8d2888c61d45589c93474c08afc24..acca8ae9e24b45d8f7b7400b9bc95661cc8adb16 100644
--- a/chrome/renderer/module_system.cc
+++ b/chrome/renderer/module_system.cc
@@ -5,6 +5,7 @@
#include "chrome/renderer/module_system.h"
#include "base/bind.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebScopedMicrotaskSuppression.h"
namespace {
@@ -74,7 +75,10 @@ v8::Handle<v8::Value> ModuleSystem::RequireForJsInner(
natives->Get(v8::String::NewSymbol("requireNative")),
exports,
};
- func->Call(global, 3, args);
+ {
+ WebKit::WebScopedMicrotaskSuppression suppression;
+ func->Call(global, 3, args);
+ }
modules->Set(module_name, exports);
return handle_scope.Close(exports);
}
@@ -136,6 +140,7 @@ void ModuleSystem::SetLazyField(v8::Handle<v8::Object> object,
v8::Handle<v8::Value> ModuleSystem::RunString(v8::Handle<v8::String> code,
v8::Handle<v8::String> name) {
v8::HandleScope handle_scope;
+ WebKit::WebScopedMicrotaskSuppression suppression;
return handle_scope.Close(v8::Script::New(code, name)->Run());
}
« no previous file with comments | « chrome/renderer/extensions/miscellaneous_bindings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698