void JSCSSValueOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context) { JSCSSValue* jsCSSValue = jsCast<JSCSSValue*>(handle.slot()->asCell()); DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context); world.m_cssValueRoots.remove(&jsCSSValue->wrapped()); uncacheWrapper(world, &jsCSSValue->wrapped(), jsCSSValue); }
void JSCSSValueOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context) { JSCSSValue* jsCSSValue = jsCast<JSCSSValue*>(handle.get().asCell()); DOMWrapperWorld* world = static_cast<DOMWrapperWorld*>(context); world->m_cssValueRoots.remove(jsCSSValue->impl()); uncacheWrapper(world, jsCSSValue->impl(), jsCSSValue); jsCSSValue->releaseImpl(); }
void setJSCSSValueCssText(ExecState* exec, JSObject* thisObject, JSValue value) { JSCSSValue* castedThis = static_cast<JSCSSValue*>(thisObject); CSSValue* imp = static_cast<CSSValue*>(castedThis->impl()); ExceptionCode ec = 0; imp->setCssText(valueToStringWithNullCheck(exec, value), ec); setDOMException(exec, ec); }
JSValue jsCSSValueCssValueType(ExecState* exec, JSValue slotBase, const Identifier&) { JSCSSValue* castedThis = static_cast<JSCSSValue*>(asObject(slotBase)); UNUSED_PARAM(exec); CSSValue* imp = static_cast<CSSValue*>(castedThis->impl()); JSValue result = jsNumber(exec, imp->cssValueType()); return result; }
bool JSCSSValueOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void* context, SlotVisitor& visitor) { JSCSSValue* jsCSSValue = jsCast<JSCSSValue*>(handle.slot()->asCell()); if (!jsCSSValue->hasCustomProperties()) return false; DOMWrapperWorld* world = static_cast<DOMWrapperWorld*>(context); void* root = world->m_cssValueRoots.get(&jsCSSValue->wrapped()); if (!root) return false; return visitor.containsOpaqueRoot(root); }
JSValue jsCSSValueConstructor(ExecState* exec, JSValue slotBase, const Identifier&) { JSCSSValue* domObject = static_cast<JSCSSValue*>(asObject(slotBase)); return JSCSSValue::getConstructor(exec, domObject->globalObject()); }