JSValue* jsCSSPrimitiveValuePrototypeFunctionGetRGBColorValue(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args) { if (!thisValue->isObject(&JSCSSPrimitiveValue::s_info)) return throwError(exec, TypeError); JSCSSPrimitiveValue* castedThisObj = static_cast<JSCSSPrimitiveValue*>(thisValue); CSSPrimitiveValue* imp = static_cast<CSSPrimitiveValue*>(castedThisObj->impl()); ExceptionCode ec = 0; KJS::JSValue* result = getJSRGBColor(exec, imp->getRGBColorValue(ec)); setDOMException(exec, ec); return result; }
static v8::Handle<v8::Value> getRGBColorValueCallback(const v8::Arguments& args) { CSSPrimitiveValue* imp = V8CSSPrimitiveValue::toNative(args.Holder()); ExceptionCode ec = 0; { RefPtr<RGBColor> result = imp->getRGBColorValue(ec); if (UNLIKELY(ec)) goto fail; return toV8(result.release(), args.Holder(), args.GetIsolate()); } fail: return setDOMException(ec, args.GetIsolate()); }
JSValue JSC_HOST_CALL jsCSSPrimitiveValuePrototypeFunctionGetRGBColorValue(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); if (!thisValue.inherits(&JSCSSPrimitiveValue::s_info)) return throwError(exec, TypeError); JSCSSPrimitiveValue* castedThisObj = static_cast<JSCSSPrimitiveValue*>(asObject(thisValue)); CSSPrimitiveValue* imp = static_cast<CSSPrimitiveValue*>(castedThisObj->impl()); ExceptionCode ec = 0; JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getRGBColorValue(ec))); setDOMException(exec, ec); return result; }
static v8::Handle<v8::Value> getRGBColorValueCallback(const v8::Arguments& args) { INC_STATS("DOM.CSSPrimitiveValue.getRGBColorValue"); CSSPrimitiveValue* imp = V8CSSPrimitiveValue::toNative(args.Holder()); ExceptionCode ec = 0; { RefPtr<RGBColor> result = imp->getRGBColorValue(ec); if (UNLIKELY(ec)) goto fail; return toV8(result.release()); } fail: V8Proxy::setDOMException(ec); return v8::Handle<v8::Value>(); }