Remove obsolete DCHECK in TrySetOsrUrgency

Originally this was a condition (not a DCHECK) guarding against OSRing
into self-hosted JS builtins, which no longer exist since 2016. After
various refactors, our assumption was that this could no longer
happen, and we changed the condition into a DCHECK.

However it appears that we still have non-user-JS functions that can
reach TrySetOsrUrgency as part of extensions, e.g.
--expose-externalize-string; but I can't think of a reason not to OSR
these.

Let's try removing the DCHECK.

Bug: chromium:1410985
Change-Id: I2698eac4cecbf5aa33775c0217c2f69a3c96323a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4205909
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85554}
This commit is contained in:
Jakob Linke 2023-01-31 07:22:35 +01:00 committed by V8 LUCI CQ
parent 041fd99875
commit fcce324c4e

View File

@ -230,9 +230,6 @@ bool SmallEnoughForOSR(Isolate* isolate, JSFunction function,
void TrySetOsrUrgency(Isolate* isolate, JSFunction function, int osr_urgency) { void TrySetOsrUrgency(Isolate* isolate, JSFunction function, int osr_urgency) {
SharedFunctionInfo shared = function.shared(); SharedFunctionInfo shared = function.shared();
// Guaranteed since we've got a feedback vector.
DCHECK(shared.IsUserJavaScript());
if (V8_UNLIKELY(!v8_flags.use_osr)) return; if (V8_UNLIKELY(!v8_flags.use_osr)) return;
if (V8_UNLIKELY(shared.optimization_disabled())) return; if (V8_UNLIKELY(shared.optimization_disabled())) return;