diff --git a/runtime/interpreter/ecma-interpreter-inl.h b/runtime/interpreter/ecma-interpreter-inl.h index 1329a5a44a9e4a039857e0feb031881d175a9bf8..3610678d176ba08160ba2fb6698466ad8523e667 100644 --- a/runtime/interpreter/ecma-interpreter-inl.h +++ b/runtime/interpreter/ecma-interpreter-inl.h @@ -414,7 +414,10 @@ public: UPDATE_CALL_PROFILE(this_func); JSHandle function_handle(js_thread, js_function); - method->DecrementHotnessCounter(0, nullptr, false, JSTaggedValue(function)); + method->DecrementHotnessCounter(0, nullptr, false, JSTaggedValue(function)); + if (UNLIKELY(js_thread->HasPendingException())) { + return; + } // Call stackless interpreter this->template CallInterpreterStackless, FORMAT, @@ -505,7 +508,10 @@ public: return; } } else { - method->DecrementHotnessCounter(0, nullptr, false, ctor); + method->DecrementHotnessCounter(0, nullptr, false, ctor); + if (UNLIKELY(thread->HasPendingException())) { + return; + } // Call stackless interpreter this->template CallInterpreterStackless, FORMAT,