JSValue JSCommandLineAPIHost::inspectedObject(ExecState& state) { CommandLineAPIHost::InspectableObject* object = wrapped().inspectedObject(); if (!object) return jsUndefined(); JSLockHolder lock(&state); auto scriptValue = object->get(state); return scriptValue ? scriptValue : jsUndefined(); }
JSValue JSCommandLineAPIHost::inspectedObject(ExecState* exec) { CommandLineAPIHost::InspectableObject* object = impl().inspectedObject(); if (!object) return jsUndefined(); JSLockHolder lock(exec); Deprecated::ScriptValue scriptValue = object->get(exec); if (scriptValue.hasNoValue()) return jsUndefined(); return scriptValue.jsValue(); }
JSValue JSCommandLineAPIHost::inspectedObject(ExecState* exec) { if (exec->argumentCount() < 1) return jsUndefined(); CommandLineAPIHost::InspectableObject* object = impl().inspectedObject(exec->uncheckedArgument(0).toInt32(exec)); if (!object) return jsUndefined(); JSLockHolder lock(exec); Deprecated::ScriptValue scriptValue = object->get(exec); if (scriptValue.hasNoValue()) return jsUndefined(); return scriptValue.jsValue(); }