Changeset 185660 in webkit
- Timestamp:
- Jun 17, 2015 12:18:30 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r185658 r185660 1 2015-06-17 Antti Koivisto <antti@apple.com> 2 3 iOS WebKit1: [LegacyTileLayer drawInContext:] should ensure it has web lock 4 https://bugs.webkit.org/show_bug.cgi?id=146072 5 rdar://problem/21149759 6 7 Reviewed by Simon Fraser 8 9 There are some scenarios where we end up drawing without web lock due to client or system issues. 10 This can cause crashes. 11 12 * platform/ios/LegacyTileLayer.mm: 13 (-[LegacyTileLayer setNeedsDisplayInRect:]): 14 (-[LegacyTileLayer drawInContext:]): 15 16 Ensure we have the web lock when called in main thread (even though we should have it already). 17 1 18 2015-06-17 Brent Fulgham <bfulgham@apple.com> 2 19 -
trunk/Source/WebCore/platform/ios/LegacyTileLayer.mm
r185461 r185660 77 77 - (void)setNeedsDisplayInRect:(CGRect)rect 78 78 { 79 // We need to do WebKit layout before painting. Layout may generate new repaint rects and 80 // invalidate more tiles, something that is not allowed in drawInContext. 81 // Calling setNeedsLayout ensures that layoutSublayers will get called before drawInContext and 82 // we do WebKit layout there. 79 83 [self setNeedsLayout]; 80 84 [super setNeedsDisplayInRect:rect]; … … 92 96 - (void)drawInContext:(CGContextRef)context 93 97 { 98 // Bugs in clients or other frameworks may cause tile invalidation from within a CA commit. 99 // In that case we maybe left with dirty tiles that have display still pending. Some future 100 // commit will flush such tiles and they will get painted without holding the web lock. 101 // rdar://problem/21149759 102 // Still assert as the condition is not normal and may cause graphical glitches. 103 ASSERT(WebThreadIsLockedOrDisabled()); 104 if (pthread_main_np()) 105 WebThreadLock(); 106 94 107 if (_tileGrid) 95 108 _tileGrid->tileCache().drawLayer(self, context);
Note: See TracChangeset
for help on using the changeset viewer.