@@ -265,11 +265,12 @@ namespace Js
265
265
{
266
266
// Clone static exception object early in case finally block overwrites it
267
267
exception = exception->CloneIfStaticExceptionObject (scriptContext);
268
-
268
+ # if ENABLE_NATIVE_CODEGEN
269
269
if (exception->GetExceptionContext () && exception->GetExceptionContext ()->ThrowingFunction ())
270
270
{
271
271
WalkStackForCleaningUpInlineeInfo (scriptContext, nullptr /* start stackwalk from the current frame */ , tryHandlerAddrOfReturnAddr);
272
272
}
273
+ #endif
273
274
}
274
275
275
276
finallyContinuation = amd64_CallWithFakeFrame (finallyAddr, frame, spillSize, argsSize);
@@ -280,10 +281,12 @@ namespace Js
280
281
281
282
if (exception)
282
283
{
284
+ #if ENABLE_NATIVE_CODEGEN
283
285
if (scriptContext->GetThreadContext ()->GetTryHandlerAddrOfReturnAddr () != nullptr )
284
286
{
285
287
WalkStackForCleaningUpInlineeInfo (scriptContext, nullptr , scriptContext->GetThreadContext ()->GetTryHandlerAddrOfReturnAddr ());
286
288
}
289
+ #endif
287
290
JavascriptExceptionOperators::DoThrow (exception, scriptContext);
288
291
}
289
292
@@ -401,12 +404,12 @@ namespace Js
401
404
{
402
405
// Clone static exception object early in case finally block overwrites it
403
406
exception = exception->CloneIfStaticExceptionObject (scriptContext);
404
-
407
+ # if ENABLE_NATIVE_CODEGEN
405
408
if (exception->GetExceptionContext () && exception->GetExceptionContext ()->ThrowingFunction ())
406
409
{
407
410
WalkStackForCleaningUpInlineeInfo (scriptContext, nullptr /* start stackwalk from the current frame */ , tryHandlerAddrOfReturnAddr);
408
411
}
409
-
412
+ # endif
410
413
bool hasBailedOut = *(bool *)((char *)localsPtr + hasBailedOutOffset); // stack offsets are sp relative
411
414
if (hasBailedOut)
412
415
{
@@ -467,10 +470,12 @@ namespace Js
467
470
// Clone static exception object early in case finally block overwrites it
468
471
exception = exception->CloneIfStaticExceptionObject (scriptContext);
469
472
473
+ #if ENABLE_NATIVE_CODEGEN
470
474
if (exception->GetExceptionContext () && exception->GetExceptionContext ()->ThrowingFunction ())
471
475
{
472
476
WalkStackForCleaningUpInlineeInfo (scriptContext, nullptr /* start stackwalk from the current frame */ , tryHandlerAddrOfReturnAddr);
473
477
}
478
+ #endif
474
479
}
475
480
476
481
#if defined(_M_ARM)
@@ -486,10 +491,12 @@ namespace Js
486
491
487
492
if (exception)
488
493
{
494
+ #if ENABLE_NATIVE_CODEGEN
489
495
if (scriptContext->GetThreadContext ()->GetTryHandlerAddrOfReturnAddr () != nullptr )
490
496
{
491
497
WalkStackForCleaningUpInlineeInfo (scriptContext, nullptr , scriptContext->GetThreadContext ()->GetTryHandlerAddrOfReturnAddr ());
492
498
}
499
+ #endif
493
500
JavascriptExceptionOperators::DoThrow (exception, scriptContext);
494
501
}
495
502
@@ -976,10 +983,12 @@ namespace Js
976
983
977
984
if (pExceptionObject)
978
985
{
986
+ #if ENABLE_NATIVE_CODEGEN
979
987
if (scriptContext->GetThreadContext ()->GetTryHandlerAddrOfReturnAddr () != nullptr )
980
988
{
981
989
WalkStackForCleaningUpInlineeInfo (scriptContext, nullptr , scriptContext->GetThreadContext ()->GetTryHandlerAddrOfReturnAddr ());
982
990
}
991
+ #endif
983
992
JavascriptExceptionOperators::DoThrow (pExceptionObject, scriptContext);
984
993
}
985
994
0 commit comments