Changeset 239847 in webkit
- Timestamp:
- Jan 10, 2019, 2:50:13 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
platform/mac/ScrollbarThemeMac.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r239844 r239847 1 2019-01-10 Simon Fraser <simon.fraser@apple.com> 2 3 Fix rare crash under ScrollbarThemeMac::paintScrollCorner() 4 https://bugs.webkit.org/show_bug.cgi?id=193337 5 rdar://problem/47179993 6 7 Reviewed by Zalan Bujtas. 8 9 Async image decoding can trigger a FrameView::traverseForPaintInvalidation() fake paint, 10 which creates a GraphicsContext with no platform context. However, we could hit ScrollView::paintScrollbars() 11 which tried to get at the platform context, and then crashed. 12 13 So protect two functions in ScrollbarThemeMac with if (context.paintingDisabled()) checks. I verified 14 that other scrollbar-related painting code paths were already protected. 15 16 Hard to test because it depends on async image decoding timing. 17 18 * platform/mac/ScrollbarThemeMac.mm: 19 (WebCore::ScrollbarThemeMac::paint): 20 (WebCore::ScrollbarThemeMac::paintScrollCorner): 21 1 22 2019-01-10 Myles C. Maxfield <mmaxfield@apple.com> 2 23 -
trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm
r233116 r239847 551 551 bool ScrollbarThemeMac::paint(Scrollbar& scrollbar, GraphicsContext& context, const IntRect& damageRect) 552 552 { 553 if (context.paintingDisabled()) 554 return false; 555 553 556 setPaintCharacteristicsForScrollbar(scrollbar); 554 557 … … 569 572 void ScrollbarThemeMac::paintScrollCorner(GraphicsContext& context, const IntRect& cornerRect) 570 573 { 574 if (context.paintingDisabled()) 575 return; 576 571 577 LocalCurrentGraphicsContext localContext(context); 572 578
Note:
See TracChangeset
for help on using the changeset viewer.