Bug 134050

Summary: LayerPool’d PlatformCALayerRemote/RemoteLayerBackingStore can have stale context pointers
Product: WebKit Reporter: Tim Horton <thorton>
Component: WebKit2Assignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, simon.fraser
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch simon.fraser: review+

Description Tim Horton 2014-06-18 17:00:58 PDT
Leading to horrible things when they are destroyed or displayed (and try to use said stale pointers).

<rdar://problem/17315114>
Comment 1 Tim Horton 2014-06-19 15:22:10 PDT
Created attachment 233387 [details]
patch
Comment 2 WebKit Commit Bot 2014-06-19 15:24:04 PDT
Attachment 233387 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/ca/PlatformCALayer.h:228:  The parameter name "layerType" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/platform/graphics/ca/PlatformCALayer.h:228:  The parameter name "client" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/platform/graphics/ca/PlatformCALayer.cpp:27:  Found other header before a header this file implements. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 3 in 15 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Simon Fraser (smfr) 2014-06-19 15:41:14 PDT
Comment on attachment 233387 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=233387&action=review

> Source/WebCore/platform/graphics/ca/PlatformCALayer.h:228
> +    PassRefPtr<PlatformCALayer> createCompatibleLayerWithSize(LayerType layerType, PlatformCALayerClient* client, IntSize, UseLayerPool = UseLayerPool::DoNotUse);

UseLayerPool::DoNotUse hurts.

Why not just have two create methods, one which tries the pool then calls the other?
Comment 4 Tim Horton 2014-06-20 00:34:43 PDT
http://trac.webkit.org/changeset/170179