Bug 105963 - Make ClassList::reset's purpose obvious and don't keep quirks string when not needed
Summary: Make ClassList::reset's purpose obvious and don't keep quirks string when not...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Elliott Sprehn
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-02 15:57 PST by Elliott Sprehn
Modified: 2013-01-02 19:00 PST (History)
4 users (show)

See Also:


Attachments
Patch (5.29 KB, patch)
2013-01-02 16:06 PST, Elliott Sprehn
no flags Details | Formatted Diff | Diff
Patch (5.35 KB, patch)
2013-01-02 16:18 PST, Elliott Sprehn
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Elliott Sprehn 2013-01-02 15:57:43 PST
Make ClassList::reset's purpose obvious and don't leak
Comment 1 Elliott Sprehn 2013-01-02 16:06:59 PST
Created attachment 181096 [details]
Patch
Comment 2 Elliott Sprehn 2013-01-02 16:15:53 PST
We retain the SpaceSplitString when moving an Element from a quirks document to a non-quirks document if you did:

e = quirksDoc.createElement(...);
e.classList.contains("x");
standardsDoc.appendChild(e);

The SpaceSplitString for quirks is still inside the ClassList but is unused and won't be freed until the node is freed. This isn't strictly a leak since we do clean it up eventually, but it does mean the ClassList is larger than necessary (by 1 ptr).
Comment 3 Elliott Sprehn 2013-01-02 16:18:47 PST
Created attachment 181103 [details]
Patch
Comment 4 Elliott Sprehn 2013-01-02 18:42:17 PST
Comment on attachment 181103 [details]
Patch

Dunno what's up with the mac EWS but I ran the tests it complains about again (I ran them all already) and they passed.
Comment 5 Erik Arvidsson 2013-01-02 18:51:33 PST
Comment on attachment 181103 [details]
Patch

LGTM too
Comment 6 WebKit Review Bot 2013-01-02 19:00:50 PST
Comment on attachment 181103 [details]
Patch

Clearing flags on attachment: 181103

Committed r138691: <http://trac.webkit.org/changeset/138691>
Comment 7 WebKit Review Bot 2013-01-02 19:00:54 PST
All reviewed patches have been landed.  Closing bug.