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

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

Issue 23788005: Remove calls to HandleScope default ctor. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: code review (pfeldman) Created 7 years, 3 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.cpp ('k') | Source/bindings/v8/V8DOMWrapper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8CustomElementLifecycleCallbacks.cpp
diff --git a/Source/bindings/v8/V8CustomElementLifecycleCallbacks.cpp b/Source/bindings/v8/V8CustomElementLifecycleCallbacks.cpp
index ede00468694f9baea3a89562af0ce8965a593118..50b073da8a5bf7ba5fba7d916bc269e36ff86a37 100644
--- a/Source/bindings/v8/V8CustomElementLifecycleCallbacks.cpp
+++ b/Source/bindings/v8/V8CustomElementLifecycleCallbacks.cpp
@@ -125,7 +125,7 @@ V8CustomElementLifecycleCallbacks::~V8CustomElementLifecycleCallbacks()
if (!m_owner)
return;
- v8::HandleScope handleScope;
+ v8::HandleScope handleScope(getIsolateFromScriptExecutionContext(scriptExecutionContext()));
if (V8PerContextData* perContextData = creationContextData())
perContextData->clearCustomElementBinding(m_owner);
}
@@ -153,13 +153,13 @@ void V8CustomElementLifecycleCallbacks::created(Element* element)
element->setCustomElementState(Element::Upgraded);
- v8::HandleScope handleScope;
+ v8::Isolate* isolate = getIsolateFromScriptExecutionContext(scriptExecutionContext());
+ v8::HandleScope handleScope(isolate);
v8::Handle<v8::Context> context = toV8Context(scriptExecutionContext(), m_world.get());
if (context.IsEmpty())
return;
v8::Context::Scope scope(context);
- v8::Isolate* isolate = context->GetIsolate();
v8::Handle<v8::Object> receiver = DOMDataStore::current(isolate)->get<V8Element>(element, isolate);
if (!receiver.IsEmpty()) {
@@ -201,13 +201,13 @@ void V8CustomElementLifecycleCallbacks::attributeChanged(Element* element, const
if (!canInvokeCallback())
return;
- v8::HandleScope handleScope;
+ v8::Isolate* isolate = getIsolateFromScriptExecutionContext(scriptExecutionContext());
+ v8::HandleScope handleScope(isolate);
v8::Handle<v8::Context> context = toV8Context(scriptExecutionContext(), m_world.get());
if (context.IsEmpty())
return;
v8::Context::Scope scope(context);
- v8::Isolate* isolate = context->GetIsolate();
v8::Handle<v8::Object> receiver = toV8(element, context->Global(), isolate).As<v8::Object>();
ASSERT(!receiver.IsEmpty());
@@ -232,7 +232,7 @@ void V8CustomElementLifecycleCallbacks::call(const ScopedPersistent<v8::Function
if (!canInvokeCallback())
return;
- v8::HandleScope handleScope;
+ v8::HandleScope handleScope(getIsolateFromScriptExecutionContext(scriptExecutionContext()));
v8::Handle<v8::Context> context = toV8Context(scriptExecutionContext(), m_world.get());
if (context.IsEmpty())
return;
« no previous file with comments | « Source/bindings/v8/V8Binding.cpp ('k') | Source/bindings/v8/V8DOMWrapper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698