DOMString should hold it's impl in a RefPtr Simplifies a bit of code. Patch attached.
Created attachment 5104 [details] Proposed patch. Also does a little cleanup.
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).
I made darin's suggested fixes before landing.