| 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 2635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2646 | 2646 |
| 2647 bool v8::V8::IdleNotification() { | 2647 bool v8::V8::IdleNotification() { |
| 2648 // Returning true tells the caller that it need not | 2648 // Returning true tells the caller that it need not |
| 2649 // continue to call IdleNotification. | 2649 // continue to call IdleNotification. |
| 2650 if (!i::V8::IsRunning()) return true; | 2650 if (!i::V8::IsRunning()) return true; |
| 2651 return i::V8::IdleNotification(); | 2651 return i::V8::IdleNotification(); |
| 2652 } | 2652 } |
| 2653 | 2653 |
| 2654 | 2654 |
| 2655 void v8::V8::LowMemoryNotification() { | 2655 void v8::V8::LowMemoryNotification() { |
| 2656 #if defined(ANDROID) | |
| 2657 if (!i::V8::IsRunning()) return; | 2656 if (!i::V8::IsRunning()) return; |
| 2658 i::Heap::CollectAllGarbage(true); | 2657 i::Heap::CollectAllGarbage(true); |
| 2659 #endif | |
| 2660 } | 2658 } |
| 2661 | 2659 |
| 2662 | 2660 |
| 2663 const char* v8::V8::GetVersion() { | 2661 const char* v8::V8::GetVersion() { |
| 2664 static v8::internal::EmbeddedVector<char, 128> buffer; | 2662 static v8::internal::EmbeddedVector<char, 128> buffer; |
| 2665 v8::internal::Version::GetString(buffer); | 2663 v8::internal::Version::GetString(buffer); |
| 2666 return buffer.start(); | 2664 return buffer.start(); |
| 2667 } | 2665 } |
| 2668 | 2666 |
| 2669 | 2667 |
| (...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3836 | 3834 |
| 3837 | 3835 |
| 3838 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 3836 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 3839 HandleScopeImplementer* thread_local = | 3837 HandleScopeImplementer* thread_local = |
| 3840 reinterpret_cast<HandleScopeImplementer*>(storage); | 3838 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 3841 thread_local->IterateThis(v); | 3839 thread_local->IterateThis(v); |
| 3842 return storage + ArchiveSpacePerThread(); | 3840 return storage + ArchiveSpacePerThread(); |
| 3843 } | 3841 } |
| 3844 | 3842 |
| 3845 } } // namespace v8::internal | 3843 } } // namespace v8::internal |
| OLD | NEW |