| 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 2f083f7414558d4494baddffb0139ac1fa0f714e..b8ffe3a98811fe62f9103d078470cb79e4d13a14 100644
|
| --- a/third_party/WebKit/Source/web/SuspendableScriptExecutor.h
|
| +++ b/third_party/WebKit/Source/web/SuspendableScriptExecutor.h
|
| @@ -9,6 +9,7 @@
|
| #include "platform/heap/Handle.h"
|
| #include "platform/heap/SelfKeepAlive.h"
|
| #include "wtf/Vector.h"
|
| +#include <v8.h>
|
|
|
| namespace blink {
|
|
|
| @@ -28,19 +29,32 @@ class SuspendableScriptExecutor final
|
| int extensionGroup,
|
| bool userGesture,
|
| WebScriptExecutionCallback*);
|
| + static void createAndRun(LocalFrame*,
|
| + v8::Isolate*,
|
| + v8::Local<v8::Function>,
|
| + v8::Local<v8::Value> receiver,
|
| + int argc,
|
| + v8::Local<v8::Value> argv[],
|
| + WebScriptExecutionCallback*);
|
| ~SuspendableScriptExecutor() override;
|
|
|
| void contextDestroyed() override;
|
|
|
| DECLARE_VIRTUAL_TRACE();
|
|
|
| + class Executor : public GarbageCollectedFinalized<Executor> {
|
| + public:
|
| + virtual ~Executor() {}
|
| +
|
| + virtual Vector<v8::Local<v8::Value>> execute(LocalFrame*) = 0;
|
| +
|
| + DEFINE_INLINE_VIRTUAL_TRACE(){};
|
| + };
|
| +
|
| private:
|
| SuspendableScriptExecutor(LocalFrame*,
|
| - int worldID,
|
| - const HeapVector<ScriptSourceCode>& sources,
|
| - int extensionGroup,
|
| - bool userGesture,
|
| - WebScriptExecutionCallback*);
|
| + WebScriptExecutionCallback*,
|
| + Executor*);
|
|
|
| void fired() override;
|
|
|
| @@ -49,15 +63,11 @@ class SuspendableScriptExecutor final
|
| void dispose();
|
|
|
| Member<LocalFrame> m_frame;
|
| - HeapVector<ScriptSourceCode> m_sources;
|
| WebScriptExecutionCallback* m_callback;
|
|
|
| SelfKeepAlive<SuspendableScriptExecutor> m_keepAlive;
|
|
|
| - int m_worldID;
|
| - int m_extensionGroup;
|
| -
|
| - bool m_userGesture;
|
| + Member<Executor> m_executor;
|
| };
|
|
|
| } // namespace blink
|
|
|