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

Side by Side Diff: third_party/WebKit/Source/core/svg/graphics/SVGImageChromeClient.cpp

Issue 1845543002: Rename Heap to ThreadHeap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 { 87 {
88 if (!m_image) 88 if (!m_image)
89 return; 89 return;
90 90
91 // The SVGImageChromeClient object's lifetime is dependent on 91 // The SVGImageChromeClient object's lifetime is dependent on
92 // the ImageObserver (an ImageResource) of its image. Should it 92 // the ImageObserver (an ImageResource) of its image. Should it
93 // be dead and about to be lazily swept out, do not proceed. 93 // be dead and about to be lazily swept out, do not proceed.
94 // 94 //
95 // TODO(Oilpan): move (SVG)Image to the Oilpan heap, and avoid 95 // TODO(Oilpan): move (SVG)Image to the Oilpan heap, and avoid
96 // this explicit lifetime check. 96 // this explicit lifetime check.
97 if (Heap::willObjectBeLazilySwept(m_image->getImageObserver())) 97 if (ThreadHeap::willObjectBeLazilySwept(m_image->getImageObserver()))
98 return; 98 return;
99 99
100 // serviceScriptedAnimations runs requestAnimationFrame callbacks, but SVG 100 // serviceScriptedAnimations runs requestAnimationFrame callbacks, but SVG
101 // images can't have any so we assert there's no script. 101 // images can't have any so we assert there's no script.
102 ScriptForbiddenScope forbidScript; 102 ScriptForbiddenScope forbidScript;
103 103
104 // The calls below may trigger GCs, so set up the required persistent 104 // The calls below may trigger GCs, so set up the required persistent
105 // reference on the ImageResource which owns this SVGImage. By transitivity, 105 // reference on the ImageResource which owns this SVGImage. By transitivity,
106 // that will keep this SVGImageChromeClient object alive. 106 // that will keep this SVGImageChromeClient object alive.
107 Persistent<ImageObserver> protect(m_image->getImageObserver()); 107 Persistent<ImageObserver> protect(m_image->getImageObserver());
108 m_image->frameView()->page()->animator().serviceScriptedAnimations(monotonic allyIncreasingTime()); 108 m_image->frameView()->page()->animator().serviceScriptedAnimations(monotonic allyIncreasingTime());
109 m_image->frameView()->updateAllLifecyclePhases(); 109 m_image->frameView()->updateAllLifecyclePhases();
110 } 110 }
111 111
112 } // namespace blink 112 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698