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

Unified Diff: src/inspector/v8-console.cc

Issue 2828933002: [console] fast console.assert(true) (Closed)
Patch Set: reverted protocol-test.js changes Created 3 years, 8 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
« src/code-factory.cc ('K') | « src/code-factory.cc ('k') | src/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/v8-console.cc
diff --git a/src/inspector/v8-console.cc b/src/inspector/v8-console.cc
index 8af6dc7c20f6ee0dbd79183b808366bb7556f3df..2d516e849d25994fbd3c02b268552fd994ab9152 100644
--- a/src/inspector/v8-console.cc
+++ b/src/inspector/v8-console.cc
@@ -89,12 +89,6 @@ class ConsoleHelper {
reportCall(ConsoleAPIType::kWarning, arguments);
}
- bool firstArgToBoolean(bool defaultValue) {
- if (m_info.Length() < 1) return defaultValue;
- if (m_info[0]->IsBoolean()) return m_info[0].As<v8::Boolean>()->Value();
- return m_info[0]->BooleanValue(m_context).FromMaybe(defaultValue);
- }
-
String16 firstArgToString(const String16& defaultValue) {
if (m_info.Length() < 1) return defaultValue;
v8::Local<v8::String> titleValue;
@@ -279,7 +273,6 @@ void V8Console::Count(const v8::debug::ConsoleCallArguments& info) {
void V8Console::Assert(const v8::debug::ConsoleCallArguments& info) {
Igor Sheludko 2017/04/20 10:18:42 Maybe ReportAssertionFailure or something similar
Igor Sheludko 2017/04/20 14:26:10 Given that we are passing all the arguments (inclu
kozy 2017/04/20 15:14:54 It would be cool to pass all arguments except firs
ConsoleHelper helper(info, m_inspector);
Igor Sheludko 2017/04/20 10:18:42 or DCHECK(!helper.firstArgToBoolean(false));
kozy 2017/04/20 15:14:54 added DCHECK.
- if (helper.firstArgToBoolean(false)) return;
std::vector<v8::Local<v8::Value>> arguments;
for (int i = 1; i < info.Length(); ++i) arguments.push_back(info[i]);
« src/code-factory.cc ('K') | « src/code-factory.cc ('k') | src/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698