Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(666)

Unified Diff: test/mjsunit/array-indexing-receiver.js

Issue 2332503002: [elements] Handlify SloppyArguments IndexOfValueImpl (Closed)
Patch Set: adding elements.cc again Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/mjsunit/array-indexing-receiver.js
diff --git a/test/mjsunit/array-indexing-receiver.js b/test/mjsunit/array-indexing-receiver.js
index d5f5a7692d949392fbfc77e867d007ca11b6749d..5d1dbf3e56f1a23ef96b42c0d950be2acb4e4b42 100644
--- a/test/mjsunit/array-indexing-receiver.js
+++ b/test/mjsunit/array-indexing-receiver.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax
+// Flags: --allow-natives-syntax --expose-gc
// Ensure `Array.prototype.indexOf` functions correctly for numerous elements
// kinds, and various exotic receiver types,
@@ -107,7 +107,7 @@ var kTests = {
DICTIONARY_ELEMENTS() {
var array = [];
- Object.defineProperty(array, 4, { get() { return NaN; } });
+ Object.defineProperty(array, 4, { get() { gc(); return NaN; } });
caitp 2016/09/10 02:48:37 Adding `gc` all over the place seems like it could
Camillo Bruni 2016/09/14 16:48:54 the --gc-interval trick only works if there is an
Object.defineProperty(array, 7, { value: Function });
assertTrue(%HasDictionaryElements(array));
@@ -226,7 +226,7 @@ var kTests = {
DICTIONARY_ELEMENTS() {
var object = { length: 8 };
- Object.defineProperty(object, 4, { get() { return NaN; } });
+ Object.defineProperty(object, 4, { get() { gc(); return NaN; } });
Object.defineProperty(object, 7, { value: Function });
assertTrue(%HasDictionaryElements(object));
@@ -244,8 +244,10 @@ var kTests = {
return {
__proto__: {},
get 0() {
+ gc();
this.__proto__.__proto__ = {
get 1() {
+ gc();
this[2] = "c";
return "b";
}
@@ -313,7 +315,7 @@ var kTests = {
SLOW_SLOPPY_ARGUMENTS_ELEMENTS() {
var args = (function(a, a) { return arguments; })("foo", NaN, "bar");
- Object.defineProperty(args, 3, { get() { return "silver"; } });
+ Object.defineProperty(args, 3, { get() { gc(); return "silver"; } });
Object.defineProperty(args, "length", { value: 4 });
assertTrue(%HasSloppyArgumentsElements(args));
« src/elements.cc ('K') | « src/elements.cc ('k') | test/mjsunit/regress/regress-645680.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698