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

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

Issue 854453003: Revert of Revert of Reland factor out window proxy management portions of ScriptController. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments Created 5 years, 11 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
« no previous file with comments | « Source/bindings/core/v8/NPV8Object.cpp ('k') | Source/bindings/core/v8/ScriptController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/ScriptController.h
diff --git a/Source/bindings/core/v8/ScriptController.h b/Source/bindings/core/v8/ScriptController.h
index aea494ca7fcb3900e9d01f8e33fc20994ea44b0b..28a403428a37befeea23a3e926bb2025be85074a 100644
--- a/Source/bindings/core/v8/ScriptController.h
+++ b/Source/bindings/core/v8/ScriptController.h
@@ -32,8 +32,9 @@
#define ScriptController_h
#include "bindings/core/v8/SharedPersistent.h"
-
+#include "bindings/core/v8/WindowProxyManager.h"
#include "core/fetch/CrossOriginAccessControl.h"
+#include "core/frame/LocalFrame.h"
#include "platform/heap/Handle.h"
#include "wtf/HashMap.h"
#include "wtf/Vector.h"
@@ -49,7 +50,6 @@ class ExecutionContext;
class HTMLDocument;
class HTMLPlugInElement;
class KURL;
-class LocalFrame;
class ScriptState;
class ScriptSourceCode;
class SecurityOrigin;
@@ -150,22 +150,19 @@ public:
void setWorldDebugId(int worldId, int debuggerId);
- v8::Isolate* isolate() const { return m_isolate; }
+ v8::Isolate* isolate() const { return m_windowProxyManager->isolate(); }
private:
explicit ScriptController(LocalFrame*);
- typedef WillBeHeapHashMap<int, OwnPtrWillBeMember<WindowProxy> > IsolatedWorldMap;
+ LocalFrame* frame() const { return toLocalFrame(m_windowProxyManager->frame()); }
+
typedef HashMap<Widget*, NPObject*> PluginObjectMap;
v8::Local<v8::Value> evaluateScriptInMainWorld(const ScriptSourceCode&, AccessControlStatus, ExecuteScriptPolicy, double* compilationFinishTime = 0);
- RawPtrWillBeMember<LocalFrame> m_frame;
+ OwnPtrWillBeMember<WindowProxyManager> m_windowProxyManager;
const String* m_sourceURL;
- v8::Isolate* m_isolate;
-
- OwnPtrWillBeMember<WindowProxy> m_windowProxy;
- IsolatedWorldMap m_isolatedWorlds;
// A mapping between Widgets and their corresponding script object.
// This list is used so that when the plugin dies, we can immediately
« no previous file with comments | « Source/bindings/core/v8/NPV8Object.cpp ('k') | Source/bindings/core/v8/ScriptController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698