OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 #define RETURN_IF_SCHEDULED_EXCEPTION(isolate) \ | 109 #define RETURN_IF_SCHEDULED_EXCEPTION(isolate) \ |
110 if (isolate->has_scheduled_exception()) \ | 110 if (isolate->has_scheduled_exception()) \ |
111 return isolate->PromoteScheduledException() | 111 return isolate->PromoteScheduledException() |
112 | 112 |
113 #define RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, value) \ | 113 #define RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, value) \ |
114 if (call.is_null()) { \ | 114 if (call.is_null()) { \ |
115 ASSERT(isolate->has_pending_exception()); \ | 115 ASSERT(isolate->has_pending_exception()); \ |
116 return value; \ | 116 return value; \ |
117 } | 117 } |
118 | 118 |
| 119 #define CHECK_NOT_EMPTY_HANDLE(isolate, call) \ |
| 120 do { \ |
| 121 ASSERT(!(isolate)->has_pending_exception()); \ |
| 122 CHECK(!(call).is_null()); \ |
| 123 CHECK(!(isolate)->has_pending_exception()); \ |
| 124 } while (false) |
| 125 |
119 #define RETURN_IF_EMPTY_HANDLE(isolate, call) \ | 126 #define RETURN_IF_EMPTY_HANDLE(isolate, call) \ |
120 RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, Failure::Exception()) | 127 RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, Failure::Exception()) |
121 | 128 |
122 #define FOR_EACH_ISOLATE_ADDRESS_NAME(C) \ | 129 #define FOR_EACH_ISOLATE_ADDRESS_NAME(C) \ |
123 C(Handler, handler) \ | 130 C(Handler, handler) \ |
124 C(CEntryFP, c_entry_fp) \ | 131 C(CEntryFP, c_entry_fp) \ |
125 C(Context, context) \ | 132 C(Context, context) \ |
126 C(PendingException, pending_exception) \ | 133 C(PendingException, pending_exception) \ |
127 C(ExternalCaughtException, external_caught_exception) \ | 134 C(ExternalCaughtException, external_caught_exception) \ |
128 C(JSEntrySP, js_entry_sp) | 135 C(JSEntrySP, js_entry_sp) |
(...skipping 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1366 | 1373 |
1367 // Mark the global context with out of memory. | 1374 // Mark the global context with out of memory. |
1368 inline void Context::mark_out_of_memory() { | 1375 inline void Context::mark_out_of_memory() { |
1369 global_context()->set_out_of_memory(HEAP->true_value()); | 1376 global_context()->set_out_of_memory(HEAP->true_value()); |
1370 } | 1377 } |
1371 | 1378 |
1372 | 1379 |
1373 } } // namespace v8::internal | 1380 } } // namespace v8::internal |
1374 | 1381 |
1375 #endif // V8_ISOLATE_H_ | 1382 #endif // V8_ISOLATE_H_ |
OLD | NEW |