Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: Source/core/inspector/InspectorDebuggerAgent.cpp

Issue 1672443003: Fix devtools bugs Fix a spurious layout test failure (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/2454_1
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 bool InspectorDebuggerAgent::checkEnabled(ErrorString* errorString) 189 bool InspectorDebuggerAgent::checkEnabled(ErrorString* errorString)
190 { 190 {
191 if (enabled()) 191 if (enabled())
192 return true; 192 return true;
193 *errorString = "Debugger agent is not enabled"; 193 *errorString = "Debugger agent is not enabled";
194 return false; 194 return false;
195 } 195 }
196 196
197 void InspectorDebuggerAgent::enable() 197 void InspectorDebuggerAgent::enable()
198 { 198 {
199 if (dartAgent())
200 dartAgent()->enable(0);
201
199 m_instrumentingAgents->setInspectorDebuggerAgent(this); 202 m_instrumentingAgents->setInspectorDebuggerAgent(this);
200 // startListeningV8Debugger may result in reporting all parsed scripts to 203 // startListeningV8Debugger may result in reporting all parsed scripts to
201 // the agent so it should already be in enabled state by then. 204 // the agent so it should already be in enabled state by then.
202 m_state->setBoolean(DebuggerAgentState::debuggerEnabled, true); 205 m_state->setBoolean(DebuggerAgentState::debuggerEnabled, true);
203 startListeningV8Debugger(); 206 startListeningV8Debugger();
204 // FIXME(WK44513): breakpoints activated flag should be synchronized between all front-ends 207 // FIXME(WK44513): breakpoints activated flag should be synchronized between all front-ends
205 debugger().setBreakpointsActivated(true); 208 debugger().setBreakpointsActivated(true);
206 if (m_listener) 209 if (m_listener)
207 m_listener->debuggerWasEnabled(); 210 m_listener->debuggerWasEnabled();
208 } 211 }
209 212
210 void InspectorDebuggerAgent::disable() 213 void InspectorDebuggerAgent::disable()
211 { 214 {
215 if (dartAgent())
216 dartAgent()->disable(0);
217
212 m_state->setObject(DebuggerAgentState::javaScriptBreakpoints, JSONObject::cr eate()); 218 m_state->setObject(DebuggerAgentState::javaScriptBreakpoints, JSONObject::cr eate());
213 m_state->setLong(DebuggerAgentState::pauseOnExceptionsState, V8Debugger::Don tPauseOnExceptions); 219 m_state->setLong(DebuggerAgentState::pauseOnExceptionsState, V8Debugger::Don tPauseOnExceptions);
214 m_state->setString(DebuggerAgentState::skipStackPattern, ""); 220 m_state->setString(DebuggerAgentState::skipStackPattern, "");
215 m_state->setBoolean(DebuggerAgentState::skipContentScripts, false); 221 m_state->setBoolean(DebuggerAgentState::skipContentScripts, false);
216 m_state->setLong(DebuggerAgentState::asyncCallStackDepth, 0); 222 m_state->setLong(DebuggerAgentState::asyncCallStackDepth, 0);
217 m_state->setBoolean(DebuggerAgentState::promiseTrackerEnabled, false); 223 m_state->setBoolean(DebuggerAgentState::promiseTrackerEnabled, false);
218 m_instrumentingAgents->setInspectorDebuggerAgent(0); 224 m_instrumentingAgents->setInspectorDebuggerAgent(0);
219 225
220 stopListeningV8Debugger(); 226 stopListeningV8Debugger();
221 clear(); 227 clear();
(...skipping 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after
1885 RefPtr<ExceptionDetails> exceptionDetails = ExceptionDetails::create().setTe xt(toCoreStringWithUndefinedOrNullCheck(message->Get())); 1891 RefPtr<ExceptionDetails> exceptionDetails = ExceptionDetails::create().setTe xt(toCoreStringWithUndefinedOrNullCheck(message->Get()));
1886 exceptionDetails->setLine(message->GetLineNumber()); 1892 exceptionDetails->setLine(message->GetLineNumber());
1887 exceptionDetails->setColumn(message->GetStartColumn()); 1893 exceptionDetails->setColumn(message->GetStartColumn());
1888 v8::Local<v8::StackTrace> messageStackTrace = message->GetStackTrace(); 1894 v8::Local<v8::StackTrace> messageStackTrace = message->GetStackTrace();
1889 if (!messageStackTrace.IsEmpty() && messageStackTrace->GetFrameCount() > 0) 1895 if (!messageStackTrace.IsEmpty() && messageStackTrace->GetFrameCount() > 0)
1890 exceptionDetails->setStackTrace(createScriptCallStack(isolate, messageSt ackTrace, messageStackTrace->GetFrameCount())->buildInspectorArray()); 1896 exceptionDetails->setStackTrace(createScriptCallStack(isolate, messageSt ackTrace, messageStackTrace->GetFrameCount())->buildInspectorArray());
1891 return exceptionDetails.release(); 1897 return exceptionDetails.release();
1892 } 1898 }
1893 1899
1894 } // namespace blink 1900 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorDebuggerAgent.h ('k') | Source/devtools/front_end/console/ConsoleView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698