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

Side by Side Diff: src/api.cc

Issue 8347032: Fix from Paul Lind that helps post-isolates V8 work with older (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3987 matching lines...) Expand 10 before | Expand all | Expand 10 after
3998 heap_statistics->set_total_heap_size_executable( 3998 heap_statistics->set_total_heap_size_executable(
3999 heap->CommittedMemoryExecutable()); 3999 heap->CommittedMemoryExecutable());
4000 heap_statistics->set_used_heap_size(heap->SizeOfObjects()); 4000 heap_statistics->set_used_heap_size(heap->SizeOfObjects());
4001 heap_statistics->set_heap_size_limit(heap->MaxReserved()); 4001 heap_statistics->set_heap_size_limit(heap->MaxReserved());
4002 } 4002 }
4003 4003
4004 4004
4005 bool v8::V8::IdleNotification() { 4005 bool v8::V8::IdleNotification() {
4006 // Returning true tells the caller that it need not 4006 // Returning true tells the caller that it need not
4007 // continue to call IdleNotification. 4007 // continue to call IdleNotification.
4008 if (!i::Isolate::Current()->IsInitialized()) return true; 4008 i::Isolate* isolate = i::Isolate::Current();
4009 if (isolate == NULL || !isolate->IsInitialized()) return true;
4009 return i::V8::IdleNotification(); 4010 return i::V8::IdleNotification();
4010 } 4011 }
4011 4012
4012 4013
4013 void v8::V8::LowMemoryNotification() { 4014 void v8::V8::LowMemoryNotification() {
4014 i::Isolate* isolate = i::Isolate::Current(); 4015 i::Isolate* isolate = i::Isolate::Current();
4015 if (!isolate->IsInitialized()) return; 4016 if (isolate == NULL || !isolate->IsInitialized()) return;
4016 isolate->heap()->CollectAllAvailableGarbage(); 4017 isolate->heap()->CollectAllAvailableGarbage();
4017 } 4018 }
4018 4019
4019 4020
4020 int v8::V8::ContextDisposedNotification() { 4021 int v8::V8::ContextDisposedNotification() {
4021 i::Isolate* isolate = i::Isolate::Current(); 4022 i::Isolate* isolate = i::Isolate::Current();
4022 if (!isolate->IsInitialized()) return 0; 4023 if (!isolate->IsInitialized()) return 0;
4023 return isolate->heap()->NotifyContextDisposed(); 4024 return isolate->heap()->NotifyContextDisposed();
4024 } 4025 }
4025 4026
(...skipping 2071 matching lines...) Expand 10 before | Expand all | Expand 10 after
6097 6098
6098 6099
6099 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 6100 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
6100 HandleScopeImplementer* scope_implementer = 6101 HandleScopeImplementer* scope_implementer =
6101 reinterpret_cast<HandleScopeImplementer*>(storage); 6102 reinterpret_cast<HandleScopeImplementer*>(storage);
6102 scope_implementer->IterateThis(v); 6103 scope_implementer->IterateThis(v);
6103 return storage + ArchiveSpacePerThread(); 6104 return storage + ArchiveSpacePerThread();
6104 } 6105 }
6105 6106
6106 } } // namespace v8::internal 6107 } } // 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