Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: Source/bindings/core/v8/ScriptProfiler.cpp

Issue 651713002: Oilpan: DOM wrappers don't need to keep persistent handles (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/core/v8/NPV8Object.cpp ('k') | Source/bindings/core/v8/V8DOMWrapper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/NPV8Object.cpp ('k') | Source/bindings/core/v8/V8DOMWrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698