| 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 6011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6022 i::HeapProfiler::DeleteAllSnapshots(); | 6022 i::HeapProfiler::DeleteAllSnapshots(); |
| 6023 } | 6023 } |
| 6024 | 6024 |
| 6025 | 6025 |
| 6026 void HeapProfiler::DefineWrapperClass(uint16_t class_id, | 6026 void HeapProfiler::DefineWrapperClass(uint16_t class_id, |
| 6027 WrapperInfoCallback callback) { | 6027 WrapperInfoCallback callback) { |
| 6028 i::Isolate::Current()->heap_profiler()->DefineWrapperClass(class_id, | 6028 i::Isolate::Current()->heap_profiler()->DefineWrapperClass(class_id, |
| 6029 callback); | 6029 callback); |
| 6030 } | 6030 } |
| 6031 | 6031 |
| 6032 void HeapProfiler::VisitExternalResources( |
| 6033 v8::HeapProfiler::ExternalResourceVisitor* visitor) { |
| 6034 i::Isolate* isolate = i::Isolate::Current(); |
| 6035 IsDeadCheck(isolate, "v8::HeapProfiler::VisitExternalResources"); |
| 6032 | 6036 |
| 6037 class VisitorImpl : public i::HeapProfiler::ExternalResourceVisitor { |
| 6038 public: |
| 6039 VisitorImpl(v8::HeapProfiler::ExternalResourceVisitor* visitor) |
| 6040 : visitor_(visitor) {} |
| 6041 virtual ~VisitorImpl() {} |
| 6042 virtual void VisitExternalString(i::String* string) { |
| 6043 visitor_->VisitExternalString(Utils::ToLocal( |
| 6044 i::Handle<i::String>(string))); |
| 6045 } |
| 6046 private: |
| 6047 v8::HeapProfiler::ExternalResourceVisitor* visitor_; |
| 6048 } internal_visitor(visitor); |
| 6049 i::HeapProfiler::VisitExternalResources(&internal_visitor); |
| 6050 } |
| 6033 | 6051 |
| 6034 v8::Testing::StressType internal::Testing::stress_type_ = | 6052 v8::Testing::StressType internal::Testing::stress_type_ = |
| 6035 v8::Testing::kStressTypeOpt; | 6053 v8::Testing::kStressTypeOpt; |
| 6036 | 6054 |
| 6037 | 6055 |
| 6038 void Testing::SetStressRunType(Testing::StressType type) { | 6056 void Testing::SetStressRunType(Testing::StressType type) { |
| 6039 internal::Testing::set_stress_type(type); | 6057 internal::Testing::set_stress_type(type); |
| 6040 } | 6058 } |
| 6041 | 6059 |
| 6042 int Testing::GetStressRuns() { | 6060 int Testing::GetStressRuns() { |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6158 | 6176 |
| 6159 | 6177 |
| 6160 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6178 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 6161 HandleScopeImplementer* scope_implementer = | 6179 HandleScopeImplementer* scope_implementer = |
| 6162 reinterpret_cast<HandleScopeImplementer*>(storage); | 6180 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 6163 scope_implementer->IterateThis(v); | 6181 scope_implementer->IterateThis(v); |
| 6164 return storage + ArchiveSpacePerThread(); | 6182 return storage + ArchiveSpacePerThread(); |
| 6165 } | 6183 } |
| 6166 | 6184 |
| 6167 } } // namespace v8::internal | 6185 } } // namespace v8::internal |
| OLD | NEW |