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

Unified Diff: src/builtins/builtins-console.h

Issue 2785293002: [inspector] move console to builtins (Closed)
Patch Set: use console helper Created 3 years, 9 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
Index: src/builtins/builtins-console.h
diff --git a/src/builtins/builtins-console.h b/src/builtins/builtins-console.h
new file mode 100644
index 0000000000000000000000000000000000000000..4d297e0a441a41dde46e3db74bc2570d671119a9
--- /dev/null
+++ b/src/builtins/builtins-console.h
@@ -0,0 +1,26 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_BUILTINS_BUILTINS_CONSOLE_H_
+#define V8_BUILTINS_BUILTINS_CONSOLE_H_
+
+#include "include/v8.h"
+#include "src/builtins/builtins-utils.h"
+
+namespace v8 {
+namespace internal {
+
+class ConsoleCallArguments : public v8::FunctionCallbackInfo<v8::Value> {
+ public:
+ // This wrapper to pass arguments only. Any attempt to get anything except
+ // length and argument value will produce a crash.
+ explicit ConsoleCallArguments(BuiltinArguments& args)
+ : v8::FunctionCallbackInfo<v8::Value>(nullptr, &args[0] - 1,
+ args.length() - 1) {}
+};
+
+} // namespace internal
+} // namespace v8
+
+#endif // V8_BUILTINS_BUILTINS_CONSOLE_H_

Powered by Google App Engine
This is Rietveld 408576698