Bug 26197

Summary: Incorrect variable initialization in PlatformContextSkia.cpp
Product: WebKit Reporter: Roland Steiner <rolandsteiner>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Trivial CC: eric, rolandsteiner
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows XP   
Attachments:
Description Flags
patch correcting the member variable initialization
none
PlatformContextSkia : fix member initialization (fixed .patch)
eric: review-
ChangeLog entry
none
patch - remove variable initialization eric: review+

Roland Steiner
Reported 2009-06-04 15:30:30 PDT
The PlatformContextSkia constructor does a (very likely) wrong size initialization for its m_stateStack member: m_stateStack(sizeof(State)) The intended initialization is probably rather m_stateStack(1)
Attachments
patch correcting the member variable initialization (460 bytes, patch)
2009-06-04 15:31 PDT, Roland Steiner
no flags
PlatformContextSkia : fix member initialization (fixed .patch) (553 bytes, patch)
2009-06-04 16:32 PDT, Roland Steiner
eric: review-
ChangeLog entry (784 bytes, patch)
2009-06-04 16:38 PDT, Roland Steiner
no flags
patch - remove variable initialization (1.54 KB, patch)
2009-06-04 21:21 PDT, Roland Steiner
eric: review+
Roland Steiner
Comment 1 2009-06-04 15:31:28 PDT
Created attachment 30962 [details] patch correcting the member variable initialization
Roland Steiner
Comment 2 2009-06-04 16:32:07 PDT
Created attachment 30969 [details] PlatformContextSkia : fix member initialization (fixed .patch) (fixed .patch format, otherwise same as above)
Roland Steiner
Comment 3 2009-06-04 16:38:23 PDT
Created attachment 30971 [details] ChangeLog entry
Eric Seidel (no email)
Comment 4 2009-06-04 20:52:29 PDT
Comment on attachment 30969 [details] PlatformContextSkia : fix member initialization (fixed .patch) I suggest we remove the initialization all together. Vector will do the right thing by itself, we don't need to tell it to only allocate 1 slot by default.
Roland Steiner
Comment 5 2009-06-04 20:58:58 PDT
(In reply to comment #4) I'm ok with that. It only occurred to me while browsing the code - I didn't question (or even research) the motivation behind it.
David Levin
Comment 6 2009-06-04 21:03:13 PDT
Comment on attachment 30971 [details] ChangeLog entry removed the r? from the changelog entry.
Roland Steiner
Comment 7 2009-06-04 21:21:11 PDT
Created attachment 30988 [details] patch - remove variable initialization cf. comment #4
Eric Seidel (no email)
Comment 8 2009-06-04 21:25:32 PDT
Comment on attachment 30988 [details] patch - remove variable initialization I would have just copied my comment instead of citing it. :) But looks great!
Roland Steiner
Comment 9 2009-06-10 10:01:51 PDT
(In reply to comment #8) Thanks - as I'm not a committer (yet!), could you please commit this for me as well? Cheers, Roland
Brent Fulgham
Comment 10 2009-06-10 11:16:49 PDT
Landed in @r44576. Please don't remove the "Review by NOBODY (OOPS!)" from the ChangeLog.
Note You need to log in before you can comment on or make changes to this bug.