Chromium Code Reviews| 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 6418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6429 } | 6429 } |
| 6430 | 6430 |
| 6431 | 6431 |
| 6432 void V8::RemoveGCEpilogueCallback(GCEpilogueCallback callback) { | 6432 void V8::RemoveGCEpilogueCallback(GCEpilogueCallback callback) { |
| 6433 i::Isolate* isolate = i::Isolate::Current(); | 6433 i::Isolate* isolate = i::Isolate::Current(); |
| 6434 isolate->heap()->RemoveGCEpilogueCallback( | 6434 isolate->heap()->RemoveGCEpilogueCallback( |
| 6435 reinterpret_cast<v8::Isolate::GCEpilogueCallback>(callback)); | 6435 reinterpret_cast<v8::Isolate::GCEpilogueCallback>(callback)); |
| 6436 } | 6436 } |
| 6437 | 6437 |
| 6438 | 6438 |
| 6439 void V8::SetTotalPhysicalMemoryFunction(TotalPhysicalMemoryCallback callback) { | |
| 6440 i::Isolate* isolate = i::Isolate::Current(); | |
|
Sven Panne
2013/10/21 07:11:04
o_O This is fundamentally wrong, and I can't see h
| |
| 6441 isolate->SetTotalPhysicalMemoryCallback(callback); | |
| 6442 } | |
| 6443 | |
| 6444 | |
| 6439 void V8::AddMemoryAllocationCallback(MemoryAllocationCallback callback, | 6445 void V8::AddMemoryAllocationCallback(MemoryAllocationCallback callback, |
| 6440 ObjectSpace space, | 6446 ObjectSpace space, |
| 6441 AllocationAction action) { | 6447 AllocationAction action) { |
| 6442 i::Isolate* isolate = i::Isolate::Current(); | 6448 i::Isolate* isolate = i::Isolate::Current(); |
| 6443 isolate->memory_allocator()->AddMemoryAllocationCallback( | 6449 isolate->memory_allocator()->AddMemoryAllocationCallback( |
| 6444 callback, space, action); | 6450 callback, space, action); |
| 6445 } | 6451 } |
| 6446 | 6452 |
| 6447 | 6453 |
| 6448 void V8::RemoveMemoryAllocationCallback(MemoryAllocationCallback callback) { | 6454 void V8::RemoveMemoryAllocationCallback(MemoryAllocationCallback callback) { |
| (...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7544 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7550 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7545 Address callback_address = | 7551 Address callback_address = |
| 7546 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7552 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7547 VMState<EXTERNAL> state(isolate); | 7553 VMState<EXTERNAL> state(isolate); |
| 7548 ExternalCallbackScope call_scope(isolate, callback_address); | 7554 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7549 callback(info); | 7555 callback(info); |
| 7550 } | 7556 } |
| 7551 | 7557 |
| 7552 | 7558 |
| 7553 } } // namespace v8::internal | 7559 } } // namespace v8::internal |
| OLD | NEW |