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 2586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2597 } | 2597 } |
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 void v8::V8::IdleNotification(bool is_high_priority) { | 2607 void v8::V8::IdleNotification(bool is_high_priority) { |
2608 i::V8::IdleNotification(is_high_priority); | 2608 i::V8::IdleNotification(is_high_priority); |
2609 } | 2609 } |
2610 | 2610 |
| 2611 |
| 2612 void v8::V8::LowMemoryNotification() { |
| 2613 #if defined(ANDROID) |
| 2614 i::Heap::CollectAllGarbage(true); |
| 2615 #endif |
| 2616 } |
| 2617 |
| 2618 |
2611 const char* v8::V8::GetVersion() { | 2619 const char* v8::V8::GetVersion() { |
2612 static v8::internal::EmbeddedVector<char, 128> buffer; | 2620 static v8::internal::EmbeddedVector<char, 128> buffer; |
2613 v8::internal::Version::GetString(buffer); | 2621 v8::internal::Version::GetString(buffer); |
2614 return buffer.start(); | 2622 return buffer.start(); |
2615 } | 2623 } |
2616 | 2624 |
2617 | 2625 |
2618 static i::Handle<i::FunctionTemplateInfo> | 2626 static i::Handle<i::FunctionTemplateInfo> |
2619 EnsureConstructor(i::Handle<i::ObjectTemplateInfo> templ) { | 2627 EnsureConstructor(i::Handle<i::ObjectTemplateInfo> templ) { |
2620 if (templ->constructor()->IsUndefined()) { | 2628 if (templ->constructor()->IsUndefined()) { |
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3750 reinterpret_cast<HandleScopeImplementer*>(storage); | 3758 reinterpret_cast<HandleScopeImplementer*>(storage); |
3751 List<void**>* blocks_of_archived_thread = thread_local->Blocks(); | 3759 List<void**>* blocks_of_archived_thread = thread_local->Blocks(); |
3752 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread = | 3760 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread = |
3753 &thread_local->handle_scope_data_; | 3761 &thread_local->handle_scope_data_; |
3754 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread); | 3762 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread); |
3755 | 3763 |
3756 return storage + ArchiveSpacePerThread(); | 3764 return storage + ArchiveSpacePerThread(); |
3757 } | 3765 } |
3758 | 3766 |
3759 } } // namespace v8::internal | 3767 } } // namespace v8::internal |
OLD | NEW |