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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptController.h

Issue 2564903002: ScriptController: Expose methods to compile a script and execute a compiled script. (Closed)
Patch Set: Created 4 years 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/bindings/core/v8/ScriptController.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptController.h b/third_party/WebKit/Source/bindings/core/v8/ScriptController.h
index 425a2083a11376b342087b1711543274fd77beec..991ac7c78b75760ca99bce709e6980f20411ef73 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptController.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptController.h
@@ -46,6 +46,7 @@
namespace blink {
+class CompiledScript;
class DOMWrapperWorld;
class Element;
class HTMLDocument;
@@ -96,6 +97,12 @@ class CORE_EXPORT ScriptController final
const ScriptSourceCode&,
AccessControlStatus = NotSharableCrossOrigin);
+ // The same, but separated into two phases.
+ // compileScriptInMainWorld may return nullptr.
+ CompiledScript* compileScriptInMainWorld(const ScriptSourceCode&,
+ AccessControlStatus);
+ void executeScriptInMainWorld(const CompiledScript&);
+
// Executes JavaScript in an isolated world. The script gets its own global
// scope, its own prototypes for intrinsic JavaScript objects (String, Array,
// and so-on), and its own wrappers for all DOM nodes and DOM constructors.

Powered by Google App Engine
This is Rietveld 408576698