示例#1
0
 static void currentNodeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) {
   INC_STATS("DOM.TreeWalker.currentNode._set");
   TreeWalker* imp = V8TreeWalker::toNative(info.Holder());
   Node* v = V8Node::HasInstance(value) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
   ExceptionCode ec = 0;
   imp->setCurrentNode(WTF::getPtr(v), ec);
   if (UNLIKELY(ec))
       V8Proxy::setDOMException(ec);
   return;
 }
示例#2
0
void JSTreeWalker::putValueProperty(ExecState* exec, int token, JSValue* value)
{
    switch (token) {
    case CurrentNodeAttrNum: {
        TreeWalker* imp = static_cast<TreeWalker*>(impl());
        ExceptionCode ec = 0;
        imp->setCurrentNode(toNode(value), ec);
        setDOMException(exec, ec);
        break;
    }
    }
}