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

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

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. 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 20 matching lines...) Expand all
31 #include "bindings/core/v8/SourceLocation.h" 31 #include "bindings/core/v8/SourceLocation.h"
32 #include "core/frame/FrameHost.h" 32 #include "core/frame/FrameHost.h"
33 #include "core/inspector/ConsoleMessage.h" 33 #include "core/inspector/ConsoleMessage.h"
34 #include "core/inspector/ConsoleMessageStorage.h" 34 #include "core/inspector/ConsoleMessageStorage.h"
35 #include "core/inspector/InspectorConsoleInstrumentation.h" 35 #include "core/inspector/InspectorConsoleInstrumentation.h"
36 #include "core/page/ChromeClient.h" 36 #include "core/page/ChromeClient.h"
37 #include "core/page/Page.h" 37 #include "core/page/Page.h"
38 #include "platform/network/ResourceError.h" 38 #include "platform/network/ResourceError.h"
39 #include "platform/network/ResourceResponse.h" 39 #include "platform/network/ResourceResponse.h"
40 #include "wtf/text/StringBuilder.h" 40 #include "wtf/text/StringBuilder.h"
41 #include <memory>
41 42
42 namespace blink { 43 namespace blink {
43 44
44 namespace { 45 namespace {
45 46
46 int muteCount = 0; 47 int muteCount = 0;
47 48
48 } 49 }
49 50
50 FrameConsole::FrameConsole(LocalFrame& frame) 51 FrameConsole::FrameConsole(LocalFrame& frame)
(...skipping 23 matching lines...) Expand all
74 return; 75 return;
75 if (consoleMessage->source() == NetworkMessageSource) 76 if (consoleMessage->source() == NetworkMessageSource)
76 return; 77 return;
77 78
78 String url = consoleMessage->location()->url(); 79 String url = consoleMessage->location()->url();
79 String stackTrace; 80 String stackTrace;
80 if (consoleMessage->source() == ConsoleAPIMessageSource) { 81 if (consoleMessage->source() == ConsoleAPIMessageSource) {
81 if (!frame().host()) 82 if (!frame().host())
82 return; 83 return;
83 if (frame().chromeClient().shouldReportDetailedMessageForSource(frame(), url)) { 84 if (frame().chromeClient().shouldReportDetailedMessageForSource(frame(), url)) {
84 OwnPtr<SourceLocation> location = SourceLocation::captureWithFullSta ckTrace(); 85 std::unique_ptr<SourceLocation> location = SourceLocation::captureWi thFullStackTrace();
85 if (!location->isUnknown()) 86 if (!location->isUnknown())
86 stackTrace = location->toString(); 87 stackTrace = location->toString();
87 } 88 }
88 } else { 89 } else {
89 if (!consoleMessage->location()->isUnknown() && frame().chromeClient().s houldReportDetailedMessageForSource(frame(), url)) 90 if (!consoleMessage->location()->isUnknown() && frame().chromeClient().s houldReportDetailedMessageForSource(frame(), url))
90 stackTrace = consoleMessage->location()->toString(); 91 stackTrace = consoleMessage->location()->toString();
91 } 92 }
92 93
93 frame().chromeClient().addMessageToConsole(m_frame, consoleMessage->source() , consoleMessage->level(), consoleMessage->message(), consoleMessage->location() ->lineNumber(), url, stackTrace); 94 frame().chromeClient().addMessageToConsole(m_frame, consoleMessage->source() , consoleMessage->level(), consoleMessage->message(), consoleMessage->location() ->lineNumber(), url, stackTrace);
94 } 95 }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 ConsoleMessage* consoleMessage = ConsoleMessage::createForRequest(NetworkMes sageSource, ErrorMessageLevel, message.toString(), error.failingURL(), requestId entifier); 158 ConsoleMessage* consoleMessage = ConsoleMessage::createForRequest(NetworkMes sageSource, ErrorMessageLevel, message.toString(), error.failingURL(), requestId entifier);
158 storage->reportMessage(m_frame->document(), consoleMessage); 159 storage->reportMessage(m_frame->document(), consoleMessage);
159 } 160 }
160 161
161 DEFINE_TRACE(FrameConsole) 162 DEFINE_TRACE(FrameConsole)
162 { 163 {
163 visitor->trace(m_frame); 164 visitor->trace(m_frame);
164 } 165 }
165 166
166 } // namespace blink 167 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameConsole.h ('k') | third_party/WebKit/Source/core/frame/FrameHost.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698