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

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

Issue 2695713015: WIP: Reland CompiledScript, prototype compiling in a separate task.
Patch Set: allow compile to fail, disallow restreaming (hack) Created 3 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
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 5428ae472d7480e8d68e52488f60c18acf13295f..cbb8fb60ec89d0c50d6f961c7b073177d497e433 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptController.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptController.h
@@ -47,6 +47,7 @@
namespace blink {
+class CompiledScript;
class DOMWrapperWorld;
class Element;
class FrameViewBase;
@@ -91,6 +92,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