Bug 214354 - Add handling of out of memory handling while adding a worklet module.
Summary: Add handling of out of memory handling while adding a worklet module.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-07-15 08:14 PDT by Mark Lam
Modified: 2020-07-15 17:15 PDT (History)
11 users (show)

See Also:


Attachments
proposed patch. (20.25 KB, patch)
2020-07-15 08:27 PDT, Mark Lam
keith_miller: 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 2020-07-15 08:14:39 PDT
<rdar://problem/65271931>
Comment 1 Mark Lam 2020-07-15 08:27:41 PDT
Created attachment 404342 [details]
proposed patch.
Comment 2 Yusuke Suzuki 2020-07-15 11:36:08 PDT
Comment on attachment 404342 [details]
proposed patch.

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

r=me with comment.

> LayoutTests/fast/css-custom-paint/out-of-memory-while-adding-worklet-module-expected.txt:5
> +    RenderBody {BODY} at (8,8) size 784x584

Please include js-pre.js and js-post.js and disable this layout dump.
Comment 3 Keith Miller 2020-07-15 11:37:56 PDT
Comment on attachment 404342 [details]
proposed patch.

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

r=me too with nit.

> Source/JavaScriptCore/runtime/VM.cpp:473
> +            else
> +                RELEASE_ASSERT(bigInt);

Nit: I don't think this is needed and will probably be removed by the compiler.
Comment 4 Mark Lam 2020-07-15 12:11:08 PDT
Comment on attachment 404342 [details]
proposed patch.

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

>> Source/JavaScriptCore/runtime/VM.cpp:473
>> +                RELEASE_ASSERT(bigInt);
> 
> Nit: I don't think this is needed and will probably be removed by the compiler.

It is needed.  If the success pointer is null, we want to RELEASE_ASSERT(the result).  This will be compiled into an unconditional crash.
Comment 5 Mark Lam 2020-07-15 12:21:51 PDT
Thanks for the reviews.  I've made the requested test changes.

Landed in r264413: <http://trac.webkit.org/r264413>.