Bug 6106 - DOMString should hold its impl in a RefPtr
Summary: DOMString should hold its impl in a RefPtr
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P4 Normal
Assignee: Eric Seidel (no email)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-16 01:54 PST by Eric Seidel (no email)
Modified: 2005-12-16 14:25 PST (History)
0 users

See Also:


Attachments
Proposed patch. (7.32 KB, patch)
2005-12-16 01:58 PST, Eric Seidel (no email)
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2005-12-16 01:54:27 PST
DOMString should hold it's impl in a RefPtr

Simplifies a bit of code.  Patch attached.
Comment 1 Eric Seidel (no email) 2005-12-16 01:58:44 PST
Created attachment 5104 [details]
Proposed patch.

Also does a little cleanup.
Comment 2 Darin Adler 2005-12-16 07:30:45 PST
Comment on attachment 5104 [details]
Proposed patch.

A couple refinements you could do before landing:

With this change, ~DOMString, DOMString(const DOMString &), and
DOMString::operator= don't need to be explicitly declared or implemented. The
default generated ones will do the right thing without any code.

(The same would be true of the default constructor except that as I recall the
default constructor is only generated if you don't delcare any others.)

Also, you should replace tabs with spaces in these files (patches show many
tabs).
Comment 3 Eric Seidel (no email) 2005-12-16 14:25:21 PST
I made darin's suggested fixes before landing.