| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 Google Inc. All rights reserved. | 2 * Copyright (c) 2011 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #include "gen/sky/bindings/core/v8/V8Window.h" | 34 #include "gen/sky/bindings/core/v8/V8Window.h" |
| 35 #include "sky/engine/bindings/core/v8/DOMWrapperWorld.h" | 35 #include "sky/engine/bindings/core/v8/DOMWrapperWorld.h" |
| 36 #include "sky/engine/bindings/core/v8/ScriptController.h" | 36 #include "sky/engine/bindings/core/v8/ScriptController.h" |
| 37 #include "sky/engine/bindings/core/v8/ScriptSourceCode.h" | 37 #include "sky/engine/bindings/core/v8/ScriptSourceCode.h" |
| 38 #include "sky/engine/bindings/core/v8/V8Binding.h" | 38 #include "sky/engine/bindings/core/v8/V8Binding.h" |
| 39 #include "sky/engine/bindings/core/v8/V8ScriptRunner.h" | 39 #include "sky/engine/bindings/core/v8/V8ScriptRunner.h" |
| 40 #include "sky/engine/bindings/core/v8/WindowProxy.h" | 40 #include "sky/engine/bindings/core/v8/WindowProxy.h" |
| 41 #include "sky/engine/core/dom/ExecutionContext.h" | 41 #include "sky/engine/core/dom/ExecutionContext.h" |
| 42 #include "sky/engine/core/frame/FrameConsole.h" | 42 #include "sky/engine/core/frame/FrameConsole.h" |
| 43 #include "sky/engine/core/frame/LocalFrame.h" | 43 #include "sky/engine/core/frame/LocalFrame.h" |
| 44 #include "sky/engine/core/inspector/InspectorTraceEvents.h" | |
| 45 #include "sky/engine/v8_inspector/inspector_host.h" | 44 #include "sky/engine/v8_inspector/inspector_host.h" |
| 46 #include "sky/engine/v8_inspector/ScriptDebugListener.h" | 45 #include "sky/engine/v8_inspector/ScriptDebugListener.h" |
| 47 #include "sky/engine/wtf/OwnPtr.h" | 46 #include "sky/engine/wtf/OwnPtr.h" |
| 48 #include "sky/engine/wtf/PassOwnPtr.h" | 47 #include "sky/engine/wtf/PassOwnPtr.h" |
| 49 #include "sky/engine/wtf/StdLibExtras.h" | 48 #include "sky/engine/wtf/StdLibExtras.h" |
| 50 #include "sky/engine/wtf/TemporaryChange.h" | 49 #include "sky/engine/wtf/TemporaryChange.h" |
| 51 | 50 |
| 52 namespace blink { | 51 namespace blink { |
| 53 | 52 |
| 54 PageScriptDebugServer& PageScriptDebugServer::shared() | 53 PageScriptDebugServer& PageScriptDebugServer::shared() |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 ScriptDebugServer::clearCompiledScripts(); | 147 ScriptDebugServer::clearCompiledScripts(); |
| 149 m_compiledScriptURLs.clear(); | 148 m_compiledScriptURLs.clear(); |
| 150 } | 149 } |
| 151 | 150 |
| 152 void PageScriptDebugServer::runScript(ScriptState* scriptState, const String& sc
riptId, ScriptValue* result, bool* wasThrown, String* exceptionDetailsText, int*
lineNumber, int* columnNumber, RefPtr<ScriptCallStack>* stackTrace) | 151 void PageScriptDebugServer::runScript(ScriptState* scriptState, const String& sc
riptId, ScriptValue* result, bool* wasThrown, String* exceptionDetailsText, int*
lineNumber, int* columnNumber, RefPtr<ScriptCallStack>* stackTrace) |
| 153 { | 152 { |
| 154 String sourceURL = m_compiledScriptURLs.take(scriptId); | 153 String sourceURL = m_compiledScriptURLs.take(scriptId); |
| 155 | 154 |
| 156 ExecutionContext* executionContext = scriptState->executionContext(); | 155 ExecutionContext* executionContext = scriptState->executionContext(); |
| 157 LocalFrame* frame = executionContext->executingWindow()->frame(); | 156 LocalFrame* frame = executionContext->executingWindow()->frame(); |
| 158 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "EvaluateScript
", "data", InspectorEvaluateScriptEvent::data(sourceURL, TextPosition::minimumPo
sition().m_line.oneBasedInt())); | |
| 159 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), "
CallStack", TRACE_EVENT_SCOPE_PROCESS, "stack", InspectorCallStackEvent::current
CallStack()); | |
| 160 | 157 |
| 161 RefPtr<LocalFrame> protect = frame; | 158 RefPtr<LocalFrame> protect = frame; |
| 162 ScriptDebugServer::runScript(scriptState, scriptId, result, wasThrown, excep
tionDetailsText, lineNumber, columnNumber, stackTrace); | 159 ScriptDebugServer::runScript(scriptState, scriptId, result, wasThrown, excep
tionDetailsText, lineNumber, columnNumber, stackTrace); |
| 163 | |
| 164 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Update
Counters", TRACE_EVENT_SCOPE_PROCESS, "data", InspectorUpdateCountersEvent::data
()); | |
| 165 } | 160 } |
| 166 | 161 |
| 167 ScriptDebugListener* PageScriptDebugServer::getDebugListenerForContext(v8::Handl
e<v8::Context> context) | 162 ScriptDebugListener* PageScriptDebugServer::getDebugListenerForContext(v8::Handl
e<v8::Context> context) |
| 168 { | 163 { |
| 169 inspector::InspectorHost* inspectorHost = m_inspectorHostResolver->inspector
HostFor(context); | 164 inspector::InspectorHost* inspectorHost = m_inspectorHostResolver->inspector
HostFor(context); |
| 170 if (!inspectorHost) | 165 if (!inspectorHost) |
| 171 return 0; | 166 return 0; |
| 172 return m_listenersMap.get(inspectorHost); | 167 return m_listenersMap.get(inspectorHost); |
| 173 } | 168 } |
| 174 | 169 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 186 | 181 |
| 187 m_pausedHost = 0; | 182 m_pausedHost = 0; |
| 188 } | 183 } |
| 189 | 184 |
| 190 void PageScriptDebugServer::quitMessageLoopOnPause() | 185 void PageScriptDebugServer::quitMessageLoopOnPause() |
| 191 { | 186 { |
| 192 m_clientMessageLoop->quitNow(); | 187 m_clientMessageLoop->quitNow(); |
| 193 } | 188 } |
| 194 | 189 |
| 195 } // namespace blink | 190 } // namespace blink |
| OLD | NEW |