Skip to content

Commit

Permalink
Fix assertion failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Oct 14, 2024
1 parent 4bfe752 commit 12e2f46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/JavaScriptCore/runtime/ErrorInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,12 @@ bool ErrorInstance::materializeErrorInfoIfNeeded(VM& vm)
{
if (m_errorInfoMaterialized)
return false;
m_errorInfoMaterialized = true;

#if USE(BUN_JSC_ADDITIONS)

auto& fn = vm.onComputeErrorInfoJSValue();
if (fn && m_stackTrace && !m_stackTrace->isEmpty()) {
m_errorInfoMaterialized = true;
DeferGCForAWhile deferGC(vm);

JSValue stack = fn(vm, *m_stackTrace.get(), m_lineColumn.line, m_lineColumn.column, m_sourceURL, this);
Expand Down Expand Up @@ -375,6 +375,7 @@ bool ErrorInstance::materializeErrorInfoIfNeeded(VM& vm)
putDirect(vm, vm.propertyNames->sourceURL, jsString(vm, WTFMove(m_sourceURL)), attributes);

putDirect(vm, vm.propertyNames->stack, jsString(vm, WTFMove(m_stackString)), attributes);
m_errorInfoMaterialized = true;
}

return true;
Expand Down

0 comments on commit 12e2f46

Please sign in to comment.