Skip to content

Commit a973f73

Browse files
GeorgNeisCommit bot
authored andcommitted
Expect JSReceiver in Runtime_DeleteLookupSlot, not just JSObject.
BUG=chromium:583260 LOG=n Review URL: https://codereview.chromium.org/1664683002 Cr-Commit-Position: refs/heads/master@{#33697}
1 parent 86dd673 commit a973f73

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

src/runtime/runtime-scopes.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -979,10 +979,10 @@ RUNTIME_FUNCTION(Runtime_DeleteLookupSlot) {
979979
return isolate->heap()->false_value();
980980
}
981981

982-
// The slot was found in a JSObject, either a context extension object,
982+
// The slot was found in a JSReceiver, either a context extension object,
983983
// the global object, or the subject of a with. Try to delete it
984984
// (respecting DONT_DELETE).
985-
Handle<JSObject> object = Handle<JSObject>::cast(holder);
985+
Handle<JSReceiver> object = Handle<JSReceiver>::cast(holder);
986986
Maybe<bool> result = JSReceiver::DeleteProperty(object, name);
987987
MAYBE_RETURN(result, isolate->heap()->exception());
988988
return isolate->heap()->ToBoolean(result.FromJust());

test/mjsunit/mjsunit.status

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,7 @@
760760
'regress/regress-1528': [FAIL],
761761
'regress/regress-2594': [FAIL],
762762
'regress/regress-410030': [FAIL],
763+
'regress/regress-583260': [FAIL],
763764
'regress/regress-96523': [FAIL],
764765
'regress/regress-crbug-505907': [FAIL],
765766
'regress/regress-crbug-506956': [FAIL],
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright 2016 the V8 project authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
__v_1 = {
6+
has() { return true }
7+
};
8+
__v_2 = new Proxy({}, __v_1);
9+
function __f_5(object) {
10+
with (object) { return delete __v_3; }
11+
}
12+
__f_5(__v_2)

0 commit comments

Comments
 (0)