bool V8CustomElementLifecycleCallbacks::setBinding(CustomElementDefinition* owner, PassOwnPtr<CustomElementBinding> binding) { V8PerContextData* perContextData = creationContextData(); if (!perContextData) return false; // The context is responsible for keeping the prototype // alive. This in turn keeps callbacks alive through hidden // references; see CALLBACK_LIST(SET_HIDDEN_VALUE). perContextData->addCustomElementBinding(owner, binding); return true; }
bool V8CustomElementLifecycleCallbacks::setBinding(CustomElementDefinition* owner, PassOwnPtr<CustomElementBinding> binding) { ASSERT(!m_owner); V8PerContextData* perContextData = creationContextData(); if (!perContextData) return false; m_owner = owner; // Bindings retrieve the prototype when needed from per-context data. perContextData->addCustomElementBinding(owner, binding); return true; }