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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 | 490 |
491 // Destroys the non-default isolates. | 491 // Destroys the non-default isolates. |
492 // Sets default isolate into "has_been_disposed" state rather then destroying, | 492 // Sets default isolate into "has_been_disposed" state rather then destroying, |
493 // for legacy API reasons. | 493 // for legacy API reasons. |
494 void TearDown(); | 494 void TearDown(); |
495 | 495 |
496 static void GlobalTearDown(); | 496 static void GlobalTearDown(); |
497 | 497 |
498 bool IsDefaultIsolate() const { return this == default_isolate_; } | 498 bool IsDefaultIsolate() const { return this == default_isolate_; } |
499 | 499 |
| 500 static void SetCrashIfDefaultIsolateInitialized(); |
500 // Ensures that process-wide resources and the default isolate have been | 501 // Ensures that process-wide resources and the default isolate have been |
501 // allocated. It is only necessary to call this method in rare cases, for | 502 // allocated. It is only necessary to call this method in rare cases, for |
502 // example if you are using V8 from within the body of a static initializer. | 503 // example if you are using V8 from within the body of a static initializer. |
503 // Safe to call multiple times. | 504 // Safe to call multiple times. |
504 static void EnsureDefaultIsolate(); | 505 static void EnsureDefaultIsolate(); |
505 | 506 |
506 // Find the PerThread for this particular (isolate, thread) combination | 507 // Find the PerThread for this particular (isolate, thread) combination |
507 // If one does not yet exist, return null. | 508 // If one does not yet exist, return null. |
508 PerIsolateThreadData* FindPerThreadDataForThisThread(); | 509 PerIsolateThreadData* FindPerThreadDataForThisThread(); |
509 | 510 |
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1531 | 1532 |
1532 // Mark the native context with out of memory. | 1533 // Mark the native context with out of memory. |
1533 inline void Context::mark_out_of_memory() { | 1534 inline void Context::mark_out_of_memory() { |
1534 native_context()->set_out_of_memory(GetIsolate()->heap()->true_value()); | 1535 native_context()->set_out_of_memory(GetIsolate()->heap()->true_value()); |
1535 } | 1536 } |
1536 | 1537 |
1537 | 1538 |
1538 } } // namespace v8::internal | 1539 } } // namespace v8::internal |
1539 | 1540 |
1540 #endif // V8_ISOLATE_H_ | 1541 #endif // V8_ISOLATE_H_ |
OLD | NEW |