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

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

Issue 2878933003: Makes WorkerInspectorProxy work with ExecutionContext instead of Document (Closed)
Patch Set: . Created 3 years, 7 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 if (!location->IsUnknown() && 98 if (!location->IsUnknown() &&
99 frame_->GetChromeClient().ShouldReportDetailedMessageForSource(*frame_, 99 frame_->GetChromeClient().ShouldReportDetailedMessageForSource(*frame_,
100 url)) 100 url))
101 stack_trace = location->ToString(); 101 stack_trace = location->ToString();
102 } 102 }
103 103
104 frame_->GetChromeClient().AddMessageToConsole( 104 frame_->GetChromeClient().AddMessageToConsole(
105 frame_, source, level, message, location->LineNumber(), url, stack_trace); 105 frame_, source, level, message, location->LineNumber(), url, stack_trace);
106 } 106 }
107 107
108 void FrameConsole::AddMessageFromWorker(
109 MessageLevel level,
110 const String& message,
111 std::unique_ptr<SourceLocation> location,
112 const String& worker_id) {
113 ReportMessageToClient(kWorkerMessageSource, level, message, location.get());
114 AddMessageToStorage(ConsoleMessage::CreateFromWorker(
115 level, message, std::move(location), worker_id));
116 }
117
118 void FrameConsole::AddSingletonMessage(ConsoleMessage* console_message) { 108 void FrameConsole::AddSingletonMessage(ConsoleMessage* console_message) {
119 if (singleton_messages_.Contains(console_message->Message())) 109 if (singleton_messages_.Contains(console_message->Message()))
120 return; 110 return;
121 singleton_messages_.insert(console_message->Message()); 111 singleton_messages_.insert(console_message->Message());
122 AddMessage(console_message); 112 AddMessage(console_message);
123 } 113 }
124 114
125 void FrameConsole::ReportResourceResponseReceived( 115 void FrameConsole::ReportResourceResponseReceived(
126 DocumentLoader* loader, 116 DocumentLoader* loader,
127 unsigned long request_identifier, 117 unsigned long request_identifier,
(...skipping 27 matching lines...) Expand all
155 AddMessageToStorage(ConsoleMessage::CreateForRequest( 145 AddMessageToStorage(ConsoleMessage::CreateForRequest(
156 kNetworkMessageSource, kErrorMessageLevel, message.ToString(), 146 kNetworkMessageSource, kErrorMessageLevel, message.ToString(),
157 error.FailingURL(), request_identifier)); 147 error.FailingURL(), request_identifier));
158 } 148 }
159 149
160 DEFINE_TRACE(FrameConsole) { 150 DEFINE_TRACE(FrameConsole) {
161 visitor->Trace(frame_); 151 visitor->Trace(frame_);
162 } 152 }
163 153
164 } // namespace blink 154 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698