Summary: | CSSPrimitiveValue::parserValue() returns deleted memory | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Eric Seidel (no email) <eric> | ||||
Component: | CSS | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | hyatt, mitz, mjs | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Description
Eric Seidel (no email)
2008-07-16 20:11:20 PDT
In case you're wondering, valueOrPropertyName returns a char* which is transparently copied to create a String: static const char* valueOrPropertyName(int valueOrPropertyID) { if (const char* valueName = getValueName(valueOrPropertyID)) return valueName; return getPropertyName(static_cast<CSSPropertyID>(valueOrPropertyID)); } Seems sad that it would be copied. :( Created attachment 50602 [details]
Change valueOrPropertyName() to return an AtomicString from a static table
You probably could have added a test case with a "checkConsistency"-style assertion. |