Bug 164777 - Remove JSString::SafeView and replace its uses with StringViewWithUnderlyingString.
Summary: Remove JSString::SafeView and replace its uses with StringViewWithUnderlyingS...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords:
Depends on: 164701
Blocks:
  Show dependency treegraph
 
Reported: 2016-11-15 09:37 PST by Mark Lam
Modified: 2016-11-15 16:20 PST (History)
9 users (show)

See Also:


Attachments
proposed patch. (14.95 KB, patch)
2016-11-15 09:52 PST, Mark Lam
no flags Details | Formatted Diff | Diff
proposed patch. (15.45 KB, patch)
2016-11-15 09:54 PST, Mark Lam
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>.