Bug 52597

Summary: Crash beneath PlatformCALayer::adoptSublayers when switching out of tiling mode (null-dereference of a PlatformCALayer)
Product: WebKit Reporter: Adam Roben (:aroben) <aroben>
Component: New BugsAssignee: Adam Roben (:aroben) <aroben>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarrin, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Patch darin: review+

Description Adam Roben (:aroben) 2011-01-17 14:31:24 PST
Crash beneath PlatformCALayer::adoptSublayers when switching out of tiling mode (null-dereference of a PlatformCALayer)
Comment 1 Adam Roben (:aroben) 2011-01-17 14:32:41 PST
Created attachment 79217 [details]
Patch
Comment 2 Chris Marrin 2011-01-17 14:43:18 PST

Looks good. r=me

> LayoutTests/ChangeLog:12
> +        Reviewed by NOBODY (OOPS!).

How come this is below the description?

> Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp:688
> +        for (int i = 0; i < sublayers.size(); ++i)

Would it be any more efficient here to use 'n', since you have to get it anyway?

Also, ASSERT(n == sublayers.size()) would be nice
Comment 3 Adam Roben (:aroben) 2011-01-17 14:47:00 PST
(In reply to comment #2)
> 
> > LayoutTests/ChangeLog:12
> > +        Reviewed by NOBODY (OOPS!).
> 
> How come this is below the description?

Because I think it's less important than the description, in most cases. But I should email webkit-dev about changing our tools to use this alternate ordering rather than going against the flow.

> > Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp:688
> > +        for (int i = 0; i < sublayers.size(); ++i)
> 
> Would it be any more efficient here to use 'n', since you have to get it anyway?

I guess so.

> Also, ASSERT(n == sublayers.size()) would be nice

Good idea. I'll add that.

Thanks for reviewing! (You, too, Darin!)
Comment 4 Adam Roben (:aroben) 2011-01-17 17:51:22 PST
Committed r75985: <http://trac.webkit.org/changeset/75985>