Bug 101507 - OpaqueJSClassContextData() should use StringImpl::isolatedCopy() to make string copies
Summary: OpaqueJSClassContextData() should use StringImpl::isolatedCopy() to make stri...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-07 14:03 PST by Michael Saboff
Modified: 2012-11-08 09:31 PST (History)
2 users (show)

See Also:


Attachments
Patch (2.28 KB, patch)
2012-11-07 14:05 PST, Michael Saboff
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Saboff 2012-11-07 14:03:11 PST
The OpaqueJSClassContextData construction creates its own copy of key StringImpls using StringImpl::create(UChar) and characters().  Instead it should use StringImpl::isolatedCopy().
Comment 1 Michael Saboff 2012-11-07 14:05:24 PST
Created attachment 172867 [details]
Patch
Comment 2 WebKit Review Bot 2012-11-08 06:55:09 PST
Comment on attachment 172867 [details]
Patch

Clearing flags on attachment: 172867

Committed r133894: <http://trac.webkit.org/changeset/133894>
Comment 3 WebKit Review Bot 2012-11-08 06:55:12 PST
All reviewed patches have been landed.  Closing bug.
Comment 4 Geoffrey Garen 2012-11-08 09:26:45 PST
Why?
Comment 5 Michael Saboff 2012-11-08 09:31:24 PST
(In reply to comment #4)
> Why?

isolatedCopy() will copy the string taking into account 8/16 bit.  It is also better to have the object copy itself.