OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef V8_INSPECTOR_V8COMPAT_H_ |
| 6 #define V8_INSPECTOR_V8COMPAT_H_ |
| 7 |
| 8 #include <v8.h> |
| 9 |
| 10 #if V8_MAJOR_VERSION < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 1) |
| 11 namespace v8 { |
| 12 |
| 13 // In standalone V8 inspector this is expected to be noop anyways... |
| 14 class V8_EXPORT MicrotasksScope { |
| 15 public: |
| 16 enum Type { kRunMicrotasks, kDoNotRunMicrotasks }; |
| 17 |
| 18 MicrotasksScope(Isolate* isolate, Type type) { |
| 19 // No-op |
| 20 } |
| 21 }; |
| 22 |
| 23 } // namespace v8 |
| 24 #define V8_FUNCTION_NEW_REMOVE_PROTOTYPE(context, callback, data, length) \ |
| 25 v8::Function::New((context), (callback), (data), (length)) |
| 26 #else |
| 27 #define V8_FUNCTION_NEW_REMOVE_PROTOTYPE(context, callback, data, length) \ |
| 28 v8::Function::New((context), (callback), (data), (length), \ |
| 29 v8::ConstructorBehavior::kThrow) |
| 30 #endif // V8_MAJOR_VERSION < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < |
| 31 // 1) |
| 32 |
| 33 #endif // V8_INSPECTOR_V8COMPAT_H_ |
OLD | NEW |