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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptState.h

Issue 2800173002: Remove ScriptState::setExecutionContext (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/ScriptState.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ScriptState_h 5 #ifndef ScriptState_h
6 #define ScriptState_h 6 #define ScriptState_h
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "bindings/core/v8/ScopedPersistent.h" 10 #include "bindings/core/v8/ScopedPersistent.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // ScriptState::from() must not be called for a context that does not have 130 // ScriptState::from() must not be called for a context that does not have
131 // valid embedder data in the embedder field. 131 // valid embedder data in the embedder field.
132 SECURITY_CHECK(scriptState); 132 SECURITY_CHECK(scriptState);
133 SECURITY_CHECK(scriptState->context() == context); 133 SECURITY_CHECK(scriptState->context() == context);
134 return scriptState; 134 return scriptState;
135 } 135 }
136 136
137 v8::Isolate* isolate() const { return m_isolate; } 137 v8::Isolate* isolate() const { return m_isolate; }
138 DOMWrapperWorld& world() const { return *m_world; } 138 DOMWrapperWorld& world() const { return *m_world; }
139 virtual ExecutionContext* getExecutionContext() const; 139 virtual ExecutionContext* getExecutionContext() const;
140 virtual void setExecutionContext(ExecutionContext*);
141 140
142 // This can return an empty handle if the v8::Context is gone. 141 // This can return an empty handle if the v8::Context is gone.
143 v8::Local<v8::Context> context() const { 142 v8::Local<v8::Context> context() const {
144 return m_context.newLocal(m_isolate); 143 return m_context.newLocal(m_isolate);
145 } 144 }
146 bool contextIsValid() const { 145 bool contextIsValid() const {
147 return !m_context.isEmpty() && m_perContextData; 146 return !m_context.isEmpty() && m_perContextData;
148 } 147 }
149 void detachGlobalObject(); 148 void detachGlobalObject();
150 void clearContext() { return m_context.clear(); } 149 void clearContext() { return m_context.clear(); }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } 196 }
198 197
199 private: 198 private:
200 RefPtr<ScriptState> m_scriptState; 199 RefPtr<ScriptState> m_scriptState;
201 ScopedPersistent<v8::Context> m_context; 200 ScopedPersistent<v8::Context> m_context;
202 }; 201 };
203 202
204 } // namespace blink 203 } // namespace blink
205 204
206 #endif // ScriptState_h 205 #endif // ScriptState_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/ScriptState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698