| 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 "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "include/v8-testing.h" | 10 #include "include/v8-testing.h" |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 MAKE_TO_LOCAL(IntegerToLocal, Object, Integer) | 361 MAKE_TO_LOCAL(IntegerToLocal, Object, Integer) |
| 362 MAKE_TO_LOCAL(Uint32ToLocal, Object, Uint32) | 362 MAKE_TO_LOCAL(Uint32ToLocal, Object, Uint32) |
| 363 MAKE_TO_LOCAL(ExternalToLocal, JSObject, External) | 363 MAKE_TO_LOCAL(ExternalToLocal, JSObject, External) |
| 364 | 364 |
| 365 #undef MAKE_TO_LOCAL_TYPED_ARRAY | 365 #undef MAKE_TO_LOCAL_TYPED_ARRAY |
| 366 #undef MAKE_TO_LOCAL | 366 #undef MAKE_TO_LOCAL |
| 367 | 367 |
| 368 | 368 |
| 369 // Implementations of OpenHandle | 369 // Implementations of OpenHandle |
| 370 | 370 |
| 371 #define MAKE_OPEN_HANDLE(From, To) \ | 371 #define MAKE_OPEN_HANDLE(From, To) \ |
| 372 v8::internal::Handle<v8::internal::To> Utils::OpenHandle( \ | 372 v8::internal::Handle<v8::internal::To> Utils::OpenHandle( \ |
| 373 const v8::From* that, bool allow_empty_handle) { \ | 373 const v8::From* that, bool allow_empty_handle) { \ |
| 374 EXTRA_CHECK(allow_empty_handle || that != NULL); \ | 374 DCHECK(allow_empty_handle || that != NULL); \ |
| 375 EXTRA_CHECK(that == NULL || \ | 375 DCHECK(that == NULL || \ |
| 376 (*reinterpret_cast<v8::internal::Object* const*>(that))->Is##To()); \ | 376 (*reinterpret_cast<v8::internal::Object* const*>(that))->Is##To()); \ |
| 377 return v8::internal::Handle<v8::internal::To>( \ | 377 return v8::internal::Handle<v8::internal::To>( \ |
| 378 reinterpret_cast<v8::internal::To**>(const_cast<v8::From*>(that))); \ | 378 reinterpret_cast<v8::internal::To**>(const_cast<v8::From*>(that))); \ |
| 379 } | 379 } |
| 380 | 380 |
| 381 OPEN_HANDLE_LIST(MAKE_OPEN_HANDLE) | 381 OPEN_HANDLE_LIST(MAKE_OPEN_HANDLE) |
| 382 | 382 |
| 383 #undef MAKE_OPEN_HANDLE | 383 #undef MAKE_OPEN_HANDLE |
| 384 #undef OPEN_HANDLE_LIST | 384 #undef OPEN_HANDLE_LIST |
| 385 | 385 |
| 386 | 386 |
| 387 namespace internal { | 387 namespace internal { |
| 388 | 388 |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 stress_type_ = stress_type; | 688 stress_type_ = stress_type; |
| 689 } | 689 } |
| 690 | 690 |
| 691 private: | 691 private: |
| 692 static v8::Testing::StressType stress_type_; | 692 static v8::Testing::StressType stress_type_; |
| 693 }; | 693 }; |
| 694 | 694 |
| 695 } } // namespace v8::internal | 695 } } // namespace v8::internal |
| 696 | 696 |
| 697 #endif // V8_API_H_ | 697 #endif // V8_API_H_ |
| OLD | NEW |