diff options
author | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-25 03:20:05 +0000 |
---|---|---|
committer | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-25 03:20:05 +0000 |
commit | 0bceb6c00f1177923efc41903de625ccc33d4428 (patch) | |
tree | e7c709bb819843d00f11dd32ae85ed5172a0ee3e /webkit/port/bindings/v8/v8_proxy.h | |
parent | d4cafafac04f16475b30346609c21dca6a8906d0 (diff) | |
download | chromium_src-0bceb6c00f1177923efc41903de625ccc33d4428.zip chromium_src-0bceb6c00f1177923efc41903de625ccc33d4428.tar.gz chromium_src-0bceb6c00f1177923efc41903de625ccc33d4428.tar.bz2 |
Run content scripts in their own isolated world. Hidden behind the --isolated-world command line argument to let us iterate on this feature.R=aaBUG=12218TEST=None :( (I have a testing plan we can put in place once the upstream half of this CL lands.)
Review URL: http://codereview.chromium.org/118188
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19225 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port/bindings/v8/v8_proxy.h')
-rw-r--r-- | webkit/port/bindings/v8/v8_proxy.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/webkit/port/bindings/v8/v8_proxy.h b/webkit/port/bindings/v8/v8_proxy.h index 6bfff64..2353420 100644 --- a/webkit/port/bindings/v8/v8_proxy.h +++ b/webkit/port/bindings/v8/v8_proxy.h @@ -242,6 +242,12 @@ class V8Proxy { void setEventHandlerLineno(int lineno) { m_handlerLineno = lineno; } void finishedWithEvent(Event* event) { } + // Evaluate JavaScript in a new 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. + void evaluateInNewWorld(const Vector<ScriptSourceCode>& sources); + // Evaluate JavaScript in a new context. The script gets its own global scope // and its own prototypes for intrinsic JavaScript objects (String, Array, // and so-on). It shares the wrappers for all DOM nodes and DOM constructors. @@ -503,11 +509,14 @@ class V8Proxy { static void* ToSVGPODTypeImpl(V8ClassIndex::V8WrapperType type, v8::Handle<v8::Value> object); + // TODO(abarth): Separate these concerns from V8Proxy? + v8::Persistent<v8::Context> createNewContext(v8::Handle<v8::Object> global); + bool installDOMWindow(v8::Handle<v8::Context> context, DOMWindow* window); + private: static const char* kContextDebugDataType; static const char* kContextDebugDataValue; - v8::Persistent<v8::Context> createNewContext(v8::Handle<v8::Object> global); void InitContextIfNeeded(); void DisconnectEventListeners(); void SetSecurityToken(); |