Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: src/api.cc

Issue 330004: Make V8::LowMemoryNotification GC for all platforms. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698