Summary: | Lazily create WebCore::Timer for WebCore::Image | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | David Kilzer (:ddkilzer) <ddkilzer> | ||||
Component: | WebCore Misc. | Assignee: | David Kilzer (:ddkilzer) <ddkilzer> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | cgarcia, dino, jonlee, koivisto, sabouhallawa, simon.fraser, thorton, webkit-bug-importer, zan | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | Other | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 185330 | ||||||
Attachments: |
|
Description
David Kilzer (:ddkilzer)
2018-05-17 15:49:38 PDT
Created attachment 340663 [details]
Patch v1
This bug improves the safety of using WebCore::Image in the UI Process since current uses do not include animated images. It also prevents a WebCore::Timer from being allocated for a nullImage. Comment on attachment 340663 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=340663&action=review > Source/WebCore/platform/graphics/Image.cpp:351 > + std::call_once(onceFlag, [this] { Don't need call_once. Just if (!m_animationStartTimer) > Source/WebCore/platform/graphics/Image.h:203 > + std::once_flag onceFlag; Don't need this here. Comment on attachment 340663 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=340663&action=review >> Source/WebCore/platform/graphics/Image.cpp:351 >> + std::call_once(onceFlag, [this] { > > Don't need call_once. Just if (!m_animationStartTimer) So we can assume Image::startAnimationAsynchronously() and Image::animationPending() are always called on the main thread? >> Source/WebCore/platform/graphics/Image.h:203 >> + std::once_flag onceFlag; > > Don't need this here. Saves another 8 bytes. WebCore::Image goes down from 104 bytes to just 40 bytes with this change. Committed r231940: <https://trac.webkit.org/changeset/231940> |