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

Unified Diff: third_party/WebKit/Source/web/SuspendableScriptExecutor.h

Issue 2633253002: Split content script injections into multiple tasks (Closed)
Patch Set: Created 3 years, 10 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: third_party/WebKit/Source/web/SuspendableScriptExecutor.h
diff --git a/third_party/WebKit/Source/web/SuspendableScriptExecutor.h b/third_party/WebKit/Source/web/SuspendableScriptExecutor.h
index 54b8ceb007cbdaa97ac2cebf07a2fb08d259944a..567ef5c4bb2cbd7882a78453fc10256301061345 100644
--- a/third_party/WebKit/Source/web/SuspendableScriptExecutor.h
+++ b/third_party/WebKit/Source/web/SuspendableScriptExecutor.h
@@ -24,11 +24,12 @@ class SuspendableScriptExecutor final
USING_GARBAGE_COLLECTED_MIXIN(SuspendableScriptExecutor);
public:
- static void createAndRun(LocalFrame*,
- int worldID,
- const HeapVector<ScriptSourceCode>& sources,
- bool userGesture,
- WebScriptExecutionCallback*);
+ static SuspendableScriptExecutor* create(
+ LocalFrame*,
+ int worldID,
+ const HeapVector<ScriptSourceCode>& sources,
+ bool userGesture,
+ WebScriptExecutionCallback*);
static void createAndRun(LocalFrame*,
v8::Isolate*,
v8::Local<v8::Context>,
@@ -39,6 +40,8 @@ class SuspendableScriptExecutor final
WebScriptExecutionCallback*);
~SuspendableScriptExecutor() override;
+ void run();
+ void runAsync(bool blockOnload);
void contextDestroyed(ExecutionContext*) override;
DECLARE_VIRTUAL_TRACE();
@@ -60,12 +63,12 @@ class SuspendableScriptExecutor final
void fired() override;
- void run();
void executeAndDestroySelf();
void dispose();
RefPtr<ScriptState> m_scriptState;
WebScriptExecutionCallback* m_callback;
+ bool m_blockingOnload;
SelfKeepAlive<SuspendableScriptExecutor> m_keepAlive;

Powered by Google App Engine
This is Rietveld 408576698