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

Side by Side Diff: Source/core/page/Console.cpp

Issue 15820002: Page::chrome() should return a reference. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/page/Chrome.cpp ('k') | Source/core/page/DOMWindow.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 size_t stackSize = printTrace ? ScriptCallStack::maxCallStackSizeToCapture : 1; 83 size_t stackSize = printTrace ? ScriptCallStack::maxCallStackSizeToCapture : 1;
84 RefPtr<ScriptCallStack> callStack(createScriptCallStack(state, stackSize)); 84 RefPtr<ScriptCallStack> callStack(createScriptCallStack(state, stackSize));
85 const ScriptCallFrame& lastCaller = callStack->at(0); 85 const ScriptCallFrame& lastCaller = callStack->at(0);
86 86
87 String message; 87 String message;
88 bool gotMessage = arguments->getFirstArgumentAsString(message); 88 bool gotMessage = arguments->getFirstArgumentAsString(message);
89 InspectorInstrumentation::addMessageToConsole(page, ConsoleAPIMessageSource, type, level, message, state, arguments); 89 InspectorInstrumentation::addMessageToConsole(page, ConsoleAPIMessageSource, type, level, message, state, arguments);
90 90
91 if (gotMessage) 91 if (gotMessage)
92 page->chrome()->client()->addMessageToConsole(ConsoleAPIMessageSource, t ype, level, message, lastCaller.lineNumber(), lastCaller.sourceURL()); 92 page->chrome().client()->addMessageToConsole(ConsoleAPIMessageSource, ty pe, level, message, lastCaller.lineNumber(), lastCaller.sourceURL());
93 } 93 }
94 94
95 void Console::debug(ScriptState* state, PassRefPtr<ScriptArguments> arguments) 95 void Console::debug(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
96 { 96 {
97 internalAddMessage(page(), LogMessageType, DebugMessageLevel, state, argumen ts); 97 internalAddMessage(page(), LogMessageType, DebugMessageLevel, state, argumen ts);
98 } 98 }
99 99
100 void Console::error(ScriptState* state, PassRefPtr<ScriptArguments> arguments) 100 void Console::error(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
101 { 101 {
102 internalAddMessage(page(), LogMessageType, ErrorMessageLevel, state, argumen ts); 102 internalAddMessage(page(), LogMessageType, ErrorMessageLevel, state, argumen ts);
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 241 }
242 242
243 Page* Console::page() const 243 Page* Console::page() const
244 { 244 {
245 if (!m_frame) 245 if (!m_frame)
246 return 0; 246 return 0;
247 return m_frame->page(); 247 return m_frame->page();
248 } 248 }
249 249
250 } // namespace WebCore 250 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/Chrome.cpp ('k') | Source/core/page/DOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698