| 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 6368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6379 SetAddHistogramSampleFunction(callback); | 6379 SetAddHistogramSampleFunction(callback); |
| 6380 } | 6380 } |
| 6381 | 6381 |
| 6382 void V8::SetFailedAccessCheckCallbackFunction( | 6382 void V8::SetFailedAccessCheckCallbackFunction( |
| 6383 FailedAccessCheckCallback callback) { | 6383 FailedAccessCheckCallback callback) { |
| 6384 i::Isolate* isolate = i::Isolate::Current(); | 6384 i::Isolate* isolate = i::Isolate::Current(); |
| 6385 isolate->SetFailedAccessCheckCallback(callback); | 6385 isolate->SetFailedAccessCheckCallback(callback); |
| 6386 } | 6386 } |
| 6387 | 6387 |
| 6388 | 6388 |
| 6389 intptr_t Isolate::AdjustAmountOfExternalAllocatedMemory( | 6389 int64_t Isolate::AdjustAmountOfExternalAllocatedMemory( |
| 6390 intptr_t change_in_bytes) { | 6390 int64_t change_in_bytes) { |
| 6391 i::Heap* heap = reinterpret_cast<i::Isolate*>(this)->heap(); | 6391 i::Heap* heap = reinterpret_cast<i::Isolate*>(this)->heap(); |
| 6392 return heap->AdjustAmountOfExternalAllocatedMemory(change_in_bytes); | 6392 return heap->AdjustAmountOfExternalAllocatedMemory(change_in_bytes); |
| 6393 } | 6393 } |
| 6394 | 6394 |
| 6395 | 6395 |
| 6396 intptr_t V8::AdjustAmountOfExternalAllocatedMemory(intptr_t change_in_bytes) { | 6396 int64_t V8::AdjustAmountOfExternalAllocatedMemory(int64_t change_in_bytes) { |
| 6397 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); | 6397 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); |
| 6398 if (isolate == NULL || !isolate->IsInitialized()) { | 6398 if (isolate == NULL || !isolate->IsInitialized()) { |
| 6399 return 0; | 6399 return 0; |
| 6400 } | 6400 } |
| 6401 Isolate* isolate_ext = reinterpret_cast<Isolate*>(isolate); | 6401 Isolate* isolate_ext = reinterpret_cast<Isolate*>(isolate); |
| 6402 return isolate_ext->AdjustAmountOfExternalAllocatedMemory(change_in_bytes); | 6402 return isolate_ext->AdjustAmountOfExternalAllocatedMemory(change_in_bytes); |
| 6403 } | 6403 } |
| 6404 | 6404 |
| 6405 | 6405 |
| 6406 HeapProfiler* Isolate::GetHeapProfiler() { | 6406 HeapProfiler* Isolate::GetHeapProfiler() { |
| (...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7657 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7657 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7658 Address callback_address = | 7658 Address callback_address = |
| 7659 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7659 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7660 VMState<EXTERNAL> state(isolate); | 7660 VMState<EXTERNAL> state(isolate); |
| 7661 ExternalCallbackScope call_scope(isolate, callback_address); | 7661 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7662 callback(info); | 7662 callback(info); |
| 7663 } | 7663 } |
| 7664 | 7664 |
| 7665 | 7665 |
| 7666 } } // namespace v8::internal | 7666 } } // namespace v8::internal |
| OLD | NEW |