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 7468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7479 reinterpret_cast<i::HeapProfiler*>(this)->GetSnapshot(index)); | 7479 reinterpret_cast<i::HeapProfiler*>(this)->GetSnapshot(index)); |
| 7480 } | 7480 } |
| 7481 | 7481 |
| 7482 | 7482 |
| 7483 SnapshotObjectId HeapProfiler::GetObjectId(Handle<Value> value) { | 7483 SnapshotObjectId HeapProfiler::GetObjectId(Handle<Value> value) { |
| 7484 i::Handle<i::Object> obj = Utils::OpenHandle(*value); | 7484 i::Handle<i::Object> obj = Utils::OpenHandle(*value); |
| 7485 return reinterpret_cast<i::HeapProfiler*>(this)->GetSnapshotObjectId(obj); | 7485 return reinterpret_cast<i::HeapProfiler*>(this)->GetSnapshotObjectId(obj); |
| 7486 } | 7486 } |
| 7487 | 7487 |
| 7488 | 7488 |
| 7489 Local<Value> HeapProfiler::FindHeapObjectById(SnapshotObjectId id) { | |
| 7490 i::Handle<i::Object> obj = | |
| 7491 reinterpret_cast<i::HeapProfiler*>(this)->FindHeapObjectById(id); | |
| 7492 if (obj.is_null()) return Local<Value>(); | |
| 7493 return Utils::ToLocal(obj); | |
| 7494 } | |
| 7495 | |
| 7496 | |
| 7497 void HeapProfiler::ClearHeapObjectIds() { | |
| 7498 reinterpret_cast<i::HeapProfiler*>(this)->ClearHeapObjectMap(); | |
| 7499 } | |
| 7500 | |
|
alph
2013/12/04 08:39:38
nit: add an empty line
| |
| 7489 const HeapSnapshot* HeapProfiler::TakeHeapSnapshot( | 7501 const HeapSnapshot* HeapProfiler::TakeHeapSnapshot( |
| 7490 Handle<String> title, | 7502 Handle<String> title, |
| 7491 ActivityControl* control, | 7503 ActivityControl* control, |
| 7492 ObjectNameResolver* resolver) { | 7504 ObjectNameResolver* resolver) { |
| 7493 return reinterpret_cast<const HeapSnapshot*>( | 7505 return reinterpret_cast<const HeapSnapshot*>( |
| 7494 reinterpret_cast<i::HeapProfiler*>(this)->TakeSnapshot( | 7506 reinterpret_cast<i::HeapProfiler*>(this)->TakeSnapshot( |
| 7495 *Utils::OpenHandle(*title), control, resolver)); | 7507 *Utils::OpenHandle(*title), control, resolver)); |
| 7496 } | 7508 } |
| 7497 | 7509 |
| 7498 | 7510 |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7780 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7792 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7781 Address callback_address = | 7793 Address callback_address = |
| 7782 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7794 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7783 VMState<EXTERNAL> state(isolate); | 7795 VMState<EXTERNAL> state(isolate); |
| 7784 ExternalCallbackScope call_scope(isolate, callback_address); | 7796 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7785 callback(info); | 7797 callback(info); |
| 7786 } | 7798 } |
| 7787 | 7799 |
| 7788 | 7800 |
| 7789 } } // namespace v8::internal | 7801 } } // namespace v8::internal |
| OLD | NEW |