| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 typedef ZoneList<Handle<Object> > ZoneObjectList; | 118 typedef ZoneList<Handle<Object> > ZoneObjectList; |
| 119 | 119 |
| 120 #define RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate) \ | 120 #define RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate) \ |
| 121 do { \ | 121 do { \ |
| 122 Isolate* __isolate__ = (isolate); \ | 122 Isolate* __isolate__ = (isolate); \ |
| 123 if (__isolate__->has_scheduled_exception()) { \ | 123 if (__isolate__->has_scheduled_exception()) { \ |
| 124 return __isolate__->PromoteScheduledException(); \ | 124 return __isolate__->PromoteScheduledException(); \ |
| 125 } \ | 125 } \ |
| 126 } while (false) | 126 } while (false) |
| 127 | 127 |
| 128 // TODO(yangguo): Remove after we completely changed to MaybeHandles. | |
| 129 #define RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, value) \ | |
| 130 do { \ | |
| 131 if ((call).is_null()) { \ | |
| 132 ASSERT((isolate)->has_pending_exception()); \ | |
| 133 return (value); \ | |
| 134 } \ | |
| 135 } while (false) | |
| 136 | |
| 137 // TODO(yangguo): Remove after we completely changed to MaybeHandles. | |
| 138 #define RETURN_IF_EMPTY_HANDLE(isolate, call) \ | |
| 139 RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, Failure::Exception()) | |
| 140 | |
| 141 | 128 |
| 142 // Macros for MaybeHandle. | 129 // Macros for MaybeHandle. |
| 143 | 130 |
| 144 #define RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, T) \ | 131 #define RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, T) \ |
| 145 do { \ | 132 do { \ |
| 146 Isolate* __isolate__ = (isolate); \ | 133 Isolate* __isolate__ = (isolate); \ |
| 147 if (__isolate__->has_scheduled_exception()) { \ | 134 if (__isolate__->has_scheduled_exception()) { \ |
| 148 __isolate__->PromoteScheduledException(); \ | 135 __isolate__->PromoteScheduledException(); \ |
| 149 return MaybeHandle<T>(); \ | 136 return MaybeHandle<T>(); \ |
| 150 } \ | 137 } \ |
| (...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1537 } | 1524 } |
| 1538 | 1525 |
| 1539 EmbeddedVector<char, 128> filename_; | 1526 EmbeddedVector<char, 128> filename_; |
| 1540 FILE* file_; | 1527 FILE* file_; |
| 1541 int scope_depth_; | 1528 int scope_depth_; |
| 1542 }; | 1529 }; |
| 1543 | 1530 |
| 1544 } } // namespace v8::internal | 1531 } } // namespace v8::internal |
| 1545 | 1532 |
| 1546 #endif // V8_ISOLATE_H_ | 1533 #endif // V8_ISOLATE_H_ |
| OLD | NEW |