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

Unified Diff: src/inspector/V8Compat.h

Issue 2292573002: [inspector] Initial import of v8_inspector. (Closed)
Patch Set: format the code, disable cpplint Created 4 years, 3 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 | « src/inspector/StringUtil.cpp ('k') | src/inspector/V8Console.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/V8Compat.h
diff --git a/src/inspector/V8Compat.h b/src/inspector/V8Compat.h
new file mode 100644
index 0000000000000000000000000000000000000000..9ad919cc7dd98c488a67ccca2be7aa8b66827c93
--- /dev/null
+++ b/src/inspector/V8Compat.h
@@ -0,0 +1,33 @@
+// Copyright 2016 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_INSPECTOR_V8COMPAT_H_
+#define V8_INSPECTOR_V8COMPAT_H_
+
+#include <v8.h>
+
+#if V8_MAJOR_VERSION < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 1)
+namespace v8 {
+
+// In standalone V8 inspector this is expected to be noop anyways...
+class V8_EXPORT MicrotasksScope {
+ public:
+ enum Type { kRunMicrotasks, kDoNotRunMicrotasks };
+
+ MicrotasksScope(Isolate* isolate, Type type) {
+ // No-op
+ }
+};
+
+} // namespace v8
+#define V8_FUNCTION_NEW_REMOVE_PROTOTYPE(context, callback, data, length) \
+ v8::Function::New((context), (callback), (data), (length))
+#else
+#define V8_FUNCTION_NEW_REMOVE_PROTOTYPE(context, callback, data, length) \
+ v8::Function::New((context), (callback), (data), (length), \
+ v8::ConstructorBehavior::kThrow)
+#endif // V8_MAJOR_VERSION < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION <
+ // 1)
+
+#endif // V8_INSPECTOR_V8COMPAT_H_
« no previous file with comments | « src/inspector/StringUtil.cpp ('k') | src/inspector/V8Console.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698