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

Side by Side Diff: src/api.cc

Issue 11023010: Revert r12625 due to sandbox incompatibility. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | « 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 4288 matching lines...) Expand 10 before | Expand all | Expand 10 after
4299 "Use v8::Isolate::Dispose() for a non-default isolate.")) { 4299 "Use v8::Isolate::Dispose() for a non-default isolate.")) {
4300 return false; 4300 return false;
4301 } 4301 }
4302 i::V8::TearDown(); 4302 i::V8::TearDown();
4303 return true; 4303 return true;
4304 } 4304 }
4305 4305
4306 4306
4307 HeapStatistics::HeapStatistics(): total_heap_size_(0), 4307 HeapStatistics::HeapStatistics(): total_heap_size_(0),
4308 total_heap_size_executable_(0), 4308 total_heap_size_executable_(0),
4309 total_physical_size_(0),
4310 used_heap_size_(0), 4309 used_heap_size_(0),
4311 heap_size_limit_(0) { } 4310 heap_size_limit_(0) { }
4312 4311
4313 4312
4314 void v8::V8::GetHeapStatistics(HeapStatistics* heap_statistics) { 4313 void v8::V8::GetHeapStatistics(HeapStatistics* heap_statistics) {
4315 if (!i::Isolate::Current()->IsInitialized()) { 4314 if (!i::Isolate::Current()->IsInitialized()) {
4316 // Isolate is unitialized thus heap is not configured yet. 4315 // Isolate is unitialized thus heap is not configured yet.
4317 heap_statistics->set_total_heap_size(0); 4316 heap_statistics->set_total_heap_size(0);
4318 heap_statistics->set_total_heap_size_executable(0); 4317 heap_statistics->set_total_heap_size_executable(0);
4319 heap_statistics->set_total_physical_size(0);
4320 heap_statistics->set_used_heap_size(0); 4318 heap_statistics->set_used_heap_size(0);
4321 heap_statistics->set_heap_size_limit(0); 4319 heap_statistics->set_heap_size_limit(0);
4322 return; 4320 return;
4323 } 4321 }
4324 4322
4325 i::Heap* heap = i::Isolate::Current()->heap(); 4323 i::Heap* heap = i::Isolate::Current()->heap();
4326 heap_statistics->set_total_heap_size(heap->CommittedMemory()); 4324 heap_statistics->set_total_heap_size(heap->CommittedMemory());
4327 heap_statistics->set_total_heap_size_executable( 4325 heap_statistics->set_total_heap_size_executable(
4328 heap->CommittedMemoryExecutable()); 4326 heap->CommittedMemoryExecutable());
4329 heap_statistics->set_total_physical_size(heap->CommittedPhysicalMemory());
4330 heap_statistics->set_used_heap_size(heap->SizeOfObjects()); 4327 heap_statistics->set_used_heap_size(heap->SizeOfObjects());
4331 heap_statistics->set_heap_size_limit(heap->MaxReserved()); 4328 heap_statistics->set_heap_size_limit(heap->MaxReserved());
4332 } 4329 }
4333 4330
4334 4331
4335 void v8::V8::VisitExternalResources(ExternalResourceVisitor* visitor) { 4332 void v8::V8::VisitExternalResources(ExternalResourceVisitor* visitor) {
4336 i::Isolate* isolate = i::Isolate::Current(); 4333 i::Isolate* isolate = i::Isolate::Current();
4337 IsDeadCheck(isolate, "v8::V8::VisitExternalResources"); 4334 IsDeadCheck(isolate, "v8::V8::VisitExternalResources");
4338 isolate->heap()->VisitExternalResources(visitor); 4335 isolate->heap()->VisitExternalResources(visitor);
4339 } 4336 }
(...skipping 2253 matching lines...) Expand 10 before | Expand all | Expand 10 after
6593 6590
6594 v->VisitPointers(blocks_.first(), first_block_limit_); 6591 v->VisitPointers(blocks_.first(), first_block_limit_);
6595 6592
6596 for (int i = 1; i < blocks_.length(); i++) { 6593 for (int i = 1; i < blocks_.length(); i++) {
6597 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); 6594 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]);
6598 } 6595 }
6599 } 6596 }
6600 6597
6601 6598
6602 } } // namespace v8::internal 6599 } } // 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