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

Unified Diff: Source/bindings/v8/V8Binding.cpp

Issue 23788005: Remove calls to HandleScope default ctor. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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/v8/V8Binding.h ('k') | Source/bindings/v8/V8CustomElementLifecycleCallbacks.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8Binding.cpp
diff --git a/Source/bindings/v8/V8Binding.cpp b/Source/bindings/v8/V8Binding.cpp
index 5abfe4412209609e9b3989f080d26744e75160dd..812fb8289ae97fc5afa276487fb24026ac575441 100644
--- a/Source/bindings/v8/V8Binding.cpp
+++ b/Source/bindings/v8/V8Binding.cpp
@@ -590,4 +590,15 @@ v8::Local<v8::Value> getHiddenValueFromMainWorldWrapper(v8::Isolate* isolate, Sc
return wrapper.IsEmpty() ? v8::Local<v8::Value>() : wrapper->GetHiddenValue(key);
}
+v8::Isolate* getIsolateFromScriptExecutionContext(ScriptExecutionContext* context)
haraken 2013/09/02 08:05:56 The implementation of this method looks hacky. A b
marja 2013/09/02 09:05:42 Added a FIXME to do b).
+{
+ if (context->isDocument()) {
haraken 2013/09/02 08:05:56 Nit: You might want to add ASSERT(context).
marja 2013/09/02 09:05:42 Done.
+ static v8::Isolate* mainWorldIsolate = 0;
+ if (!mainWorldIsolate)
+ mainWorldIsolate = v8::Isolate::GetCurrent();
+ return mainWorldIsolate;
+ }
+ return v8::Isolate::GetCurrent();
+}
+
} // namespace WebCore
« no previous file with comments | « Source/bindings/v8/V8Binding.h ('k') | Source/bindings/v8/V8CustomElementLifecycleCallbacks.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698