| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011, Google Inc. All rights reserved. | 2 * Copyright (c) 2011, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 } | 166 } |
| 167 private: | 167 private: |
| 168 ScriptProfiler::HeapSnapshotProgress* m_progress; | 168 ScriptProfiler::HeapSnapshotProgress* m_progress; |
| 169 bool m_firstReport; | 169 bool m_firstReport; |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 class GlobalObjectNameResolver : public v8::HeapProfiler::ObjectNameResolver { | 172 class GlobalObjectNameResolver : public v8::HeapProfiler::ObjectNameResolver { |
| 173 public: | 173 public: |
| 174 virtual const char* GetName(v8::Handle<v8::Object> object) | 174 virtual const char* GetName(v8::Handle<v8::Object> object) |
| 175 { | 175 { |
| 176 if (V8DOMWrapper::isWrapperOfType(object, &V8Window::info)) { | 176 if (V8DOMWrapper::isWrapperOfType(object, &V8Window::wrapperTypeInfo)) { |
| 177 DOMWindow* window = V8Window::toNative(object); | 177 DOMWindow* window = V8Window::toNative(object); |
| 178 if (window) { | 178 if (window) { |
| 179 CString url = window->document()->url().string().utf8(); | 179 CString url = window->document()->url().string().utf8(); |
| 180 m_strings.append(url); | 180 m_strings.append(url); |
| 181 return url.data(); | 181 return url.data(); |
| 182 } | 182 } |
| 183 } | 183 } |
| 184 return 0; | 184 return 0; |
| 185 } | 185 } |
| 186 | 186 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 } | 312 } |
| 313 | 313 |
| 314 void ScriptProfiler::setIdle(bool isIdle) | 314 void ScriptProfiler::setIdle(bool isIdle) |
| 315 { | 315 { |
| 316 v8::Isolate* isolate = v8::Isolate::GetCurrent(); | 316 v8::Isolate* isolate = v8::Isolate::GetCurrent(); |
| 317 if (v8::CpuProfiler* profiler = isolate->GetCpuProfiler()) | 317 if (v8::CpuProfiler* profiler = isolate->GetCpuProfiler()) |
| 318 profiler->SetIdle(isIdle); | 318 profiler->SetIdle(isIdle); |
| 319 } | 319 } |
| 320 | 320 |
| 321 } // namespace WebCore | 321 } // namespace WebCore |
| OLD | NEW |