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

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

Issue 1601283003: DevTools: deoilpanize inspector/v8 and related classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed. Created 4 years, 11 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) 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 void ConsoleBase::assertCondition(ScriptState* scriptState, PassRefPtrWillBeRawP tr<ScriptArguments> arguments, bool condition) 96 void ConsoleBase::assertCondition(ScriptState* scriptState, PassRefPtrWillBeRawP tr<ScriptArguments> arguments, bool condition)
97 { 97 {
98 if (condition) 98 if (condition)
99 return; 99 return;
100 100
101 internalAddMessage(AssertMessageType, ErrorMessageLevel, scriptState, argume nts, true); 101 internalAddMessage(AssertMessageType, ErrorMessageLevel, scriptState, argume nts, true);
102 } 102 }
103 103
104 void ConsoleBase::count(ScriptState* scriptState, PassRefPtrWillBeRawPtr<ScriptA rguments> arguments) 104 void ConsoleBase::count(ScriptState* scriptState, PassRefPtrWillBeRawPtr<ScriptA rguments> arguments)
105 { 105 {
106 RefPtrWillBeRawPtr<ScriptCallStack> callStack(currentScriptCallStackForConso le(1)); 106 RefPtr<ScriptCallStack> callStack(currentScriptCallStackForConsole(1));
107 const ScriptCallFrame& lastCaller = callStack->at(0); 107 const ScriptCallFrame& lastCaller = callStack->at(0);
108 // Follow Firebug's behavior of counting with null and undefined title in 108 // Follow Firebug's behavior of counting with null and undefined title in
109 // the same bucket as no argument 109 // the same bucket as no argument
110 String title; 110 String title;
111 arguments->getFirstArgumentAsString(title); 111 arguments->getFirstArgumentAsString(title);
112 String identifier = title.isEmpty() ? String(lastCaller.sourceURL() + ':' + String::number(lastCaller.lineNumber())) 112 String identifier = title.isEmpty() ? String(lastCaller.sourceURL() + ':' + String::number(lastCaller.lineNumber()))
113 : String(title + '@'); 113 : String(title + '@');
114 114
115 HashCountedSet<String>::AddResult result = m_counts.add(identifier); 115 HashCountedSet<String>::AddResult result = m_counts.add(identifier);
116 String message = title + ": " + String::number(result.storedValue->value); 116 String message = title + ": " + String::number(result.storedValue->value);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 arguments->getFirstArgumentAsString(message); 221 arguments->getFirstArgumentAsString(message);
222 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(C onsoleAPIMessageSource, level, message); 222 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(C onsoleAPIMessageSource, level, message);
223 consoleMessage->setType(type); 223 consoleMessage->setType(type);
224 consoleMessage->setScriptState(scriptState); 224 consoleMessage->setScriptState(scriptState);
225 consoleMessage->setScriptArguments(arguments); 225 consoleMessage->setScriptArguments(arguments);
226 consoleMessage->setCallStack(currentScriptCallStackForConsole(ScriptCallStac k::maxCallStackSizeToCapture)); 226 consoleMessage->setCallStack(currentScriptCallStackForConsole(ScriptCallStac k::maxCallStackSizeToCapture));
227 reportMessageToConsole(consoleMessage.release()); 227 reportMessageToConsole(consoleMessage.release());
228 } 228 }
229 229
230 } // namespace blink 230 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ExecutionContext.cpp ('k') | third_party/WebKit/Source/core/frame/DOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698