diff options
Diffstat (limited to 'WebCore/bindings/js/JSConsoleCustom.cpp')
-rw-r--r-- | WebCore/bindings/js/JSConsoleCustom.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/WebCore/bindings/js/JSConsoleCustom.cpp b/WebCore/bindings/js/JSConsoleCustom.cpp index 9c48467..8366b39 100644 --- a/WebCore/bindings/js/JSConsoleCustom.cpp +++ b/WebCore/bindings/js/JSConsoleCustom.cpp @@ -26,6 +26,7 @@ #include "config.h" #include "JSConsole.h" #include "JavaScriptProfile.h" +#include "ScriptCallStack.h" #include <runtime/JSArray.h> #include "Console.h" @@ -50,6 +51,22 @@ JSValue JSConsole::profiles(ExecState* exec) const return constructArray(exec, list); } +JSValue JSConsole::profile(ExecState* exec, const ArgList& args) +{ + ScriptCallStack callStack(exec, args, 1); + const UString title = valueToStringWithUndefinedOrNullCheck(exec, args.at(0)); + impl()->profile(title, &callStack); + return jsUndefined(); +} + +JSValue JSConsole::profileEnd(ExecState* exec, const ArgList& args) +{ + ScriptCallStack callStack(exec, args, 1); + const UString title = valueToStringWithUndefinedOrNullCheck(exec, args.at(0)); + impl()->profileEnd(title, &callStack); + return jsUndefined(); +} + #endif } // namespace WebCore |