void JSNodeFilter::visitChildren(JSCell* cell, SlotVisitor& visitor) { JSNodeFilter* thisObject = jsCast<JSNodeFilter*>(cell); ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info); COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren()); Base::visitChildren(thisObject, visitor); visitor.addOpaqueRoot(thisObject->impl()); }
EncodedJSValue JSC_HOST_CALL jsNodeFilterPrototypeFunctionAcceptNode(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSNodeFilter::s_info)) return throwVMTypeError(exec); JSNodeFilter* castedThis = static_cast<JSNodeFilter*>(asObject(thisValue)); NodeFilter* imp = static_cast<NodeFilter*>(castedThis->impl()); Node* n(toNode(exec->argument(0))); if (exec->hadException()) return JSValue::encode(jsUndefined()); JSC::JSValue result = jsNumber(imp->acceptNode(exec, n)); if (exec->hadException()) return JSValue::encode(jsUndefined()); return JSValue::encode(result); }