Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index 927386289ac392254281077665c980768294f946..bc2e4458ab159765454ed35c385a9eb33ed15b80 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -9524,7 +9524,8 @@ RUNTIME_FUNCTION(RuntimeHidden_StackGuard) { |
ASSERT(args.length() == 0); |
// First check if this is a real stack overflow. |
- if (isolate->stack_guard()->IsStackOverflow()) { |
+ StackLimitCheck check(isolate); |
+ if (check.JsHasOverflowed()) { |
return isolate->StackOverflow(); |
} |
@@ -9538,7 +9539,8 @@ RUNTIME_FUNCTION(RuntimeHidden_TryInstallOptimizedCode) { |
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); |
// First check if this is a real stack overflow. |
- if (isolate->stack_guard()->IsStackOverflow()) { |
+ StackLimitCheck check(isolate); |
+ if (check.JsHasOverflowed()) { |
SealHandleScope shs(isolate); |
return isolate->StackOverflow(); |
} |