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 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1473 private: | 1473 private: |
1474 StackGuard* stack_guard_; | 1474 StackGuard* stack_guard_; |
1475 }; | 1475 }; |
1476 | 1476 |
1477 | 1477 |
1478 // Temporary macros for accessing current isolate and its subobjects. | 1478 // Temporary macros for accessing current isolate and its subobjects. |
1479 // They provide better readability, especially when used a lot in the code. | 1479 // They provide better readability, especially when used a lot in the code. |
1480 #define HEAP (v8::internal::Isolate::Current()->heap()) | 1480 #define HEAP (v8::internal::Isolate::Current()->heap()) |
1481 #define FACTORY (v8::internal::Isolate::Current()->factory()) | 1481 #define FACTORY (v8::internal::Isolate::Current()->factory()) |
1482 #define ISOLATE (v8::internal::Isolate::Current()) | 1482 #define ISOLATE (v8::internal::Isolate::Current()) |
1483 #define LOGGER (v8::internal::Isolate::Current()->logger()) | |
1484 | 1483 |
1485 | 1484 |
1486 // Tells whether the native context is marked with out of memory. | 1485 // Tells whether the native context is marked with out of memory. |
1487 inline bool Context::has_out_of_memory() { | 1486 inline bool Context::has_out_of_memory() { |
1488 return native_context()->out_of_memory()->IsTrue(); | 1487 return native_context()->out_of_memory()->IsTrue(); |
1489 } | 1488 } |
1490 | 1489 |
1491 | 1490 |
1492 // Mark the native context with out of memory. | 1491 // Mark the native context with out of memory. |
1493 inline void Context::mark_out_of_memory() { | 1492 inline void Context::mark_out_of_memory() { |
1494 native_context()->set_out_of_memory(HEAP->true_value()); | 1493 native_context()->set_out_of_memory(HEAP->true_value()); |
1495 } | 1494 } |
1496 | 1495 |
1497 | 1496 |
1498 } } // namespace v8::internal | 1497 } } // namespace v8::internal |
1499 | 1498 |
1500 #endif // V8_ISOLATE_H_ | 1499 #endif // V8_ISOLATE_H_ |
OLD | NEW |