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

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

Issue 2905833003: Make Image::image_observer_ WeakPersistent (Closed)
Patch Set: Created 3 years, 6 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 void SVGImageChromeClient::AnimationTimerFired(TimerBase*) { 111 void SVGImageChromeClient::AnimationTimerFired(TimerBase*) {
112 if (!image_) 112 if (!image_)
113 return; 113 return;
114 114
115 // The SVGImageChromeClient object's lifetime is dependent on 115 // The SVGImageChromeClient object's lifetime is dependent on
116 // the ImageObserver (an ImageResourceContent) of its image. Should it 116 // the ImageObserver (an ImageResourceContent) of its image. Should it
117 // be dead and about to be lazily swept out, do not proceed. 117 // be dead and about to be lazily swept out, do not proceed.
118 // 118 //
119 // TODO(Oilpan): move (SVG)Image to the Oilpan heap, and avoid 119 // TODO(Oilpan): move (SVG)Image to the Oilpan heap, and avoid
120 // this explicit lifetime check. 120 // this explicit lifetime check.
haraken 2017/05/25 23:23:02 Is it still hard to move Image to Oilpan's heap?
hiroshige 2017/05/26 00:03:27 I'm not sure. Were there any blocking issues to mo
121 if (ThreadHeap::WillObjectBeLazilySwept(image_->GetImageObserver())) 121 if (image_->GetImageObserver() &&
122 ThreadHeap::WillObjectBeLazilySwept(image_->GetImageObserver()))
haraken 2017/05/25 23:23:02 Now that Image::image_observer_ is cleared in the
hiroshige 2017/05/26 18:44:58 Done.
122 return; 123 return;
123 124
124 image_->ServiceAnimations(MonotonicallyIncreasingTime()); 125 image_->ServiceAnimations(MonotonicallyIncreasingTime());
125 } 126 }
126 127
127 } // namespace blink 128 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698