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

Unified Diff: third_party/WebKit/WebCore/inspector/InspectorController.cpp

Issue 16411: Fixed console messages for messages which was not added through the console.x... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/WebCore/inspector/InspectorController.cpp
===================================================================
--- third_party/WebKit/WebCore/inspector/InspectorController.cpp (revision 7534)
+++ third_party/WebKit/WebCore/inspector/InspectorController.cpp (working copy)
@@ -1358,7 +1358,12 @@
// Create an instance of WebInspector.ConsoleMessage passing the variable
// number of arguments available.
static unsigned kArgcFixed = 6;
- unsigned argc = kArgcFixed + message->arguments.size();
+ unsigned argc = kArgcFixed;
+ if (!message->arguments.isEmpty()) {
+ argc += message->arguments.size();
+ } else {
+ argc += 1;
+ }
v8::Handle<v8::Value> *args = new v8::Handle<v8::Value>[argc];
if (args == 0)
return;
@@ -1370,8 +1375,12 @@
args[i++] = v8::Number::New(message->groupLevel);
args[i++] = v8::Number::New(message->repeatCount);
ASSERT(kArgcFixed == i);
- for (unsigned i = 0; i < message->arguments.size(); ++i) {
- args[kArgcFixed + i] = message->arguments[i].v8Value();
+ if (!message->arguments.isEmpty()) {
+ for (unsigned i = 0; i < message->arguments.size(); ++i) {
+ args[kArgcFixed + i] = message->arguments[i].v8Value();
+ }
+ } else {
+ args[i++] = v8StringOrNull(message->message);
}
v8::Handle<v8::Object> consoleMessage =
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698