| 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 ASSERT_UNUSED(m_isolate, V8Node::hasInstance(*wrapper, m_isolate)); | 284 ASSERT_UNUSED(m_isolate, V8Node::hasInstance(*wrapper, m_isolate)); |
| 285 ASSERT((*wrapper)->IsObject()); | 285 ASSERT((*wrapper)->IsObject()); |
| 286 m_visitor->visitNode(V8Node::toImpl(*wrapper)); | 286 m_visitor->visitNode(V8Node::toImpl(*wrapper)); |
| 287 } | 287 } |
| 288 | 288 |
| 289 private: | 289 private: |
| 290 WrappedNodeVisitor* m_visitor; | 290 WrappedNodeVisitor* m_visitor; |
| 291 v8::Isolate* m_isolate; | 291 v8::Isolate* m_isolate; |
| 292 } wrapperVisitor(visitor, isolate); | 292 } wrapperVisitor(visitor, isolate); |
| 293 | 293 |
| 294 v8::V8::VisitHandlesWithClassIds(&wrapperVisitor); | 294 v8::V8::VisitHandlesWithClassIds(isolate, &wrapperVisitor); |
| 295 } | 295 } |
| 296 | 296 |
| 297 ProfileNameIdleTimeMap* ScriptProfiler::currentProfileNameIdleTimeMap() | 297 ProfileNameIdleTimeMap* ScriptProfiler::currentProfileNameIdleTimeMap() |
| 298 { | 298 { |
| 299 AtomicallyInitializedStatic(WTF::ThreadSpecific<ProfileNameIdleTimeMap>*, ma
p = new WTF::ThreadSpecific<ProfileNameIdleTimeMap>); | 299 AtomicallyInitializedStatic(WTF::ThreadSpecific<ProfileNameIdleTimeMap>*, ma
p = new WTF::ThreadSpecific<ProfileNameIdleTimeMap>); |
| 300 return *map; | 300 return *map; |
| 301 } | 301 } |
| 302 | 302 |
| 303 void ScriptProfiler::setIdle(bool isIdle) | 303 void ScriptProfiler::setIdle(bool isIdle) |
| 304 { | 304 { |
| 305 v8::Isolate* isolate = v8::Isolate::GetCurrent(); | 305 v8::Isolate* isolate = v8::Isolate::GetCurrent(); |
| 306 if (v8::CpuProfiler* profiler = isolate->GetCpuProfiler()) | 306 if (v8::CpuProfiler* profiler = isolate->GetCpuProfiler()) |
| 307 profiler->SetIdle(isIdle); | 307 profiler->SetIdle(isIdle); |
| 308 } | 308 } |
| 309 | 309 |
| 310 } // namespace blink | 310 } // namespace blink |
| OLD | NEW |