OLD | NEW |
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 5465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5476 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); | 5476 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); |
5477 if (isolate == NULL || !isolate->IsInitialized() || | 5477 if (isolate == NULL || !isolate->IsInitialized() || |
5478 IsDeadCheck(isolate, "v8::V8::AdjustAmountOfExternalAllocatedMemory()")) { | 5478 IsDeadCheck(isolate, "v8::V8::AdjustAmountOfExternalAllocatedMemory()")) { |
5479 return 0; | 5479 return 0; |
5480 } | 5480 } |
5481 return isolate->heap()->AdjustAmountOfExternalAllocatedMemory( | 5481 return isolate->heap()->AdjustAmountOfExternalAllocatedMemory( |
5482 change_in_bytes); | 5482 change_in_bytes); |
5483 } | 5483 } |
5484 | 5484 |
5485 | 5485 |
5486 void V8::SetGlobalGCPrologueCallback(GCCallback callback) { | |
5487 i::Isolate* isolate = i::Isolate::Current(); | |
5488 if (IsDeadCheck(isolate, "v8::V8::SetGlobalGCPrologueCallback()")) return; | |
5489 isolate->heap()->SetGlobalGCPrologueCallback(callback); | |
5490 } | |
5491 | |
5492 | |
5493 void V8::SetGlobalGCEpilogueCallback(GCCallback callback) { | |
5494 i::Isolate* isolate = i::Isolate::Current(); | |
5495 if (IsDeadCheck(isolate, "v8::V8::SetGlobalGCEpilogueCallback()")) return; | |
5496 isolate->heap()->SetGlobalGCEpilogueCallback(callback); | |
5497 } | |
5498 | |
5499 | |
5500 void V8::AddGCPrologueCallback(GCPrologueCallback callback, GCType gc_type) { | 5486 void V8::AddGCPrologueCallback(GCPrologueCallback callback, GCType gc_type) { |
5501 i::Isolate* isolate = i::Isolate::Current(); | 5487 i::Isolate* isolate = i::Isolate::Current(); |
5502 if (IsDeadCheck(isolate, "v8::V8::AddGCPrologueCallback()")) return; | 5488 if (IsDeadCheck(isolate, "v8::V8::AddGCPrologueCallback()")) return; |
5503 isolate->heap()->AddGCPrologueCallback(callback, gc_type); | 5489 isolate->heap()->AddGCPrologueCallback(callback, gc_type); |
5504 } | 5490 } |
5505 | 5491 |
5506 | 5492 |
5507 void V8::RemoveGCPrologueCallback(GCPrologueCallback callback) { | 5493 void V8::RemoveGCPrologueCallback(GCPrologueCallback callback) { |
5508 i::Isolate* isolate = i::Isolate::Current(); | 5494 i::Isolate* isolate = i::Isolate::Current(); |
5509 if (IsDeadCheck(isolate, "v8::V8::RemoveGCPrologueCallback()")) return; | 5495 if (IsDeadCheck(isolate, "v8::V8::RemoveGCPrologueCallback()")) return; |
(...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6739 | 6725 |
6740 v->VisitPointers(blocks_.first(), first_block_limit_); | 6726 v->VisitPointers(blocks_.first(), first_block_limit_); |
6741 | 6727 |
6742 for (int i = 1; i < blocks_.length(); i++) { | 6728 for (int i = 1; i < blocks_.length(); i++) { |
6743 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); | 6729 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); |
6744 } | 6730 } |
6745 } | 6731 } |
6746 | 6732 |
6747 | 6733 |
6748 } } // namespace v8::internal | 6734 } } // namespace v8::internal |
OLD | NEW |