Bug 164777

Summary: Remove JSString::SafeView and replace its uses with StringViewWithUnderlyingString.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, fpizlo, ggaren, jfbastien, keith_miller, msaboff, oliver, saam, ysuzuki
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 164701    
Bug Blocks:    
Attachments:
Description Flags
proposed patch.
none
proposed patch. ggaren: review+

Description Mark Lam 2016-11-15 09:37:55 PST
JSString::SafeView no longer achieves its intended goal to make it easier to handle strings safely.  Its clients still need to do explicit exception checks in order to be correct.  We'll remove it and replace its uses with StringViewWithUnderlyingString instead which serves to gets the a StringView (which is what we really wanted from SafeView) and keeps the backing String alive while the view is in use.
Comment 1 Mark Lam 2016-11-15 09:52:06 PST
Created attachment 294845 [details]
proposed patch.
Comment 2 Mark Lam 2016-11-15 09:54:17 PST
Created attachment 294846 [details]
proposed patch.
Comment 3 Geoffrey Garen 2016-11-15 15:11:19 PST
Comment on attachment 294846 [details]
proposed patch.

r=me
Comment 4 Mark Lam 2016-11-15 16:20:57 PST
Thanks for the review.  Landed in r208767: <http://trac.webkit.org/r208767>.