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

Unified Diff: extensions/renderer/script_context.h

Issue 2339683006: [Blink] Modify SuspendableScriptExecutor to take a v8::Function (Closed)
Patch Set: Daniels Created 4 years, 3 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
Index: extensions/renderer/script_context.h
diff --git a/extensions/renderer/script_context.h b/extensions/renderer/script_context.h
index dd97ac90dc3871d8b7c8d095aec42e33eec09c66..ae06dfc77f0aab43640bcc5601f4c9d641396dca 100644
--- a/extensions/renderer/script_context.h
+++ b/extensions/renderer/script_context.h
@@ -118,6 +118,13 @@ class ScriptContext : public RequestSender::Source {
v8::Local<v8::Value> CallFunction(
const v8::Local<v8::Function>& function) const;
+ // Safely calls the v8::Function, respecting the page load deferrer and
+ // possibly executing asynchronously.
+ // TODO(devlin): Remove the above variants in favor of this.
+ void SafeCallFunction(const v8::Local<v8::Function>& function,
+ int argc,
+ v8::Local<v8::Value> argv[]);
+
void DispatchEvent(const char* event_name, v8::Local<v8::Array> args) const;
// Returns the availability of the API |api_name|.

Powered by Google App Engine
This is Rietveld 408576698