示例#1
0
static v8::Handle<v8::Value> dirCallback(const v8::Arguments& args)
{
    INC_STATS("DOM.Console.dir");
    Console* imp = V8Console::toNative(args.Holder());
    OwnPtr<ScriptCallStack> callStack(ScriptCallStack::create(args, 0));
    if (!callStack)
        return v8::Undefined();
    imp->dir(callStack.get());
    return v8::Handle<v8::Value>();
}
示例#2
0
JSValue JSC_HOST_CALL jsConsolePrototypeFunctionDir(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
    UNUSED_PARAM(args);
    if (!thisValue.inherits(&JSConsole::s_info))
        return throwError(exec, TypeError);
    JSConsole* castedThisObj = static_cast<JSConsole*>(asObject(thisValue));
    Console* imp = static_cast<Console*>(castedThisObj->impl());
    ScriptCallStack callStack(exec, args, 0);

    imp->dir(&callStack);
    return jsUndefined();
}
示例#3
0
EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionDir(ExecState* exec)
{
    JSValue thisValue = exec->hostThisValue();
    if (!thisValue.inherits(&JSConsole::s_info))
        return throwVMTypeError(exec);
    JSConsole* castedThis = static_cast<JSConsole*>(asObject(thisValue));
    Console* imp = static_cast<Console*>(castedThis->impl());
    RefPtr<ScriptArguments> scriptArguments(createScriptArguments(exec, 0));
    size_t maxStackSize = imp->shouldCaptureFullStackTrace() ? ScriptCallStack::maxCallStackSizeToCapture : 1;
    RefPtr<ScriptCallStack> callStack(createScriptCallStack(exec, maxStackSize));

    imp->dir(scriptArguments, callStack);
    return JSValue::encode(jsUndefined());
}