| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 void Console::count(ScriptState* state, PassRefPtr<ScriptArguments> arguments) | 178 void Console::count(ScriptState* state, PassRefPtr<ScriptArguments> arguments) |
| 179 { | 179 { |
| 180 InspectorInstrumentation::consoleCount(page(), state, arguments); | 180 InspectorInstrumentation::consoleCount(page(), state, arguments); |
| 181 } | 181 } |
| 182 | 182 |
| 183 void Console::markTimeline(PassRefPtr<ScriptArguments> arguments) | 183 void Console::markTimeline(PassRefPtr<ScriptArguments> arguments) |
| 184 { | 184 { |
| 185 InspectorInstrumentation::consoleTimeStamp(m_frame, arguments); | 185 InspectorInstrumentation::consoleTimeStamp(m_frame, arguments); |
| 186 } | 186 } |
| 187 | 187 |
| 188 #if ENABLE(JAVASCRIPT_DEBUGGER) | |
| 189 | 188 |
| 190 void Console::profile(const String& title, ScriptState* state) | 189 void Console::profile(const String& title, ScriptState* state) |
| 191 { | 190 { |
| 192 Page* page = this->page(); | 191 Page* page = this->page(); |
| 193 if (!page) | 192 if (!page) |
| 194 return; | 193 return; |
| 195 | 194 |
| 196 // FIXME: log a console message when profiling is disabled. | 195 // FIXME: log a console message when profiling is disabled. |
| 197 if (!InspectorInstrumentation::profilerEnabled(page)) | 196 if (!InspectorInstrumentation::profilerEnabled(page)) |
| 198 return; | 197 return; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 219 | 218 |
| 220 RefPtr<ScriptProfile> profile = ScriptProfiler::stop(state, title); | 219 RefPtr<ScriptProfile> profile = ScriptProfiler::stop(state, title); |
| 221 if (!profile) | 220 if (!profile) |
| 222 return; | 221 return; |
| 223 | 222 |
| 224 m_profiles.append(profile); | 223 m_profiles.append(profile); |
| 225 RefPtr<ScriptCallStack> callStack(createScriptCallStack(state, 1)); | 224 RefPtr<ScriptCallStack> callStack(createScriptCallStack(state, 1)); |
| 226 InspectorInstrumentation::addProfile(page, profile, callStack); | 225 InspectorInstrumentation::addProfile(page, profile, callStack); |
| 227 } | 226 } |
| 228 | 227 |
| 229 #endif | |
| 230 | 228 |
| 231 void Console::time(const String& title) | 229 void Console::time(const String& title) |
| 232 { | 230 { |
| 233 InspectorInstrumentation::startConsoleTiming(m_frame, title); | 231 InspectorInstrumentation::startConsoleTiming(m_frame, title); |
| 234 #if PLATFORM(CHROMIUM) | 232 #if PLATFORM(CHROMIUM) |
| 235 TRACE_EVENT_COPY_ASYNC_BEGIN0("webkit", title.utf8().data(), this); | 233 TRACE_EVENT_COPY_ASYNC_BEGIN0("webkit", title.utf8().data(), this); |
| 236 #endif | 234 #endif |
| 237 } | 235 } |
| 238 | 236 |
| 239 void Console::timeEnd(ScriptState* state, const String& title) | 237 void Console::timeEnd(ScriptState* state, const String& title) |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 } | 271 } |
| 274 | 272 |
| 275 Page* Console::page() const | 273 Page* Console::page() const |
| 276 { | 274 { |
| 277 if (!m_frame) | 275 if (!m_frame) |
| 278 return 0; | 276 return 0; |
| 279 return m_frame->page(); | 277 return m_frame->page(); |
| 280 } | 278 } |
| 281 | 279 |
| 282 } // namespace WebCore | 280 } // namespace WebCore |
| OLD | NEW |