deps: V8: cherry-pick f915fa4c9f41

Original commit message:

    [osr] Ensure trying to osr does not skip loop interrupts

    Fixed: 374013413
    Change-Id: I52d7b4e165e0abd0bd517a81d2e8ef3f1f802bfb
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5946288
    Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
    Auto-Submit: Olivier Flückiger <olivf@chromium.org>
    Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#96708}

Refs: f915fa4c9f
PR-URL: https://github.com/nodejs/node/pull/55484
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Chengzhong Wu 2024-10-21 13:33:55 +01:00 committed by Node.js GitHub Bot
parent c1bbd63458
commit f630fde68b
3 changed files with 24 additions and 2 deletions

View File

@ -36,7 +36,7 @@
# Reset this number to 0 on major V8 upgrades. # Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8. # 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 ##### ##### V8 defaults for Node.js #####

View File

@ -1338,7 +1338,14 @@ MaybeHandle<Code> GetOrCompileOptimized(
} }
// Do not optimize when debugger needs to hook into every call. // 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. // Do not optimize if we need to be able to set break points.
if (shared->HasBreakInfo(isolate)) return {}; if (shared->HasBreakInfo(isolate)) return {};

View File

@ -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();