diff --git a/common.gypi b/common.gypi index 350b54ad9d54cd..23196aae451f6a 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.10', + 'v8_embedder_string': '-node.11', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/codegen/compiler.cc b/deps/v8/src/codegen/compiler.cc index a6407a56aa8d6d..ce82b744f327d5 100644 --- a/deps/v8/src/codegen/compiler.cc +++ b/deps/v8/src/codegen/compiler.cc @@ -1338,7 +1338,14 @@ MaybeHandle GetOrCompileOptimized( } // Do not optimize when debugger needs to hook into every call. - if (isolate->debug()->needs_check_on_function_call()) return {}; + if (isolate->debug()->needs_check_on_function_call()) { + // Reset the OSR urgency to avoid triggering this compilation request on + // every iteration and thereby skipping other interrupts. + if (IsOSR(osr_offset)) { + function->feedback_vector()->reset_osr_urgency(); + } + return {}; + } // Do not optimize if we need to be able to set break points. if (shared->HasBreakInfo(isolate)) return {}; diff --git a/deps/v8/test/debugger/regress/regress-374013413.js b/deps/v8/test/debugger/regress/regress-374013413.js new file mode 100644 index 00000000000000..d414dfdffa8e6d --- /dev/null +++ b/deps/v8/test/debugger/regress/regress-374013413.js @@ -0,0 +1,15 @@ +// Copyright 2024 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Flags: --enable-inspector + +var Debug = debug.Debug; +Debug.sendMessageForMethodChecked('Runtime.enable', {}); +const {msgid, msg} = Debug.createMessage('Runtime.evaluate', { + expression: 'while(true) {}', + throwOnSideEffect: true, + timeout: 1000, +}) +Debug.sendMessage(msg); +Debug.takeReplyChecked(msgid).toString();