Skip to content

Commit

Permalink
ASSERTION FAILED: watchpoints (./runtime/ScopedArgumentsTable.cpp(130))
Browse files Browse the repository at this point in the history
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):

Originally-landed-as: 272448.339@safari-7618-branch (66df5c6). rdar://124555300
Canonical link: https://commits.webkit.org/276598@main
  • Loading branch information
msaboff authored and JonWBedard committed Mar 23, 2024
1 parent 80d6b8d commit ad8d3e1
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 ad8d3e1

Please sign in to comment.