JSValue jsXPathResultInvalidIteratorState(ExecState* exec, JSValue slotBase, const Identifier&) { JSXPathResult* castedThis = static_cast<JSXPathResult*>(asObject(slotBase)); UNUSED_PARAM(exec); XPathResult* imp = static_cast<XPathResult*>(castedThis->impl()); JSValue result = jsBoolean(imp->invalidIteratorState()); return result; }
JSValue* JSXPathResult::getValueProperty(ExecState* exec, int token) const { switch (token) { case ResultTypeAttrNum: { XPathResult* imp = static_cast<XPathResult*>(impl()); return jsNumber(imp->resultType()); } case NumberValueAttrNum: { ExceptionCode ec = 0; XPathResult* imp = static_cast<XPathResult*>(impl()); KJS::JSValue* result = jsNumber(imp->numberValue(ec)); setDOMException(exec, ec); return result; } case StringValueAttrNum: { ExceptionCode ec = 0; XPathResult* imp = static_cast<XPathResult*>(impl()); KJS::JSValue* result = jsString(imp->stringValue(ec)); setDOMException(exec, ec); return result; } case BooleanValueAttrNum: { ExceptionCode ec = 0; XPathResult* imp = static_cast<XPathResult*>(impl()); KJS::JSValue* result = jsBoolean(imp->booleanValue(ec)); setDOMException(exec, ec); return result; } case SingleNodeValueAttrNum: { ExceptionCode ec = 0; XPathResult* imp = static_cast<XPathResult*>(impl()); KJS::JSValue* result = toJS(exec, WTF::getPtr(imp->singleNodeValue(ec))); setDOMException(exec, ec); return result; } case InvalidIteratorStateAttrNum: { XPathResult* imp = static_cast<XPathResult*>(impl()); return jsBoolean(imp->invalidIteratorState()); } case SnapshotLengthAttrNum: { ExceptionCode ec = 0; XPathResult* imp = static_cast<XPathResult*>(impl()); KJS::JSValue* result = jsNumber(imp->snapshotLength(ec)); setDOMException(exec, ec); return result; } case ConstructorAttrNum: return getConstructor(exec); } return 0; }
static v8::Handle<v8::Value> invalidIteratorStateAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { INC_STATS("DOM.XPathResult.invalidIteratorState._get"); XPathResult* imp = V8XPathResult::toNative(info.Holder()); return v8Boolean(imp->invalidIteratorState()); }