[Inspector] Adjust the length of some of the console functions.

The function lengths on a number of the console methods was set to 1.
The arguments to these functions are either variadic or optional so they
should have length of 0.

R=dgozman@chromium.org,ulan@chromium.org
BUG=chromium:948678

Change-Id: I183262e230145a565732396688a0541034931500
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1548948
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Pavel Feldman OOO <pfeldman@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61021}
This commit is contained in:
Dave Tapuska 2019-04-23 15:39:28 -04:00 committed by Commit Bot
parent efd8c2d975
commit 2974a184fd

View File

@ -2799,49 +2799,49 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
DCHECK(console->IsJSObject()); DCHECK(console->IsJSObject());
JSObject::AddProperty(isolate_, global, name, console, DONT_ENUM); JSObject::AddProperty(isolate_, global, name, console, DONT_ENUM);
SimpleInstallFunction(isolate_, console, "debug", Builtins::kConsoleDebug, SimpleInstallFunction(isolate_, console, "debug", Builtins::kConsoleDebug,
1, false, NONE); 0, false, NONE);
SimpleInstallFunction(isolate_, console, "error", Builtins::kConsoleError, SimpleInstallFunction(isolate_, console, "error", Builtins::kConsoleError,
1, false, NONE); 0, false, NONE);
SimpleInstallFunction(isolate_, console, "info", Builtins::kConsoleInfo, 1, SimpleInstallFunction(isolate_, console, "info", Builtins::kConsoleInfo, 0,
false, NONE); false, NONE);
SimpleInstallFunction(isolate_, console, "log", Builtins::kConsoleLog, 1, SimpleInstallFunction(isolate_, console, "log", Builtins::kConsoleLog, 0,
false, NONE); false, NONE);
SimpleInstallFunction(isolate_, console, "warn", Builtins::kConsoleWarn, 1, SimpleInstallFunction(isolate_, console, "warn", Builtins::kConsoleWarn, 0,
false, NONE); false, NONE);
SimpleInstallFunction(isolate_, console, "dir", Builtins::kConsoleDir, 1, SimpleInstallFunction(isolate_, console, "dir", Builtins::kConsoleDir, 1,
false, NONE); false, NONE);
SimpleInstallFunction(isolate_, console, "dirxml", Builtins::kConsoleDirXml, SimpleInstallFunction(isolate_, console, "dirxml", Builtins::kConsoleDirXml,
1, false, NONE); 0, false, NONE);
SimpleInstallFunction(isolate_, console, "table", Builtins::kConsoleTable, SimpleInstallFunction(isolate_, console, "table", Builtins::kConsoleTable,
1, false, NONE); 1, false, NONE);
SimpleInstallFunction(isolate_, console, "trace", Builtins::kConsoleTrace, SimpleInstallFunction(isolate_, console, "trace", Builtins::kConsoleTrace,
1, false, NONE); 0, false, NONE);
SimpleInstallFunction(isolate_, console, "group", Builtins::kConsoleGroup, SimpleInstallFunction(isolate_, console, "group", Builtins::kConsoleGroup,
1, false, NONE); 0, false, NONE);
SimpleInstallFunction(isolate_, console, "groupCollapsed", SimpleInstallFunction(isolate_, console, "groupCollapsed",
Builtins::kConsoleGroupCollapsed, 1, false, NONE); Builtins::kConsoleGroupCollapsed, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "groupEnd", SimpleInstallFunction(isolate_, console, "groupEnd",
Builtins::kConsoleGroupEnd, 1, false, NONE); Builtins::kConsoleGroupEnd, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "clear", Builtins::kConsoleClear, SimpleInstallFunction(isolate_, console, "clear", Builtins::kConsoleClear,
1, false, NONE); 0, false, NONE);
SimpleInstallFunction(isolate_, console, "count", Builtins::kConsoleCount, SimpleInstallFunction(isolate_, console, "count", Builtins::kConsoleCount,
1, false, NONE); 0, false, NONE);
SimpleInstallFunction(isolate_, console, "countReset", SimpleInstallFunction(isolate_, console, "countReset",
Builtins::kConsoleCountReset, 1, false, NONE); Builtins::kConsoleCountReset, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "assert", SimpleInstallFunction(isolate_, console, "assert",
Builtins::kFastConsoleAssert, 1, false, NONE); Builtins::kFastConsoleAssert, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "profile", SimpleInstallFunction(isolate_, console, "profile",
Builtins::kConsoleProfile, 1, false, NONE); Builtins::kConsoleProfile, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "profileEnd", SimpleInstallFunction(isolate_, console, "profileEnd",
Builtins::kConsoleProfileEnd, 1, false, NONE); Builtins::kConsoleProfileEnd, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "time", Builtins::kConsoleTime, 1, SimpleInstallFunction(isolate_, console, "time", Builtins::kConsoleTime, 0,
false, NONE); false, NONE);
SimpleInstallFunction(isolate_, console, "timeLog", SimpleInstallFunction(isolate_, console, "timeLog",
Builtins::kConsoleTimeLog, 1, false, NONE); Builtins::kConsoleTimeLog, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "timeEnd", SimpleInstallFunction(isolate_, console, "timeEnd",
Builtins::kConsoleTimeEnd, 1, false, NONE); Builtins::kConsoleTimeEnd, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "timeStamp", SimpleInstallFunction(isolate_, console, "timeStamp",
Builtins::kConsoleTimeStamp, 1, false, NONE); Builtins::kConsoleTimeStamp, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "context", SimpleInstallFunction(isolate_, console, "context",
Builtins::kConsoleContext, 1, true, NONE); Builtins::kConsoleContext, 1, true, NONE);
InstallToStringTag(isolate_, console, "Object"); InstallToStringTag(isolate_, console, "Object");