Bug 231976 - canDoFastSpread should also check that the Structure is from the global object we're watching
Summary: canDoFastSpread should also check that the Structure is from the global objec...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-19 12:39 PDT by Saam Barati
Modified: 2021-10-22 11:23 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.67 KB, patch)
2021-10-19 12:54 PDT, Saam Barati
no flags Details | Formatted Diff | Diff
follow up (1.57 KB, patch)
2021-10-19 17:11 PDT, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2021-10-19 12:39:25 PDT
...
Comment 1 Saam Barati 2021-10-19 12:40:34 PDT
<rdar://84340372>
Comment 2 Saam Barati 2021-10-19 12:54:27 PDT
Created attachment 441776 [details]
Patch
Comment 3 Keith Miller 2021-10-19 13:05:10 PDT
Comment on attachment 441776 [details]
Patch

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

> Source/JavaScriptCore/dfg/DFGGraph.cpp:1852
> +            && structure->globalObject() == globalObject
>              && structure->storedPrototype() == arrayPrototype

Nit: Can we invert these two lines?
Comment 4 Saam Barati 2021-10-19 15:13:37 PDT
Comment on attachment 441776 [details]
Patch

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

>> Source/JavaScriptCore/dfg/DFGGraph.cpp:1852
>>              && structure->storedPrototype() == arrayPrototype
> 
> Nit: Can we invert these two lines?

What's your thinking? The current code actually reads more clearly to me.
Comment 5 EWS 2021-10-19 15:48:33 PDT
Committed r284506 (243252@main): <https://commits.webkit.org/243252@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 441776 [details].
Comment 6 Saam Barati 2021-10-19 17:05:07 PDT
Will fix Keith's nit.
Comment 7 Saam Barati 2021-10-19 17:11:43 PDT
Created attachment 441820 [details]
follow up
Comment 8 Keith Miller 2021-10-20 08:10:26 PDT
Comment on attachment 441820 [details]
follow up

r=me.
Comment 9 EWS 2021-10-22 11:23:17 PDT
Committed r284699 (243416@main): <https://commits.webkit.org/243416@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 441820 [details].