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

Unified Diff: Source/bindings/v8/V8WindowShell.h

Issue 180773003: Simplify the way to initialize context (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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: Source/bindings/v8/V8WindowShell.h
diff --git a/Source/bindings/v8/V8WindowShell.h b/Source/bindings/v8/V8WindowShell.h
index 1fd92feddb1860f6fc0b9d079d0ec3f33171ca03..cdb3b305f507f2eb00ace2c5a7c3bf5c6b86dbda 100644
--- a/Source/bindings/v8/V8WindowShell.h
+++ b/Source/bindings/v8/V8WindowShell.h
@@ -35,7 +35,6 @@
#include "bindings/v8/ScopedPersistent.h"
#include "bindings/v8/V8PerContextData.h"
#include "bindings/v8/WrapperTypeInfo.h"
-#include "gin/public/context_holder.h"
#include "platform/weborigin/SecurityOrigin.h"
#include "wtf/Forward.h"
#include "wtf/HashMap.h"
@@ -58,7 +57,7 @@ class V8WindowShell {
public:
static PassOwnPtr<V8WindowShell> create(LocalFrame*, PassRefPtr<DOMWrapperWorld>, v8::Isolate*);
- v8::Local<v8::Context> context() const { return m_contextHolder ? m_contextHolder->context() : v8::Local<v8::Context>(); }
+ v8::Local<v8::Context> context() const { return m_perContextData ? m_perContextData->context() : v8::Local<v8::Context>(); }
// Update document object of the frame.
void updateDocument();
@@ -70,7 +69,7 @@ public:
// (e.g., after setting docoument.domain).
void updateSecurityOrigin(SecurityOrigin*);
- bool isContextInitialized() { return m_contextHolder; }
+ bool isContextInitialized() { return m_perContextData; }
bool isGlobalInitialized() { return !m_global.isEmpty(); }
bool initializeIfNeeded();
@@ -109,10 +108,7 @@ private:
LocalFrame* m_frame;
RefPtr<DOMWrapperWorld> m_world;
v8::Isolate* m_isolate;
-
OwnPtr<V8PerContextData> m_perContextData;
-
- OwnPtr<gin::ContextHolder> m_contextHolder;
ScopedPersistent<v8::Object> m_global;
ScopedPersistent<v8::Object> m_document;
};

Powered by Google App Engine
This is Rietveld 408576698