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

Side by Side Diff: src/api.cc

Issue 9139018: Provide a way for iterating through all external strings referenced from the JS heap (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 8 years, 11 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 | « include/v8.h ('k') | src/heap.h » ('j') | test/cctest/test-api.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 4031 matching lines...) Expand 10 before | Expand all | Expand 10 after
4042 4042
4043 i::Heap* heap = i::Isolate::Current()->heap(); 4043 i::Heap* heap = i::Isolate::Current()->heap();
4044 heap_statistics->set_total_heap_size(heap->CommittedMemory()); 4044 heap_statistics->set_total_heap_size(heap->CommittedMemory());
4045 heap_statistics->set_total_heap_size_executable( 4045 heap_statistics->set_total_heap_size_executable(
4046 heap->CommittedMemoryExecutable()); 4046 heap->CommittedMemoryExecutable());
4047 heap_statistics->set_used_heap_size(heap->SizeOfObjects()); 4047 heap_statistics->set_used_heap_size(heap->SizeOfObjects());
4048 heap_statistics->set_heap_size_limit(heap->MaxReserved()); 4048 heap_statistics->set_heap_size_limit(heap->MaxReserved());
4049 } 4049 }
4050 4050
4051 4051
4052 void v8::V8::VisitExternalResources(ExternalResourceVisitor* visitor) {
4053 i::Isolate* isolate = i::Isolate::Current();
4054 IsDeadCheck(isolate, "v8::V8::VisitExternalResources");
4055 isolate->heap()->VisitExternalResources(visitor);
4056 }
4057
4058
4052 bool v8::V8::IdleNotification(int hint) { 4059 bool v8::V8::IdleNotification(int hint) {
4053 // Returning true tells the caller that it need not 4060 // Returning true tells the caller that it need not
4054 // continue to call IdleNotification. 4061 // continue to call IdleNotification.
4055 i::Isolate* isolate = i::Isolate::Current(); 4062 i::Isolate* isolate = i::Isolate::Current();
4056 if (isolate == NULL || !isolate->IsInitialized()) return true; 4063 if (isolate == NULL || !isolate->IsInitialized()) return true;
4057 return i::V8::IdleNotification(hint); 4064 return i::V8::IdleNotification(hint);
4058 } 4065 }
4059 4066
4060 4067
4061 void v8::V8::LowMemoryNotification() { 4068 void v8::V8::LowMemoryNotification() {
(...skipping 2096 matching lines...) Expand 10 before | Expand all | Expand 10 after
6158 6165
6159 6166
6160 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 6167 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
6161 HandleScopeImplementer* scope_implementer = 6168 HandleScopeImplementer* scope_implementer =
6162 reinterpret_cast<HandleScopeImplementer*>(storage); 6169 reinterpret_cast<HandleScopeImplementer*>(storage);
6163 scope_implementer->IterateThis(v); 6170 scope_implementer->IterateThis(v);
6164 return storage + ArchiveSpacePerThread(); 6171 return storage + ArchiveSpacePerThread();
6165 } 6172 }
6166 6173
6167 } } // namespace v8::internal 6174 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/heap.h » ('j') | test/cctest/test-api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698