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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 bool IsInitialized() { return state_ == INITIALIZED; } | 463 bool IsInitialized() { return state_ == INITIALIZED; } |
464 | 464 |
465 // True if at least one thread Enter'ed this isolate. | 465 // True if at least one thread Enter'ed this isolate. |
466 bool IsInUse() { return entry_stack_ != NULL; } | 466 bool IsInUse() { return entry_stack_ != NULL; } |
467 | 467 |
468 // Destroys the non-default isolates. | 468 // Destroys the non-default isolates. |
469 // Sets default isolate into "has_been_disposed" state rather then destroying, | 469 // Sets default isolate into "has_been_disposed" state rather then destroying, |
470 // for legacy API reasons. | 470 // for legacy API reasons. |
471 void TearDown(); | 471 void TearDown(); |
472 | 472 |
| 473 static void GlobalTearDown(); |
| 474 |
473 bool IsDefaultIsolate() const { return this == default_isolate_; } | 475 bool IsDefaultIsolate() const { return this == default_isolate_; } |
474 | 476 |
475 // Ensures that process-wide resources and the default isolate have been | 477 // Ensures that process-wide resources and the default isolate have been |
476 // allocated. It is only necessary to call this method in rare cases, for | 478 // allocated. It is only necessary to call this method in rare cases, for |
477 // example if you are using V8 from within the body of a static initializer. | 479 // example if you are using V8 from within the body of a static initializer. |
478 // Safe to call multiple times. | 480 // Safe to call multiple times. |
479 static void EnsureDefaultIsolate(); | 481 static void EnsureDefaultIsolate(); |
480 | 482 |
481 // Find the PerThread for this particular (isolate, thread) combination | 483 // Find the PerThread for this particular (isolate, thread) combination |
482 // If one does not yet exist, return null. | 484 // If one does not yet exist, return null. |
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1459 | 1461 |
1460 // Mark the native context with out of memory. | 1462 // Mark the native context with out of memory. |
1461 inline void Context::mark_out_of_memory() { | 1463 inline void Context::mark_out_of_memory() { |
1462 native_context()->set_out_of_memory(HEAP->true_value()); | 1464 native_context()->set_out_of_memory(HEAP->true_value()); |
1463 } | 1465 } |
1464 | 1466 |
1465 | 1467 |
1466 } } // namespace v8::internal | 1468 } } // namespace v8::internal |
1467 | 1469 |
1468 #endif // V8_ISOLATE_H_ | 1470 #endif // V8_ISOLATE_H_ |
OLD | NEW |