Bug 118917

Summary: [Windows] A few uses of String::charactersWithNullTermination() cause code to hold onto addresses of temporaries
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebCore Misc.Assignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Major CC: andersca, ap, bfulgham, webkit-bug-importer
Priority: P1 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows 7   
Attachments:
Description Flags
Patch andersca: review+

Brent Fulgham
Reported 2013-07-19 11:58:01 PDT
The recent code cleanup that created the String::charactersWithNullTermination() method accidentally stored the address of the temporary Vector buffer in various Windows API locations where it expects the memory to be retained by an external party. This causes Windows to attempt to use potentially reclaimed memory, resulting in weird menu items and other problems. This patch fixes the handful of places where this is an issue.
Attachments
Patch (3.81 KB, patch)
2013-07-19 14:24 PDT, Brent Fulgham
andersca: review+
Radar WebKit Bug Importer
Comment 1 2013-07-19 11:58:53 PDT
Brent Fulgham
Comment 2 2013-07-19 14:24:02 PDT
Brent Fulgham
Comment 3 2013-07-19 14:39:17 PDT
Note You need to log in before you can comment on or make changes to this bug.