[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:
parent
72bea1abd3
commit
ab7435a244
@ -366,7 +366,7 @@ base::Optional<Map> MapUpdater::TryUpdateNoLock(Isolate* isolate, Map old_map,
|
|||||||
info = DetectIntegrityLevelTransitions(old_map, isolate, &no_gc, cmode);
|
info = DetectIntegrityLevelTransitions(old_map, isolate, &no_gc, cmode);
|
||||||
// Bail out if there were some private symbol transitions mixed up
|
// Bail out if there were some private symbol transitions mixed up
|
||||||
// with the integrity level transitions.
|
// 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
|
// Make sure to replay the original elements kind transitions, before
|
||||||
// the integrity level transition sets the elements to dictionary mode.
|
// the integrity level transition sets the elements to dictionary mode.
|
||||||
DCHECK(to_kind == DICTIONARY_ELEMENTS ||
|
DCHECK(to_kind == DICTIONARY_ELEMENTS ||
|
||||||
|
Loading…
Reference in New Issue
Block a user