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

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

Issue 20191003: Route JS Error Info From Blink to Chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@gclient
Patch Set: Adam's requests Created 7 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010-2011 Google Inc. All rights reserved. 3 * Copyright (C) 2010-2011 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 16 matching lines...) Expand all
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30 #include "config.h" 30 #include "config.h"
31 #include "core/inspector/InspectorDebuggerAgent.h" 31 #include "core/inspector/InspectorDebuggerAgent.h"
32 #include "core/inspector/JavaScriptCallFrame.h" 32 #include "core/inspector/JavaScriptCallFrame.h"
33 33
34 #include "InspectorFrontend.h" 34 #include "InspectorFrontend.h"
35 #include "bindings/v8/ScriptDebugServer.h" 35 #include "bindings/v8/ScriptDebugServer.h"
36 #include "bindings/v8/ScriptObject.h" 36 #include "bindings/v8/ScriptObject.h"
37 #include "core/inspector/ConsoleMessage.h"
37 #include "core/inspector/ContentSearchUtils.h" 38 #include "core/inspector/ContentSearchUtils.h"
38 #include "core/inspector/InjectedScript.h" 39 #include "core/inspector/InjectedScript.h"
39 #include "core/inspector/InjectedScriptManager.h" 40 #include "core/inspector/InjectedScriptManager.h"
40 #include "core/inspector/InspectorPageAgent.h" 41 #include "core/inspector/InspectorPageAgent.h"
41 #include "core/inspector/InspectorState.h" 42 #include "core/inspector/InspectorState.h"
42 #include "core/inspector/InstrumentingAgents.h" 43 #include "core/inspector/InstrumentingAgents.h"
43 #include "core/inspector/ScriptArguments.h" 44 #include "core/inspector/ScriptArguments.h"
44 #include "core/inspector/ScriptCallStack.h" 45 #include "core/inspector/ScriptCallStack.h"
45 #include "core/loader/cache/CachedResource.h" 46 #include "core/loader/cache/CachedResource.h"
46 #include "core/platform/JSONValues.h" 47 #include "core/platform/JSONValues.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 void InspectorDebuggerAgent::addMessageToConsole(MessageSource source, MessageTy pe type, MessageLevel, const String&, PassRefPtr<ScriptCallStack>, unsigned long ) 214 void InspectorDebuggerAgent::addMessageToConsole(MessageSource source, MessageTy pe type, MessageLevel, const String&, PassRefPtr<ScriptCallStack>, unsigned long )
214 { 215 {
215 addMessageToConsole(source, type); 216 addMessageToConsole(source, type);
216 } 217 }
217 218
218 void InspectorDebuggerAgent::addMessageToConsole(MessageSource source, MessageTy pe type, MessageLevel, const String&, ScriptState*, PassRefPtr<ScriptArguments>, unsigned long) 219 void InspectorDebuggerAgent::addMessageToConsole(MessageSource source, MessageTy pe type, MessageLevel, const String&, ScriptState*, PassRefPtr<ScriptArguments>, unsigned long)
219 { 220 {
220 addMessageToConsole(source, type); 221 addMessageToConsole(source, type);
221 } 222 }
222 223
224 void InspectorDebuggerAgent::addMessageToConsole(PassOwnPtr<ConsoleMessage> mess age, InspectorAgent::CheckFrontendBehavior behavior)
225 {
226 if (behavior == InspectorAgent::DontCheckFrontend)
227 addMessageToConsole(message->source(), message->type());
228 }
229
223 230
224 static PassRefPtr<JSONObject> buildObjectForBreakpointCookie(const String& url, int lineNumber, int columnNumber, const String& condition, bool isRegex, bool is Anti) 231 static PassRefPtr<JSONObject> buildObjectForBreakpointCookie(const String& url, int lineNumber, int columnNumber, const String& condition, bool isRegex, bool is Anti)
225 { 232 {
226 RefPtr<JSONObject> breakpointObject = JSONObject::create(); 233 RefPtr<JSONObject> breakpointObject = JSONObject::create();
227 breakpointObject->setString(DebuggerAgentState::url, url); 234 breakpointObject->setString(DebuggerAgentState::url, url);
228 breakpointObject->setNumber(DebuggerAgentState::lineNumber, lineNumber); 235 breakpointObject->setNumber(DebuggerAgentState::lineNumber, lineNumber);
229 breakpointObject->setNumber(DebuggerAgentState::columnNumber, columnNumber); 236 breakpointObject->setNumber(DebuggerAgentState::columnNumber, columnNumber);
230 breakpointObject->setString(DebuggerAgentState::condition, condition); 237 breakpointObject->setString(DebuggerAgentState::condition, condition);
231 breakpointObject->setBoolean(DebuggerAgentState::isRegex, isRegex); 238 breakpointObject->setBoolean(DebuggerAgentState::isRegex, isRegex);
232 breakpointObject->setBoolean(DebuggerAgentState::isAnti, isAnti); 239 breakpointObject->setBoolean(DebuggerAgentState::isAnti, isAnti);
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 void InspectorDebuggerAgent::reset() 938 void InspectorDebuggerAgent::reset()
932 { 939 {
933 m_scripts.clear(); 940 m_scripts.clear();
934 m_breakpointIdToDebugServerBreakpointIds.clear(); 941 m_breakpointIdToDebugServerBreakpointIds.clear();
935 if (m_frontend) 942 if (m_frontend)
936 m_frontend->globalObjectCleared(); 943 m_frontend->globalObjectCleared();
937 } 944 }
938 945
939 } // namespace WebCore 946 } // namespace WebCore
940 947
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698