| OLD | NEW |
| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 105 |
| 106 void SVGImageChromeClient::setTimer(std::unique_ptr<TimerBase> timer) { | 106 void SVGImageChromeClient::setTimer(std::unique_ptr<TimerBase> timer) { |
| 107 m_animationTimer = std::move(timer); | 107 m_animationTimer = std::move(timer); |
| 108 } | 108 } |
| 109 | 109 |
| 110 void SVGImageChromeClient::animationTimerFired(TimerBase*) { | 110 void SVGImageChromeClient::animationTimerFired(TimerBase*) { |
| 111 if (!m_image) | 111 if (!m_image) |
| 112 return; | 112 return; |
| 113 | 113 |
| 114 // The SVGImageChromeClient object's lifetime is dependent on | 114 // The SVGImageChromeClient object's lifetime is dependent on |
| 115 // the ImageObserver (an ImageResource) of its image. Should it | 115 // the ImageObserver (an ImageResourceContent) of its image. Should it |
| 116 // be dead and about to be lazily swept out, do not proceed. | 116 // be dead and about to be lazily swept out, do not proceed. |
| 117 // | 117 // |
| 118 // TODO(Oilpan): move (SVG)Image to the Oilpan heap, and avoid | 118 // TODO(Oilpan): move (SVG)Image to the Oilpan heap, and avoid |
| 119 // this explicit lifetime check. | 119 // this explicit lifetime check. |
| 120 if (ThreadHeap::willObjectBeLazilySwept(m_image->getImageObserver())) | 120 if (ThreadHeap::willObjectBeLazilySwept(m_image->getImageObserver())) |
| 121 return; | 121 return; |
| 122 | 122 |
| 123 m_image->serviceAnimations(monotonicallyIncreasingTime()); | 123 m_image->serviceAnimations(monotonicallyIncreasingTime()); |
| 124 } | 124 } |
| 125 | 125 |
| 126 } // namespace blink | 126 } // namespace blink |
| OLD | NEW |