v8::Handle<v8::Value> V8Console::traceCallback(const v8::Arguments& args) { INC_STATS("DOM.Console.traceCallback"); Console* imp = V8Console::toNative(args.Holder()); RefPtr<ScriptArguments> scriptArguments(createScriptArguments(args, 0)); imp->trace(ScriptState::current(), scriptArguments.release()); return v8Undefined(); }
v8::Handle<v8::Value> V8Console::assertCallback(const v8::Arguments& args) { INC_STATS("DOM.Console.assertCallback"); Console* imp = V8Console::toNative(args.Holder()); bool condition = args[0]->BooleanValue(); RefPtr<ScriptArguments> scriptArguments(createScriptArguments(args, 1)); imp->assertCondition(ScriptState::current(), scriptArguments.release(), condition); return v8Undefined(); }
v8::Handle<v8::Value> V8Console::traceCallback(const v8::Arguments& args) { INC_STATS("DOM.Console.traceCallback"); Console* imp = V8Console::toNative(args.Holder()); RefPtr<ScriptCallStack> callStack(createScriptCallStack(ScriptCallStack::maxCallStackSizeToCapture)); RefPtr<ScriptArguments> scriptArguments(createScriptArguments(args, 0)); imp->trace(scriptArguments.release(), callStack); return v8Undefined(); }
EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionGroupCollapsed(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->groupCollapsed(scriptArguments, callStack); return JSValue::encode(jsUndefined()); }
EncodedJSValue JSC_HOST_CALL jsConsolePrototypeFunctionTimeEnd(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, 1)); size_t maxStackSize = imp->shouldCaptureFullStackTrace() ? ScriptCallStack::maxCallStackSizeToCapture : 1; RefPtr<ScriptCallStack> callStack(createScriptCallStack(exec, maxStackSize)); const String& title(valueToStringWithUndefinedOrNullCheck(exec, exec->argument(0))); if (exec->hadException()) return JSValue::encode(jsUndefined()); imp->timeEnd(title, scriptArguments, callStack); return JSValue::encode(jsUndefined()); }