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

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

Issue 2769263004: Remove Frame::host() method (Closed)
Patch Set: Created 3 years, 9 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 void FrameConsole::reportMessageToClient(MessageSource source, 79 void FrameConsole::reportMessageToClient(MessageSource source,
80 MessageLevel level, 80 MessageLevel level,
81 const String& message, 81 const String& message,
82 SourceLocation* location) { 82 SourceLocation* location) {
83 if (source == NetworkMessageSource) 83 if (source == NetworkMessageSource)
84 return; 84 return;
85 85
86 String url = location->url(); 86 String url = location->url();
87 String stackTrace; 87 String stackTrace;
88 if (source == ConsoleAPIMessageSource) { 88 if (source == ConsoleAPIMessageSource) {
89 if (!m_frame->host()) 89 if (!m_frame->page())
90 return; 90 return;
91 if (m_frame->chromeClient().shouldReportDetailedMessageForSource(*m_frame, 91 if (m_frame->chromeClient().shouldReportDetailedMessageForSource(*m_frame,
92 url)) { 92 url)) {
93 std::unique_ptr<SourceLocation> fullLocation = 93 std::unique_ptr<SourceLocation> fullLocation =
94 SourceLocation::captureWithFullStackTrace(); 94 SourceLocation::captureWithFullStackTrace();
95 if (!fullLocation->isUnknown()) 95 if (!fullLocation->isUnknown())
96 stackTrace = fullLocation->toString(); 96 stackTrace = fullLocation->toString();
97 } 97 }
98 } else { 98 } else {
99 if (!location->isUnknown() && 99 if (!location->isUnknown() &&
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 addMessageToStorage(ConsoleMessage::createForRequest( 156 addMessageToStorage(ConsoleMessage::createForRequest(
157 NetworkMessageSource, ErrorMessageLevel, message.toString(), 157 NetworkMessageSource, ErrorMessageLevel, message.toString(),
158 error.failingURL(), requestIdentifier)); 158 error.failingURL(), requestIdentifier));
159 } 159 }
160 160
161 DEFINE_TRACE(FrameConsole) { 161 DEFINE_TRACE(FrameConsole) {
162 visitor->trace(m_frame); 162 visitor->trace(m_frame);
163 } 163 }
164 164
165 } // namespace blink 165 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698