Fix a DCHECK failure on an exception message
A DCHECK in LookupIterator::name hits when we add a indexed property, as it requires a named property. This replaces it with GetName to avoid the failure. Bug: chromium:959727 Change-Id: I1e98b313ec9257db80460a34d691016acbceb3c9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1597372 Commit-Queue: Taiju Tsuiki <tzik@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#61358}
This commit is contained in:
parent
c2f746881c
commit
621c5c625a
@ -2571,7 +2571,7 @@ Maybe<bool> Object::SetProperty(LookupIterator* it, Handle<Object> value,
|
|||||||
(GetShouldThrow(it->isolate(), should_throw) ==
|
(GetShouldThrow(it->isolate(), should_throw) ==
|
||||||
ShouldThrow::kThrowOnError)) {
|
ShouldThrow::kThrowOnError)) {
|
||||||
it->isolate()->Throw(*it->isolate()->factory()->NewReferenceError(
|
it->isolate()->Throw(*it->isolate()->factory()->NewReferenceError(
|
||||||
MessageTemplate::kNotDefined, it->name()));
|
MessageTemplate::kNotDefined, it->GetName()));
|
||||||
return Nothing<bool>();
|
return Nothing<bool>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
11
test/mjsunit/regress/regress-crbug-959727.js
Normal file
11
test/mjsunit/regress/regress-crbug-959727.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright 2019 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.
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
let r = Realm.createAllowCrossRealmAccess();
|
||||||
|
Realm.detachGlobal(r);
|
||||||
|
try {
|
||||||
|
Realm.global(r)[1] = 0;
|
||||||
|
} catch (e) {
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user