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

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') | no next file with comments »
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 4029 matching lines...) Expand 10 before | Expand all | Expand 10 after
4040 return; 4040 return;
4041 } 4041 }
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
mnaganov (inactive) 2012/01/12 10:37:27 nit: 2 empty lines between function definitions.
yurys 2012/01/12 12:00:06 Done.
4051 void v8::V8::VisitExternalResources(ExternalResourceVisitor* visitor) {
4052 i::Isolate* isolate = i::Isolate::Current();
4053 IsDeadCheck(isolate, "v8::V8::VisitExternalResources");
4054 isolate->heap()->VisitExternalResources(visitor);
4055 }
4051 4056
4052 bool v8::V8::IdleNotification(int hint) { 4057 bool v8::V8::IdleNotification(int hint) {
4053 // Returning true tells the caller that it need not 4058 // Returning true tells the caller that it need not
4054 // continue to call IdleNotification. 4059 // continue to call IdleNotification.
4055 i::Isolate* isolate = i::Isolate::Current(); 4060 i::Isolate* isolate = i::Isolate::Current();
4056 if (isolate == NULL || !isolate->IsInitialized()) return true; 4061 if (isolate == NULL || !isolate->IsInitialized()) return true;
4057 return i::V8::IdleNotification(hint); 4062 return i::V8::IdleNotification(hint);
4058 } 4063 }
4059 4064
4060 4065
(...skipping 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after
6022 i::HeapProfiler::DeleteAllSnapshots(); 6027 i::HeapProfiler::DeleteAllSnapshots();
6023 } 6028 }
6024 6029
6025 6030
6026 void HeapProfiler::DefineWrapperClass(uint16_t class_id, 6031 void HeapProfiler::DefineWrapperClass(uint16_t class_id,
6027 WrapperInfoCallback callback) { 6032 WrapperInfoCallback callback) {
6028 i::Isolate::Current()->heap_profiler()->DefineWrapperClass(class_id, 6033 i::Isolate::Current()->heap_profiler()->DefineWrapperClass(class_id,
6029 callback); 6034 callback);
6030 } 6035 }
6031 6036
6032
mnaganov (inactive) 2012/01/12 10:37:27 nit: please, leave 2 lines here, too
yurys 2012/01/12 12:00:06 Done.
6033
6034 v8::Testing::StressType internal::Testing::stress_type_ = 6037 v8::Testing::StressType internal::Testing::stress_type_ =
6035 v8::Testing::kStressTypeOpt; 6038 v8::Testing::kStressTypeOpt;
6036 6039
6037 6040
6038 void Testing::SetStressRunType(Testing::StressType type) { 6041 void Testing::SetStressRunType(Testing::StressType type) {
6039 internal::Testing::set_stress_type(type); 6042 internal::Testing::set_stress_type(type);
6040 } 6043 }
6041 6044
6042 int Testing::GetStressRuns() { 6045 int Testing::GetStressRuns() {
6043 if (internal::FLAG_stress_runs != 0) return internal::FLAG_stress_runs; 6046 if (internal::FLAG_stress_runs != 0) return internal::FLAG_stress_runs;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
6158 6161
6159 6162
6160 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 6163 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
6161 HandleScopeImplementer* scope_implementer = 6164 HandleScopeImplementer* scope_implementer =
6162 reinterpret_cast<HandleScopeImplementer*>(storage); 6165 reinterpret_cast<HandleScopeImplementer*>(storage);
6163 scope_implementer->IterateThis(v); 6166 scope_implementer->IterateThis(v);
6164 return storage + ArchiveSpacePerThread(); 6167 return storage + ArchiveSpacePerThread();
6165 } 6168 }
6166 6169
6167 } } // namespace v8::internal 6170 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698