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

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

Issue 458253002: [DevTools] Removed ScriptState from createScriptCallStackForConsole (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
« no previous file with comments | « Source/core/frame/ConsoleBase.h ('k') | Source/core/frame/ConsoleBase.idl » ('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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 void ConsoleBase::count(ScriptState* scriptState, PassRefPtrWillBeRawPtr<ScriptA rguments> arguments) 104 void ConsoleBase::count(ScriptState* scriptState, PassRefPtrWillBeRawPtr<ScriptA rguments> arguments)
105 { 105 {
106 InspectorInstrumentation::consoleCount(context(), scriptState, arguments); 106 InspectorInstrumentation::consoleCount(context(), scriptState, arguments);
107 } 107 }
108 108
109 void ConsoleBase::markTimeline(const String& title) 109 void ConsoleBase::markTimeline(const String& title)
110 { 110 {
111 timeStamp(title); 111 timeStamp(title);
112 } 112 }
113 113
114 void ConsoleBase::profile(ScriptState* scriptState, const String& title) 114 void ConsoleBase::profile(const String& title)
115 { 115 {
116 InspectorInstrumentation::consoleProfile(context(), title, scriptState); 116 InspectorInstrumentation::consoleProfile(context(), title);
117 } 117 }
118 118
119 void ConsoleBase::profileEnd(ScriptState* scriptState, const String& title) 119 void ConsoleBase::profileEnd(const String& title)
120 { 120 {
121 InspectorInstrumentation::consoleProfileEnd(context(), title, scriptState); 121 InspectorInstrumentation::consoleProfileEnd(context(), title);
122 } 122 }
123 123
124 void ConsoleBase::time(const String& title) 124 void ConsoleBase::time(const String& title)
125 { 125 {
126 InspectorInstrumentation::consoleTime(context(), title); 126 InspectorInstrumentation::consoleTime(context(), title);
127 TRACE_EVENT_COPY_ASYNC_BEGIN0("blink.console", title.utf8().data(), this); 127 TRACE_EVENT_COPY_ASYNC_BEGIN0("blink.console", title.utf8().data(), this);
128 } 128 }
129 129
130 void ConsoleBase::timeEnd(ScriptState* scriptState, const String& title) 130 void ConsoleBase::timeEnd(ScriptState* scriptState, const String& title)
131 { 131 {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 void ConsoleBase::internalAddMessage(MessageType type, MessageLevel level, Scrip tState* scriptState, PassRefPtrWillBeRawPtr<ScriptArguments> scriptArguments, bo ol acceptNoArguments, bool printTrace) 168 void ConsoleBase::internalAddMessage(MessageType type, MessageLevel level, Scrip tState* scriptState, PassRefPtrWillBeRawPtr<ScriptArguments> scriptArguments, bo ol acceptNoArguments, bool printTrace)
169 { 169 {
170 if (!context()) 170 if (!context())
171 return; 171 return;
172 172
173 RefPtrWillBeRawPtr<ScriptArguments> arguments = scriptArguments; 173 RefPtrWillBeRawPtr<ScriptArguments> arguments = scriptArguments;
174 if (!acceptNoArguments && !arguments->argumentCount()) 174 if (!acceptNoArguments && !arguments->argumentCount())
175 return; 175 return;
176 176
177 size_t stackSize = printTrace ? ScriptCallStack::maxCallStackSizeToCapture : 1; 177 size_t stackSize = printTrace ? ScriptCallStack::maxCallStackSizeToCapture : 1;
178 RefPtrWillBeRawPtr<ScriptCallStack> callStack(createScriptCallStackForConsol e(scriptState, stackSize)); 178 RefPtrWillBeRawPtr<ScriptCallStack> callStack(createScriptCallStackForConsol e(stackSize));
179 179
180 String message; 180 String message;
181 bool gotStringMessage = arguments->getFirstArgumentAsString(message); 181 bool gotStringMessage = arguments->getFirstArgumentAsString(message);
182 InspectorInstrumentation::addConsoleAPIMessageToConsole(context(), type, lev el, message, scriptState, arguments); 182 InspectorInstrumentation::addConsoleAPIMessageToConsole(context(), type, lev el, message, scriptState, arguments);
183 if (gotStringMessage) 183 if (gotStringMessage)
184 reportMessageToClient(level, message, callStack); 184 reportMessageToClient(level, message, callStack);
185 } 185 }
186 186
187 } // namespace blink 187 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/ConsoleBase.h ('k') | Source/core/frame/ConsoleBase.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698