示例#1
0
static void onerrorAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.IDBTransaction.onerror._set");
    IDBTransaction* imp = V8IDBTransaction::toNative(info.Holder());
    transferHiddenDependency(info.Holder(), imp->onerror(), value, V8IDBTransaction::eventListenerCacheIndex);
    imp->setOnerror(V8DOMWrapper::getEventListener(value, true, ListenerFindOrCreate));
    return;
}
示例#2
0
static v8::Handle<v8::Value> onerrorAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.IDBTransaction.onerror._get");
    IDBTransaction* imp = V8IDBTransaction::toNative(info.Holder());
    return imp->onerror() ? v8::Handle<v8::Value>(static_cast<V8AbstractEventListener*>(imp->onerror())->getListenerObject(imp->scriptExecutionContext())) : v8::Handle<v8::Value>(v8::Null());
}