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

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

Issue 761143003: DevTools: remove ScriptPreprocessor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 m_state->setObject(DebuggerAgentState::javaScriptBreakpoints, JSONObject::cr eate()); 191 m_state->setObject(DebuggerAgentState::javaScriptBreakpoints, JSONObject::cr eate());
192 m_state->setLong(DebuggerAgentState::pauseOnExceptionsState, ScriptDebugServ er::DontPauseOnExceptions); 192 m_state->setLong(DebuggerAgentState::pauseOnExceptionsState, ScriptDebugServ er::DontPauseOnExceptions);
193 m_state->setString(DebuggerAgentState::skipStackPattern, ""); 193 m_state->setString(DebuggerAgentState::skipStackPattern, "");
194 m_state->setBoolean(DebuggerAgentState::skipContentScripts, false); 194 m_state->setBoolean(DebuggerAgentState::skipContentScripts, false);
195 m_state->setLong(DebuggerAgentState::asyncCallStackDepth, 0); 195 m_state->setLong(DebuggerAgentState::asyncCallStackDepth, 0);
196 m_state->setBoolean(DebuggerAgentState::promiseTrackerEnabled, false); 196 m_state->setBoolean(DebuggerAgentState::promiseTrackerEnabled, false);
197 m_instrumentingAgents->setInspectorDebuggerAgent(0); 197 m_instrumentingAgents->setInspectorDebuggerAgent(0);
198 198
199 scriptDebugServer().clearBreakpoints(); 199 scriptDebugServer().clearBreakpoints();
200 scriptDebugServer().clearCompiledScripts(); 200 scriptDebugServer().clearCompiledScripts();
201 scriptDebugServer().clearPreprocessor();
202 stopListeningScriptDebugServer(); 201 stopListeningScriptDebugServer();
203 clear(); 202 clear();
204 203
205 if (m_listener) 204 if (m_listener)
206 m_listener->debuggerWasDisabled(); 205 m_listener->debuggerWasDisabled();
207 206
208 m_skipAllPauses = false; 207 m_skipAllPauses = false;
209 } 208 }
210 209
211 bool InspectorDebuggerAgent::enabled() 210 bool InspectorDebuggerAgent::enabled()
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 { 326 {
328 return scriptDebugServer().isPaused(); 327 return scriptDebugServer().isPaused();
329 } 328 }
330 329
331 void InspectorDebuggerAgent::addMessageToConsole(ConsoleMessage* consoleMessage) 330 void InspectorDebuggerAgent::addMessageToConsole(ConsoleMessage* consoleMessage)
332 { 331 {
333 if (consoleMessage->type() == AssertMessageType && scriptDebugServer().pause OnExceptionsState() != ScriptDebugServer::DontPauseOnExceptions) 332 if (consoleMessage->type() == AssertMessageType && scriptDebugServer().pause OnExceptionsState() != ScriptDebugServer::DontPauseOnExceptions)
334 breakProgram(InspectorFrontend::Debugger::Reason::Assert, nullptr); 333 breakProgram(InspectorFrontend::Debugger::Reason::Assert, nullptr);
335 } 334 }
336 335
337 String InspectorDebuggerAgent::preprocessEventListener(LocalFrame* frame, const String& source, const String& url, const String& functionName)
338 {
339 return scriptDebugServer().preprocessEventListener(frame, source, url, funct ionName);
340 }
341
342 ScriptSourceCode InspectorDebuggerAgent::preprocess(LocalFrame* frame, const Scr iptSourceCode& sourceCode)
343 {
344 return scriptDebugServer().preprocess(frame, sourceCode);
345 }
346
347 static PassRefPtr<JSONObject> buildObjectForBreakpointCookie(const String& url, int lineNumber, int columnNumber, const String& condition, bool isRegex) 336 static PassRefPtr<JSONObject> buildObjectForBreakpointCookie(const String& url, int lineNumber, int columnNumber, const String& condition, bool isRegex)
348 { 337 {
349 RefPtr<JSONObject> breakpointObject = JSONObject::create(); 338 RefPtr<JSONObject> breakpointObject = JSONObject::create();
350 breakpointObject->setString(DebuggerAgentState::url, url); 339 breakpointObject->setString(DebuggerAgentState::url, url);
351 breakpointObject->setNumber(DebuggerAgentState::lineNumber, lineNumber); 340 breakpointObject->setNumber(DebuggerAgentState::lineNumber, lineNumber);
352 breakpointObject->setNumber(DebuggerAgentState::columnNumber, columnNumber); 341 breakpointObject->setNumber(DebuggerAgentState::columnNumber, columnNumber);
353 breakpointObject->setString(DebuggerAgentState::condition, condition); 342 breakpointObject->setString(DebuggerAgentState::condition, condition);
354 breakpointObject->setBoolean(DebuggerAgentState::isRegex, isRegex); 343 breakpointObject->setBoolean(DebuggerAgentState::isRegex, isRegex);
355 return breakpointObject; 344 return breakpointObject;
356 } 345 }
(...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1590 visitor->trace(m_v8AsyncCallTracker); 1579 visitor->trace(m_v8AsyncCallTracker);
1591 visitor->trace(m_promiseTracker); 1580 visitor->trace(m_promiseTracker);
1592 visitor->trace(m_asyncOperations); 1581 visitor->trace(m_asyncOperations);
1593 visitor->trace(m_currentAsyncCallChain); 1582 visitor->trace(m_currentAsyncCallChain);
1594 visitor->trace(m_asyncCallTrackingListeners); 1583 visitor->trace(m_asyncCallTrackingListeners);
1595 #endif 1584 #endif
1596 InspectorBaseAgent::trace(visitor); 1585 InspectorBaseAgent::trace(visitor);
1597 } 1586 }
1598 1587
1599 } // namespace blink 1588 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorDebuggerAgent.h ('k') | Source/core/inspector/InspectorInstrumentation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698