| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_API_H_ | 5 #ifndef V8_API_H_ |
| 6 #define V8_API_H_ | 6 #define V8_API_H_ |
| 7 | 7 |
| 8 #include "include/v8-testing.h" | 8 #include "include/v8-testing.h" |
| 9 #include "src/contexts.h" | 9 #include "src/contexts.h" |
| 10 #include "src/debug/debug-interface.h" | 10 #include "src/debug/debug-interface.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 V(Module, Module) \ | 103 V(Module, Module) \ |
| 104 V(Function, JSReceiver) \ | 104 V(Function, JSReceiver) \ |
| 105 V(Message, JSMessageObject) \ | 105 V(Message, JSMessageObject) \ |
| 106 V(Context, Context) \ | 106 V(Context, Context) \ |
| 107 V(External, Object) \ | 107 V(External, Object) \ |
| 108 V(StackTrace, JSArray) \ | 108 V(StackTrace, JSArray) \ |
| 109 V(StackFrame, JSObject) \ | 109 V(StackFrame, JSObject) \ |
| 110 V(Proxy, JSProxy) \ | 110 V(Proxy, JSProxy) \ |
| 111 V(NativeWeakMap, JSWeakMap) \ | 111 V(NativeWeakMap, JSWeakMap) \ |
| 112 V(debug::GeneratorObject, JSGeneratorObject) \ | 112 V(debug::GeneratorObject, JSGeneratorObject) \ |
| 113 V(debug::Script, Script) | 113 V(debug::Script, Script) \ |
| 114 V(Promise, JSPromise) |
| 114 | 115 |
| 115 class Utils { | 116 class Utils { |
| 116 public: | 117 public: |
| 117 static inline bool ApiCheck(bool condition, | 118 static inline bool ApiCheck(bool condition, |
| 118 const char* location, | 119 const char* location, |
| 119 const char* message) { | 120 const char* message) { |
| 120 if (!condition) Utils::ReportApiFailure(location, message); | 121 if (!condition) Utils::ReportApiFailure(location, message); |
| 121 return condition; | 122 return condition; |
| 122 } | 123 } |
| 123 static void ReportOOMFailure(const char* location, bool is_heap_oom); | 124 static void ReportOOMFailure(const char* location, bool is_heap_oom); |
| (...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 } | 664 } |
| 664 | 665 |
| 665 private: | 666 private: |
| 666 static v8::Testing::StressType stress_type_; | 667 static v8::Testing::StressType stress_type_; |
| 667 }; | 668 }; |
| 668 | 669 |
| 669 } // namespace internal | 670 } // namespace internal |
| 670 } // namespace v8 | 671 } // namespace v8 |
| 671 | 672 |
| 672 #endif // V8_API_H_ | 673 #endif // V8_API_H_ |
| OLD | NEW |