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

Unified Diff: Source/bindings/v8/WorkerScriptController.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/WorkerScriptController.h
diff --git a/Source/bindings/v8/WorkerScriptController.h b/Source/bindings/v8/WorkerScriptController.h
index 5c66c12dd3fa52e1bb402bfb4e14baab3ff3632a..da51e46f442a5274a39f97bc6b6a86e21c0075ab 100644
--- a/Source/bindings/v8/WorkerScriptController.h
+++ b/Source/bindings/v8/WorkerScriptController.h
@@ -99,8 +99,7 @@ namespace WebCore {
// Evaluate a script file in the current execution environment.
ScriptValue evaluate(const String& script, const String& fileName, const TextPosition& scriptStartPosition, WorkerGlobalScopeExecutionState*);
- // Returns a local handle of the context.
- v8::Local<v8::Context> context() { return m_contextHolder ? m_contextHolder->context() : v8::Local<v8::Context>(); }
+ v8::Local<v8::Context> context() { return m_perContextData ? m_perContextData->context() : v8::Local<v8::Context>(); }
// Send a notification about current thread is going to be idle.
// Returns true if the embedder should stop calling idleNotification
@@ -115,7 +114,6 @@ namespace WebCore {
WorkerGlobalScope& m_workerGlobalScope;
OwnPtr<gin::IsolateHolder> m_isolateHolder;
- OwnPtr<gin::ContextHolder> m_contextHolder;
OwnPtr<V8PerContextData> m_perContextData;
String m_disableEvalPending;
RefPtr<DOMWrapperWorld> m_world;

Powered by Google App Engine
This is Rietveld 408576698