JSValue jsDOMMimeTypeEnabledPlugin(ExecState* exec, JSValue slotBase, const Identifier&) { JSDOMMimeType* castedThis = static_cast<JSDOMMimeType*>(asObject(slotBase)); UNUSED_PARAM(exec); DOMMimeType* imp = static_cast<DOMMimeType*>(castedThis->impl()); JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->enabledPlugin())); return result; }
JSValue jsDOMMimeTypeDescription(ExecState* exec, JSValue slotBase, const Identifier&) { JSDOMMimeType* castedThis = static_cast<JSDOMMimeType*>(asObject(slotBase)); UNUSED_PARAM(exec); DOMMimeType* imp = static_cast<DOMMimeType*>(castedThis->impl()); JSValue result = jsString(exec, imp->description()); return result; }
static v8::Handle<v8::Value> enabledPluginAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { INC_STATS("DOM.DOMMimeType.enabledPlugin._get"); DOMMimeType* imp = V8DOMMimeType::toNative(info.Holder()); RefPtr<DOMPlugin> result = imp->enabledPlugin(); v8::Handle<v8::Value> wrapper = result.get() ? getDOMObjectMap().get(result.get()) : v8::Handle<v8::Value>(); if (wrapper.IsEmpty()) { wrapper = toV8(result.get()); if (!wrapper.IsEmpty()) V8DOMWrapper::setNamedHiddenReference(info.Holder(), "enabledPlugin", wrapper); } return wrapper; }
static v8::Handle<v8::Value> descriptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { INC_STATS("DOM.DOMMimeType.description._get"); DOMMimeType* imp = V8DOMMimeType::toNative(info.Holder()); return v8String(imp->description()); }