Bug 192709

Summary: Callers of JSString::getIndex should check for OOM exceptions
Product: WebKit Reporter: Keith Miller <keith_miller>
Component: New BugsAssignee: Keith Miller <keith_miller>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ews-watchlist, mark.lam, msaboff, saam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Keith Miller 2018-12-14 11:39:39 PST
Callers of JSString::getIndex should check for OOM exceptions
Comment 1 Keith Miller 2018-12-14 11:43:17 PST
Created attachment 357327 [details]
Patch
Comment 2 Mark Lam 2018-12-14 11:49:44 PST
Comment on attachment 357327 [details]
Patch

r=me
Comment 3 Keith Miller 2018-12-14 12:14:09 PST
rdar://problem/44451952
Comment 4 Keith Miller 2018-12-14 12:14:58 PST
Comment on attachment 357327 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=357327&action=review

> JSTests/stress/StringObject-define-length-getter-rope-string-oom.js:3
> +let char16 = decodeURI('%E7%9A%84');
> +let rope = char16.padEnd(2147483644, 1);
> +rope.__defineGetter__(256, function () {});

Whoops forgot to wrap this in a try catch. Will do that before landing.
Comment 5 Keith Miller 2018-12-14 12:15:23 PST
Created attachment 357330 [details]
Patch for landing
Comment 6 WebKit Commit Bot 2018-12-14 12:53:17 PST
Comment on attachment 357330 [details]
Patch for landing

Clearing flags on attachment: 357330

Committed r239227: <https://trac.webkit.org/changeset/239227>
Comment 7 WebKit Commit Bot 2018-12-14 12:53:19 PST
All reviewed patches have been landed.  Closing bug.