Skip to content

Commit 0b6dc52

Browse files
committed
Fix NoJIT build
1 parent 68e1e9d commit 0b6dc52

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

lib/Runtime/Language/InterpreterStackFrame.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6727,10 +6727,12 @@ namespace Js
67276727
// Finally exited with LeaveNull, We don't throw for early returns
67286728
if (finallyEndOffset == 0 && exceptionObj)
67296729
{
6730+
#if ENABLE_NATIVE_CODEGEN
67306731
if (scriptContext->GetThreadContext()->GetTryHandlerAddrOfReturnAddr() != nullptr)
67316732
{
67326733
JavascriptExceptionOperators::WalkStackForCleaningUpInlineeInfo(scriptContext, nullptr, scriptContext->GetThreadContext()->GetTryHandlerAddrOfReturnAddr());
67336734
}
6735+
#endif
67346736
JavascriptExceptionOperators::DoThrow(const_cast<Js::JavascriptExceptionObject *>(exceptionObj), scriptContext);
67356737
}
67366738
if (finallyEndOffset != 0)

lib/Runtime/Language/JavascriptExceptionOperators.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,12 @@ namespace Js
265265
{
266266
// Clone static exception object early in case finally block overwrites it
267267
exception = exception->CloneIfStaticExceptionObject(scriptContext);
268-
268+
#if ENABLE_NATIVE_CODEGEN
269269
if (exception->GetExceptionContext() && exception->GetExceptionContext()->ThrowingFunction())
270270
{
271271
WalkStackForCleaningUpInlineeInfo(scriptContext, nullptr /* start stackwalk from the current frame */, tryHandlerAddrOfReturnAddr);
272272
}
273+
#endif
273274
}
274275

275276
finallyContinuation = amd64_CallWithFakeFrame(finallyAddr, frame, spillSize, argsSize);
@@ -280,10 +281,12 @@ namespace Js
280281

281282
if (exception)
282283
{
284+
#if ENABLE_NATIVE_CODEGEN
283285
if (scriptContext->GetThreadContext()->GetTryHandlerAddrOfReturnAddr() != nullptr)
284286
{
285287
WalkStackForCleaningUpInlineeInfo(scriptContext, nullptr, scriptContext->GetThreadContext()->GetTryHandlerAddrOfReturnAddr());
286288
}
289+
#endif
287290
JavascriptExceptionOperators::DoThrow(exception, scriptContext);
288291
}
289292

@@ -401,12 +404,12 @@ namespace Js
401404
{
402405
// Clone static exception object early in case finally block overwrites it
403406
exception = exception->CloneIfStaticExceptionObject(scriptContext);
404-
407+
#if ENABLE_NATIVE_CODEGEN
405408
if (exception->GetExceptionContext() && exception->GetExceptionContext()->ThrowingFunction())
406409
{
407410
WalkStackForCleaningUpInlineeInfo(scriptContext, nullptr /* start stackwalk from the current frame */, tryHandlerAddrOfReturnAddr);
408411
}
409-
412+
#endif
410413
bool hasBailedOut = *(bool*)((char*)localsPtr + hasBailedOutOffset); // stack offsets are sp relative
411414
if (hasBailedOut)
412415
{
@@ -467,10 +470,12 @@ namespace Js
467470
// Clone static exception object early in case finally block overwrites it
468471
exception = exception->CloneIfStaticExceptionObject(scriptContext);
469472

473+
#if ENABLE_NATIVE_CODEGEN
470474
if (exception->GetExceptionContext() && exception->GetExceptionContext()->ThrowingFunction())
471475
{
472476
WalkStackForCleaningUpInlineeInfo(scriptContext, nullptr /* start stackwalk from the current frame */, tryHandlerAddrOfReturnAddr);
473477
}
478+
#endif
474479
}
475480

476481
#if defined(_M_ARM)
@@ -486,10 +491,12 @@ namespace Js
486491

487492
if (exception)
488493
{
494+
#if ENABLE_NATIVE_CODEGEN
489495
if (scriptContext->GetThreadContext()->GetTryHandlerAddrOfReturnAddr() != nullptr)
490496
{
491497
WalkStackForCleaningUpInlineeInfo(scriptContext, nullptr, scriptContext->GetThreadContext()->GetTryHandlerAddrOfReturnAddr());
492498
}
499+
#endif
493500
JavascriptExceptionOperators::DoThrow(exception, scriptContext);
494501
}
495502

@@ -976,10 +983,12 @@ namespace Js
976983

977984
if (pExceptionObject)
978985
{
986+
#if ENABLE_NATIVE_CODEGEN
979987
if (scriptContext->GetThreadContext()->GetTryHandlerAddrOfReturnAddr() != nullptr)
980988
{
981989
WalkStackForCleaningUpInlineeInfo(scriptContext, nullptr, scriptContext->GetThreadContext()->GetTryHandlerAddrOfReturnAddr());
982990
}
991+
#endif
983992
JavascriptExceptionOperators::DoThrow(pExceptionObject, scriptContext);
984993
}
985994

0 commit comments

Comments
 (0)