| Index: src/isolate.cc
|
| diff --git a/src/isolate.cc b/src/isolate.cc
|
| index cfb6860d978b1566005f430d7854bd224dc8e9bb..63c927b04c3a7b9392bdab3a7fdde631776faf31 100644
|
| --- a/src/isolate.cc
|
| +++ b/src/isolate.cc
|
| @@ -1735,6 +1735,9 @@ void Isolate::PopPromise() {
|
| bool Isolate::PromiseHasUserDefinedRejectHandler(Handle<Object> promise) {
|
| Handle<JSFunction> fun = promise_has_user_defined_reject_handler();
|
| Handle<Object> has_reject_handler;
|
| + // If we are, e.g., overflowing the stack, don't try to call out to JS
|
| + if (!AllowJavascriptExecution::IsAllowed(this)) return false;
|
| + // Call the registered function to check for a handler
|
| if (Execution::TryCall(this, fun, promise, 0, NULL)
|
| .ToHandle(&has_reject_handler)) {
|
| return has_reject_handler->IsTrue(this);
|
|
|