[runtime] Fix MapUpdater::TryUpdateNoLock()

Return empty optional instead of optional with empty Map on failure.

Bug: v8:7790, chromium:1323119
Change-Id: I1e6e9e2361d12d0f8d106a7929221d3116d0d547
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3650715
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80564}
This commit is contained in:
Igor Sheludko 2022-05-16 14:11:15 +02:00 committed by V8 LUCI CQ
parent 72bea1abd3
commit ab7435a244

View File

@ -366,7 +366,7 @@ base::Optional<Map> MapUpdater::TryUpdateNoLock(Isolate* isolate, Map old_map,
info = DetectIntegrityLevelTransitions(old_map, isolate, &no_gc, cmode);
// Bail out if there were some private symbol transitions mixed up
// with the integrity level transitions.
if (!info.has_integrity_level_transition) return Map();
if (!info.has_integrity_level_transition) return {};
// Make sure to replay the original elements kind transitions, before
// the integrity level transition sets the elements to dictionary mode.
DCHECK(to_kind == DICTIONARY_ELEMENTS ||