Bug 134050 - LayerPool’d PlatformCALayerRemote/RemoteLayerBackingStore can have stale context pointers
Summary: LayerPool’d PlatformCALayerRemote/RemoteLayerBackingStore can have stale cont...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-06-18 17:00 PDT by Tim Horton
Modified: 2014-06-20 00:34 PDT (History)
2 users (show)

See Also:


Attachments
patch (20.52 KB, patch)
2014-06-19 15:22 PDT, Tim Horton
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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