| 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/factory.h" | 10 #include "src/factory.h" |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 V(NativeWeakMap, JSWeakMap) | 177 V(NativeWeakMap, JSWeakMap) |
| 178 | 178 |
| 179 class Utils { | 179 class Utils { |
| 180 public: | 180 public: |
| 181 static inline bool ApiCheck(bool condition, | 181 static inline bool ApiCheck(bool condition, |
| 182 const char* location, | 182 const char* location, |
| 183 const char* message) { | 183 const char* message) { |
| 184 if (!condition) Utils::ReportApiFailure(location, message); | 184 if (!condition) Utils::ReportApiFailure(location, message); |
| 185 return condition; | 185 return condition; |
| 186 } | 186 } |
| 187 static void ReportOOMFailure(const char* location, bool is_heap_oom); |
| 187 | 188 |
| 188 static Local<FunctionTemplate> ToFunctionTemplate(NeanderObject obj); | 189 static Local<FunctionTemplate> ToFunctionTemplate(NeanderObject obj); |
| 189 static Local<ObjectTemplate> ToObjectTemplate(NeanderObject obj); | 190 static Local<ObjectTemplate> ToObjectTemplate(NeanderObject obj); |
| 190 | 191 |
| 191 static inline Local<Context> ToLocal( | 192 static inline Local<Context> ToLocal( |
| 192 v8::internal::Handle<v8::internal::Context> obj); | 193 v8::internal::Handle<v8::internal::Context> obj); |
| 193 static inline Local<Value> ToLocal( | 194 static inline Local<Value> ToLocal( |
| 194 v8::internal::Handle<v8::internal::Object> obj); | 195 v8::internal::Handle<v8::internal::Object> obj); |
| 195 static inline Local<Name> ToLocal( | 196 static inline Local<Name> ToLocal( |
| 196 v8::internal::Handle<v8::internal::Name> obj); | 197 v8::internal::Handle<v8::internal::Name> obj); |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 } | 693 } |
| 693 | 694 |
| 694 private: | 695 private: |
| 695 static v8::Testing::StressType stress_type_; | 696 static v8::Testing::StressType stress_type_; |
| 696 }; | 697 }; |
| 697 | 698 |
| 698 } // namespace internal | 699 } // namespace internal |
| 699 } // namespace v8 | 700 } // namespace v8 |
| 700 | 701 |
| 701 #endif // V8_API_H_ | 702 #endif // V8_API_H_ |
| OLD | NEW |