| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 | 287 |
| 288 #undef MAKE_TO_LOCAL | 288 #undef MAKE_TO_LOCAL |
| 289 | 289 |
| 290 | 290 |
| 291 // Implementations of OpenHandle | 291 // Implementations of OpenHandle |
| 292 | 292 |
| 293 #define MAKE_OPEN_HANDLE(From, To) \ | 293 #define MAKE_OPEN_HANDLE(From, To) \ |
| 294 v8::internal::Handle<v8::internal::To> Utils::OpenHandle( \ | 294 v8::internal::Handle<v8::internal::To> Utils::OpenHandle( \ |
| 295 const v8::From* that, bool allow_empty_handle) { \ | 295 const v8::From* that, bool allow_empty_handle) { \ |
| 296 EXTRA_CHECK(allow_empty_handle || that != NULL); \ | 296 EXTRA_CHECK(allow_empty_handle || that != NULL); \ |
| 297 EXTRA_CHECK(that == NULL || \ |
| 298 !(*reinterpret_cast<v8::internal::To**>( \ |
| 299 const_cast<v8::From*>(that)))->IsFailure()); \ |
| 297 return v8::internal::Handle<v8::internal::To>( \ | 300 return v8::internal::Handle<v8::internal::To>( \ |
| 298 reinterpret_cast<v8::internal::To**>(const_cast<v8::From*>(that))); \ | 301 reinterpret_cast<v8::internal::To**>(const_cast<v8::From*>(that))); \ |
| 299 } | 302 } |
| 300 | 303 |
| 301 OPEN_HANDLE_LIST(MAKE_OPEN_HANDLE) | 304 OPEN_HANDLE_LIST(MAKE_OPEN_HANDLE) |
| 302 | 305 |
| 303 #undef MAKE_OPEN_HANDLE | 306 #undef MAKE_OPEN_HANDLE |
| 304 #undef OPEN_HANDLE_LIST | 307 #undef OPEN_HANDLE_LIST |
| 305 | 308 |
| 306 | 309 |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 stress_type_ = stress_type; | 592 stress_type_ = stress_type; |
| 590 } | 593 } |
| 591 | 594 |
| 592 private: | 595 private: |
| 593 static v8::Testing::StressType stress_type_; | 596 static v8::Testing::StressType stress_type_; |
| 594 }; | 597 }; |
| 595 | 598 |
| 596 } } // namespace v8::internal | 599 } } // namespace v8::internal |
| 597 | 600 |
| 598 #endif // V8_API_H_ | 601 #endif // V8_API_H_ |
| OLD | NEW |