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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 void PageScriptDebugServer::interruptAndRun(PassOwnPtr<Task> task) | 158 void PageScriptDebugServer::interruptAndRun(PassOwnPtr<Task> task) |
159 { | 159 { |
160 ScriptDebugServer::interruptAndRun(task, s_mainThreadIsolate); | 160 ScriptDebugServer::interruptAndRun(task, s_mainThreadIsolate); |
161 } | 161 } |
162 | 162 |
163 void PageScriptDebugServer::setClientMessageLoop(PassOwnPtr<ClientMessageLoop> c
lientMessageLoop) | 163 void PageScriptDebugServer::setClientMessageLoop(PassOwnPtr<ClientMessageLoop> c
lientMessageLoop) |
164 { | 164 { |
165 m_clientMessageLoop = clientMessageLoop; | 165 m_clientMessageLoop = clientMessageLoop; |
166 } | 166 } |
167 | 167 |
168 void PageScriptDebugServer::compileScript(ScriptState* scriptState, const String
& expression, const String& sourceURL, String* scriptId, String* exceptionMessag
e) | 168 void PageScriptDebugServer::compileScript(ScriptState* scriptState, const String
& expression, const String& sourceURL, String* scriptId, String* exceptionDetail
sText, int* lineNumber, int* columnNumber, RefPtr<ScriptCallStack>* stackTrace) |
169 { | 169 { |
170 ExecutionContext* executionContext = scriptState->executionContext(); | 170 ExecutionContext* executionContext = scriptState->executionContext(); |
171 RefPtr<LocalFrame> protect = toDocument(executionContext)->frame(); | 171 RefPtr<LocalFrame> protect = toDocument(executionContext)->frame(); |
172 ScriptDebugServer::compileScript(scriptState, expression, sourceURL, scriptI
d, exceptionMessage); | 172 ScriptDebugServer::compileScript(scriptState, expression, sourceURL, scriptI
d, exceptionDetailsText, lineNumber, columnNumber, stackTrace); |
173 if (!scriptId->isNull()) | 173 if (!scriptId->isNull()) |
174 m_compiledScriptURLs.set(*scriptId, sourceURL); | 174 m_compiledScriptURLs.set(*scriptId, sourceURL); |
175 } | 175 } |
176 | 176 |
177 void PageScriptDebugServer::clearCompiledScripts() | 177 void PageScriptDebugServer::clearCompiledScripts() |
178 { | 178 { |
179 ScriptDebugServer::clearCompiledScripts(); | 179 ScriptDebugServer::clearCompiledScripts(); |
180 m_compiledScriptURLs.clear(); | 180 m_compiledScriptURLs.clear(); |
181 } | 181 } |
182 | 182 |
183 void PageScriptDebugServer::runScript(ScriptState* scriptState, const String& sc
riptId, ScriptValue* result, bool* wasThrown, String* exceptionMessage) | 183 void PageScriptDebugServer::runScript(ScriptState* scriptState, const String& sc
riptId, ScriptValue* result, bool* wasThrown, String* exceptionDetailsText, int*
lineNumber, int* columnNumber, RefPtr<ScriptCallStack>* stackTrace) |
184 { | 184 { |
185 String sourceURL = m_compiledScriptURLs.take(scriptId); | 185 String sourceURL = m_compiledScriptURLs.take(scriptId); |
186 | 186 |
187 ExecutionContext* executionContext = scriptState->executionContext(); | 187 ExecutionContext* executionContext = scriptState->executionContext(); |
188 LocalFrame* frame = toDocument(executionContext)->frame(); | 188 LocalFrame* frame = toDocument(executionContext)->frame(); |
189 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "EvaluateScript
", "data", InspectorEvaluateScriptEvent::data(frame, sourceURL, TextPosition::mi
nimumPosition().m_line.oneBasedInt())); | 189 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "EvaluateScript
", "data", InspectorEvaluateScriptEvent::data(frame, sourceURL, TextPosition::mi
nimumPosition().m_line.oneBasedInt())); |
190 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), "
CallStack", "stack", InspectorCallStackEvent::currentCallStack()); | 190 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), "
CallStack", "stack", InspectorCallStackEvent::currentCallStack()); |
191 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. | 191 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. |
192 InspectorInstrumentationCookie cookie; | 192 InspectorInstrumentationCookie cookie; |
193 if (frame) | 193 if (frame) |
194 cookie = InspectorInstrumentation::willEvaluateScript(frame, sourceURL,
TextPosition::minimumPosition().m_line.oneBasedInt()); | 194 cookie = InspectorInstrumentation::willEvaluateScript(frame, sourceURL,
TextPosition::minimumPosition().m_line.oneBasedInt()); |
195 | 195 |
196 RefPtr<LocalFrame> protect = frame; | 196 RefPtr<LocalFrame> protect = frame; |
197 ScriptDebugServer::runScript(scriptState, scriptId, result, wasThrown, excep
tionMessage); | 197 ScriptDebugServer::runScript(scriptState, scriptId, result, wasThrown, excep
tionDetailsText, lineNumber, columnNumber, stackTrace); |
198 | 198 |
199 if (frame) | 199 if (frame) |
200 InspectorInstrumentation::didEvaluateScript(cookie); | 200 InspectorInstrumentation::didEvaluateScript(cookie); |
201 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Update
Counters", "data", InspectorUpdateCountersEvent::data()); | 201 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Update
Counters", "data", InspectorUpdateCountersEvent::data()); |
202 } | 202 } |
203 | 203 |
204 ScriptDebugListener* PageScriptDebugServer::getDebugListenerForContext(v8::Handl
e<v8::Context> context) | 204 ScriptDebugListener* PageScriptDebugServer::getDebugListenerForContext(v8::Handl
e<v8::Context> context) |
205 { | 205 { |
206 v8::HandleScope scope(m_isolate); | 206 v8::HandleScope scope(m_isolate); |
207 LocalFrame* frame = retrieveFrameWithGlobalObjectCheck(context); | 207 LocalFrame* frame = retrieveFrameWithGlobalObjectCheck(context); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 UseCounter::muteForInspector(); | 311 UseCounter::muteForInspector(); |
312 } | 312 } |
313 | 313 |
314 void PageScriptDebugServer::unmuteWarningsAndDeprecations() | 314 void PageScriptDebugServer::unmuteWarningsAndDeprecations() |
315 { | 315 { |
316 FrameConsole::unmute(); | 316 FrameConsole::unmute(); |
317 UseCounter::unmuteForInspector(); | 317 UseCounter::unmuteForInspector(); |
318 } | 318 } |
319 | 319 |
320 } // namespace WebCore | 320 } // namespace WebCore |
OLD | NEW |