Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / bindings / core / v8 / V8CustomElementLifecycleCallbacks.cpp
index 87abb53..a4f7f41 100644 (file)
@@ -158,12 +158,12 @@ void V8CustomElementLifecycleCallbacks::created(Element* element)
 
     element->setCustomElementState(Element::Upgraded);
 
-    if (m_scriptState->contextIsValid())
+    if (!m_scriptState->contextIsValid())
         return;
     ScriptState::Scope scope(m_scriptState.get());
     v8::Isolate* isolate = m_scriptState->isolate();
     v8::Handle<v8::Context> context = m_scriptState->context();
-    v8::Handle<v8::Object> receiver = m_scriptState->world().domDataStore().get<V8Element>(element, isolate);
+    v8::Handle<v8::Object> receiver = m_scriptState->world().domDataStore().get(element, isolate);
     if (!receiver.IsEmpty()) {
         // Swizzle the prototype of the existing wrapper. We don't need to
         // worry about non-existent wrappers; they will get the right
@@ -208,7 +208,7 @@ void V8CustomElementLifecycleCallbacks::attributeChanged(Element* element, const
     if (!executionContext() || executionContext()->activeDOMObjectsAreStopped())
         return;
 
-    if (m_scriptState->contextIsValid())
+    if (!m_scriptState->contextIsValid())
         return;
     ScriptState::Scope scope(m_scriptState.get());
     v8::Isolate* isolate = m_scriptState->isolate();
@@ -241,7 +241,7 @@ void V8CustomElementLifecycleCallbacks::call(const ScopedPersistent<v8::Function
     if (!executionContext() || executionContext()->activeDOMObjectsAreStopped())
         return;
 
-    if (m_scriptState->contextIsValid())
+    if (!m_scriptState->contextIsValid())
         return;
     ScriptState::Scope scope(m_scriptState.get());
     v8::Isolate* isolate = m_scriptState->isolate();