Bug 192709 - Callers of JSString::getIndex should check for OOM exceptions
Summary: Callers of JSString::getIndex should check for OOM exceptions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Miller
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-12-14 11:39 PST by Keith Miller
Modified: 2018-12-14 12:53 PST (History)
6 users (show)

See Also:


Attachments
Patch (6.45 KB, patch)
2018-12-14 11:43 PST, Keith Miller
no flags Details | Formatted Diff | Diff
Patch for landing (6.47 KB, patch)
2018-12-14 12:15 PST, Keith Miller
no flags Details | Formatted Diff | Diff

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