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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameConsole.cpp

Issue 1997293002: Introduce SourceLocation to be used for console messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 6 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) 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2013 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 String stackTrace; 93 String stackTrace;
94 if (consoleMessage->source() == ConsoleAPIMessageSource) { 94 if (consoleMessage->source() == ConsoleAPIMessageSource) {
95 if (!frame().host() || (consoleMessage->scriptArguments() && !consoleMes sage->scriptArguments()->argumentCount())) 95 if (!frame().host() || (consoleMessage->scriptArguments() && !consoleMes sage->scriptArguments()->argumentCount()))
96 return; 96 return;
97 if (!allClientReportingMessageTypes().contains(consoleMessage->type())) 97 if (!allClientReportingMessageTypes().contains(consoleMessage->type()))
98 return; 98 return;
99 if (frame().chromeClient().shouldReportDetailedMessageForSource(frame(), consoleMessage->url())) 99 if (frame().chromeClient().shouldReportDetailedMessageForSource(frame(), consoleMessage->url()))
100 stackTrace = ScriptCallStack::capture()->toString(); 100 stackTrace = ScriptCallStack::capture()->toString();
101 } else { 101 } else {
102 if (consoleMessage->callStack() && frame().chromeClient().shouldReportDe tailedMessageForSource(frame(), consoleMessage->url())) 102 if (consoleMessage->stackTrace() && frame().chromeClient().shouldReportD etailedMessageForSource(frame(), consoleMessage->url()))
103 stackTrace = consoleMessage->callStack()->toString(); 103 stackTrace = consoleMessage->stackTrace()->toString();
104 } 104 }
105 105
106 frame().chromeClient().addMessageToConsole(m_frame, consoleMessage->source() , consoleMessage->level(), consoleMessage->message(), consoleMessage->lineNumber (), consoleMessage->url(), stackTrace); 106 frame().chromeClient().addMessageToConsole(m_frame, consoleMessage->source() , consoleMessage->level(), consoleMessage->message(), consoleMessage->lineNumber (), consoleMessage->url(), stackTrace);
107 } 107 }
108 108
109 void FrameConsole::reportWorkerMessage(ConsoleMessage* consoleMessage) 109 void FrameConsole::reportWorkerMessage(ConsoleMessage* consoleMessage)
110 { 110 {
111 reportMessageToClient(consoleMessage); 111 reportMessageToClient(consoleMessage);
112 } 112 }
113 113
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 ConsoleMessage* consoleMessage = ConsoleMessage::createForRequest(NetworkMes sageSource, ErrorMessageLevel, message.toString(), error.failingURL(), requestId entifier); 170 ConsoleMessage* consoleMessage = ConsoleMessage::createForRequest(NetworkMes sageSource, ErrorMessageLevel, message.toString(), error.failingURL(), requestId entifier);
171 storage->reportMessage(m_frame->document(), consoleMessage); 171 storage->reportMessage(m_frame->document(), consoleMessage);
172 } 172 }
173 173
174 DEFINE_TRACE(FrameConsole) 174 DEFINE_TRACE(FrameConsole)
175 { 175 {
176 visitor->trace(m_frame); 176 visitor->trace(m_frame);
177 } 177 }
178 178
179 } // namespace blink 179 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/EventTarget.cpp ('k') | third_party/WebKit/Source/core/frame/LocalDOMWindow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698