Chromium Code Reviews| 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 2581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2592 } | 2592 } |
| 2593 } | 2593 } |
| 2594 | 2594 |
| 2595 | 2595 |
| 2596 bool v8::V8::Dispose() { | 2596 bool v8::V8::Dispose() { |
| 2597 i::V8::TearDown(); | 2597 i::V8::TearDown(); |
| 2598 return true; | 2598 return true; |
| 2599 } | 2599 } |
| 2600 | 2600 |
| 2601 | 2601 |
| 2602 void v8::V8::IdleNotification(bool is_high_priority) { | 2602 void v8::V8::IdleNotification(bool is_high_priority) { |
| 2603 i::V8::IdleNotification(is_high_priority); | 2603 i::V8::IdleNotification(is_high_priority); |
| 2604 } | 2604 } |
| 2605 | 2605 |
| 2606 | |
| 2607 #if defined(ANDROID) | |
| 2608 void v8::V8::LowMemoryNotification() { | |
| 2609 i::Heap::CollectAllGarbage(true); | |
| 2610 } | |
| 2611 #endif | |
|
Kasper Lund
2009/08/20 06:54:56
Would it make sense to always do a Heap::UncommitF
| |
| 2612 | |
| 2613 | |
| 2606 const char* v8::V8::GetVersion() { | 2614 const char* v8::V8::GetVersion() { |
| 2607 static v8::internal::EmbeddedVector<char, 128> buffer; | 2615 static v8::internal::EmbeddedVector<char, 128> buffer; |
| 2608 v8::internal::Version::GetString(buffer); | 2616 v8::internal::Version::GetString(buffer); |
| 2609 return buffer.start(); | 2617 return buffer.start(); |
| 2610 } | 2618 } |
| 2611 | 2619 |
| 2612 | 2620 |
| 2613 static i::Handle<i::FunctionTemplateInfo> | 2621 static i::Handle<i::FunctionTemplateInfo> |
| 2614 EnsureConstructor(i::Handle<i::ObjectTemplateInfo> templ) { | 2622 EnsureConstructor(i::Handle<i::ObjectTemplateInfo> templ) { |
| 2615 if (templ->constructor()->IsUndefined()) { | 2623 if (templ->constructor()->IsUndefined()) { |
| (...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3717 reinterpret_cast<HandleScopeImplementer*>(storage); | 3725 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 3718 List<void**>* blocks_of_archived_thread = thread_local->Blocks(); | 3726 List<void**>* blocks_of_archived_thread = thread_local->Blocks(); |
| 3719 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread = | 3727 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread = |
| 3720 &thread_local->handle_scope_data_; | 3728 &thread_local->handle_scope_data_; |
| 3721 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread); | 3729 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread); |
| 3722 | 3730 |
| 3723 return storage + ArchiveSpacePerThread(); | 3731 return storage + ArchiveSpacePerThread(); |
| 3724 } | 3732 } |
| 3725 | 3733 |
| 3726 } } // namespace v8::internal | 3734 } } // namespace v8::internal |
| OLD | NEW |