JSValue jsAudioProcessingEventInputBuffer(ExecState* exec, JSValue slotBase, const Identifier&) { JSAudioProcessingEvent* castedThis = static_cast<JSAudioProcessingEvent*>(asObject(slotBase)); UNUSED_PARAM(exec); AudioProcessingEvent* imp = static_cast<AudioProcessingEvent*>(castedThis->impl()); JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->inputBuffer())); return result; }
static v8::Handle<v8::Value> inputBufferAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { AudioProcessingEvent* imp = V8AudioProcessingEvent::toNative(info.Holder()); RefPtr<AudioBuffer> result = imp->inputBuffer(); v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMDataStore::getWrapper(result.get(), info.GetIsolate())) : v8Undefined(); if (wrapper.IsEmpty()) { wrapper = toV8(result.get(), info.Holder(), info.GetIsolate()); if (!wrapper.IsEmpty()) V8DOMWrapper::setNamedHiddenReference(info.Holder(), "inputBuffer", wrapper); } return wrapper; }