Skip to content

Commit

Permalink
Cherry-pick 272448.339@safari-7618-branch (66df5c6). https://bugs.web…
Browse files Browse the repository at this point in the history
…kit.org/show_bug.cgi?id=267946

    ASSERTION FAILED: watchpoints (./runtime/ScopedArgumentsTable.cpp(130))
    rdar://121446658
    https://bugs.webkit.org/show_bug.cgi?id=267946

    Reviewed by Alexey Shvayka.

    Insatead of using an ASSERT that we have a valid WatchpointSet in ScopedArgumentsTable::trySetWatchpointSet(), we can just
    exit early if the passed in WatchpointSet is null.  This can happen if the JIT is not enabled.

    Updated the test to run both with and wothout the JIT.

    * JSTests/stress/arrow-function-captured-arguments-aliased.js:
    * Source/JavaScriptCore/runtime/ScopedArgumentsTable.cpp:
    (JSC::ScopedArgumentsTable::trySetWatchpointSet):

    Canonical link: https://commits.webkit.org/272448.339@safari-7618-branch

Canonical link: https://commits.webkit.org/266719.402@webkitglib/2.42
  • Loading branch information
msaboff authored and aperezdc committed Mar 14, 2024
1 parent a9402df commit 43cc61f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions JSTests/stress/arrow-function-captured-arguments-aliased.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//@ runDefault
//@ runNoJIT

function createOptAll(count) {
count = 0;

Expand Down
4 changes: 3 additions & 1 deletion Source/JavaScriptCore/runtime/ScopedArgumentsTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ ScopedArgumentsTable* ScopedArgumentsTable::trySet(VM& vm, uint32_t i, ScopeOffs

void ScopedArgumentsTable::trySetWatchpointSet(uint32_t i, WatchpointSet* watchpoints)
{
ASSERT(watchpoints);
if (!watchpoints)
return;

if (i >= m_watchpointSets.size())
return;

Expand Down

0 comments on commit 43cc61f

Please sign in to comment.