Exemplo n.º 1
0
JSValue jsAudioGainNodeGain(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSAudioGainNode* castedThis = static_cast<JSAudioGainNode*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    AudioGainNode* imp = static_cast<AudioGainNode*>(castedThis->impl());
    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->gain()));
    return result;
}
Exemplo n.º 2
0
static v8::Handle<v8::Value> gainAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.AudioGainNode.gain._get");
    AudioGainNode* imp = V8AudioGainNode::toNative(info.Holder());
    RefPtr<AudioGain> result = imp->gain();
    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(), "gain", wrapper);
    }
    return wrapper;
}