OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 2587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2598 } | 2598 } |
2599 | 2599 |
2600 | 2600 |
2601 bool v8::V8::Dispose() { | 2601 bool v8::V8::Dispose() { |
2602 i::V8::TearDown(); | 2602 i::V8::TearDown(); |
2603 return true; | 2603 return true; |
2604 } | 2604 } |
2605 | 2605 |
2606 | 2606 |
2607 bool v8::V8::IdleNotification(bool is_high_priority) { | 2607 bool v8::V8::IdleNotification(bool is_high_priority) { |
| 2608 if (!i::V8::IsRunning()) return false; |
2608 return i::V8::IdleNotification(is_high_priority); | 2609 return i::V8::IdleNotification(is_high_priority); |
2609 } | 2610 } |
2610 | 2611 |
2611 | 2612 |
2612 void v8::V8::LowMemoryNotification() { | 2613 void v8::V8::LowMemoryNotification() { |
2613 #if defined(ANDROID) | 2614 #if defined(ANDROID) |
| 2615 if (!i::V8::IsRunning()) return; |
2614 i::Heap::CollectAllGarbage(true); | 2616 i::Heap::CollectAllGarbage(true); |
2615 #endif | 2617 #endif |
2616 } | 2618 } |
2617 | 2619 |
2618 | 2620 |
2619 const char* v8::V8::GetVersion() { | 2621 const char* v8::V8::GetVersion() { |
2620 static v8::internal::EmbeddedVector<char, 128> buffer; | 2622 static v8::internal::EmbeddedVector<char, 128> buffer; |
2621 v8::internal::Version::GetString(buffer); | 2623 v8::internal::Version::GetString(buffer); |
2622 return buffer.start(); | 2624 return buffer.start(); |
2623 } | 2625 } |
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3758 reinterpret_cast<HandleScopeImplementer*>(storage); | 3760 reinterpret_cast<HandleScopeImplementer*>(storage); |
3759 List<void**>* blocks_of_archived_thread = thread_local->Blocks(); | 3761 List<void**>* blocks_of_archived_thread = thread_local->Blocks(); |
3760 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread = | 3762 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread = |
3761 &thread_local->handle_scope_data_; | 3763 &thread_local->handle_scope_data_; |
3762 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread); | 3764 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread); |
3763 | 3765 |
3764 return storage + ArchiveSpacePerThread(); | 3766 return storage + ArchiveSpacePerThread(); |
3765 } | 3767 } |
3766 | 3768 |
3767 } } // namespace v8::internal | 3769 } } // namespace v8::internal |
OLD | NEW |