@@ -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