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

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

Issue 451153002: Oilpan: Move ConsoleMessage to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 int muteCount = 0; 46 int muteCount = 0;
47 47
48 } 48 }
49 49
50 FrameConsole::FrameConsole(LocalFrame& frame) 50 FrameConsole::FrameConsole(LocalFrame& frame)
51 : m_frame(frame) 51 : m_frame(frame)
52 { 52 {
53 } 53 }
54 54
55 void FrameConsole::addMessage(PassRefPtr<ConsoleMessage> prpConsoleMessage) 55 void FrameConsole::addMessage(PassRefPtrWillBeRawPtr<ConsoleMessage> prpConsoleM essage)
56 { 56 {
57 if (muteCount) 57 if (muteCount)
58 return; 58 return;
59 59
60 // FIXME: This should not need to reach for the main-frame. 60 // FIXME: This should not need to reach for the main-frame.
61 // Inspector code should just take the current frame and know how to walk it self. 61 // Inspector code should just take the current frame and know how to walk it self.
62 ExecutionContext* context = m_frame.document(); 62 ExecutionContext* context = m_frame.document();
63 if (!context) 63 if (!context)
64 return; 64 return;
65 65
66 RefPtr<ConsoleMessage> consoleMessage = prpConsoleMessage; 66 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = prpConsoleMessage;
67 InspectorInstrumentation::addMessageToConsole(context, consoleMessage.get()) ; 67 InspectorInstrumentation::addMessageToConsole(context, consoleMessage.get()) ;
68 68
69 String messageURL; 69 String messageURL;
70 if (consoleMessage->callStack()) 70 if (consoleMessage->callStack())
71 messageURL = consoleMessage->callStack()->at(0).sourceURL(); 71 messageURL = consoleMessage->callStack()->at(0).sourceURL();
72 else 72 else
73 messageURL = consoleMessage->url(); 73 messageURL = consoleMessage->url();
74 74
75 if (consoleMessage->source() == CSSMessageSource) 75 if (consoleMessage->source() == CSSMessageSource)
76 return; 76 return;
(...skipping 28 matching lines...) Expand all
105 muteCount++; 105 muteCount++;
106 } 106 }
107 107
108 void FrameConsole::unmute() 108 void FrameConsole::unmute()
109 { 109 {
110 ASSERT(muteCount > 0); 110 ASSERT(muteCount > 0);
111 muteCount--; 111 muteCount--;
112 } 112 }
113 113
114 } // namespace blink 114 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698