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