[test262] Expose gc() to test262 harness

test262 tests use this to trigger a gc and test WeakRefs

Bug: v8:8179
Change-Id: I84ca88f0bf11734ea65d7f6c2a5e5e2d13dccb7d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1714871
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62874}
This commit is contained in:
Sathya Gunasekaran 2019-07-23 14:36:57 +01:00 committed by Commit Bot
parent 26dad80ff5
commit c0943a50ad
3 changed files with 16 additions and 17 deletions

View File

@ -98,7 +98,10 @@ function RealmOperators(realm) {
createRealm() {
return RealmOperators(Realm.createAllowCrossRealmAccess());
},
global: Realm.eval(realm, 'this')
global: Realm.eval(realm, 'this'),
gc() {
v8GC();
}
};
$262.global.$262 = $262;
return $262;

View File

@ -535,29 +535,24 @@
'language/statements/class/elements/syntax/early-errors/grammar-private-environment-on-class-heritage-recursive': [FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=8179
'built-ins/FinalizationGroup/gc-has-one-chance-to-call-cleanupCallback': [FAIL],
'built-ins/FinalizationGroup/prototype/register/return-undefined-register-itself': [FAIL],
'built-ins/FinalizationGroup/FinalizationGroupCleanupIteratorPrototype/next-job-not-active-throws': [FAIL],
'built-ins/FinalizationGroup/FinalizationGroupCleanupIteratorPrototype/next-length': [FAIL],
'built-ins/FinalizationGroup/FinalizationGroupCleanupIteratorPrototype/next-missing-internal-throws': [FAIL],
'built-ins/FinalizationGroup/FinalizationGroupCleanupIteratorPrototype/next-name': [FAIL],
'built-ins/FinalizationGroup/FinalizationGroupCleanupIteratorPrototype/next-not-object-throws': [FAIL],
'built-ins/FinalizationGroup/FinalizationGroupCleanupIteratorPrototype/next-prop-desc': [FAIL],
'built-ins/FinalizationGroup/FinalizationGroupCleanupIteratorPrototype/proto': [FAIL],
'built-ins/FinalizationGroup/FinalizationGroupCleanupIteratorPrototype/Symbol.toStringTag': [FAIL],
'built-ins/FinalizationGroup/prototype/cleanupSome/callback-iterator-proto': [FAIL],
'built-ins/FinalizationGroup/prototype/cleanupSome/cleanupcallback-iterator-proto': [FAIL],
'built-ins/FinalizationGroup/prototype/cleanupSome/cleanup-prevented-with-reference': [FAIL],
'built-ins/FinalizationGroup/prototype/cleanupSome/cleanup-prevented-with-unregister': [FAIL],
'built-ins/FinalizationGroup/prototype/cleanupSome/gc-cleanup-not-prevented-with-wr-deref': [FAIL],
'built-ins/FinalizationGroup/prototype/cleanupSome/iterator-dynamic': [FAIL],
'built-ins/FinalizationGroup/prototype/cleanupSome/iterator-holdings-multiple-values': [FAIL],
'built-ins/FinalizationGroup/prototype/cleanupSome/poisoned-callback-throws': [FAIL],
'built-ins/FinalizationGroup/prototype/cleanupSome/poisoned-cleanup-callback-throws': [FAIL],
'built-ins/FinalizationGroup/prototype/cleanupSome/return-undefined-with-gc': [FAIL],
'built-ins/FinalizationGroup/prototype/register/holdings-same-as-target': [FAIL],
'built-ins/FinalizationGroup/prototype/register/unregisterToken-same-as-holdings-and-target': [FAIL],
'built-ins/FinalizationGroup/prototype/cleanupSome/cleanup-prevented-with-reference': [FAIL],
'built-ins/FinalizationGroup/prototype/register/return-undefined-register-itself': [FAIL],
# https://github.com/tc39/test262/issues/2256
'built-ins/FinalizationGroup/prototype/cleanupSome/cleanup-prevented-with-unregister': [FAIL],
# https://github.com/tc39/test262/issues/2239
'built-ins/WeakRef/prototype/deref/gc-cleanup-not-prevented-with-wr-deref': [FAIL],
'built-ins/FinalizationGroup/prototype/cleanupSome/gc-cleanup-not-prevented-with-wr-deref': [FAIL],
# https://github.com/tc39/test262/issues/2255
'built-ins/FinalizationGroup/prototype/cleanupSome/iterator-holdings-multiple-values': [FAIL],
######################## NEEDS INVESTIGATION ###########################

View File

@ -58,6 +58,7 @@ FEATURE_FLAGS = {
'Promise.allSettled': '--harmony-promise-all-settled',
'FinalizationGroup': '--harmony-weak-refs',
'WeakRef': '--harmony-weak-refs',
'host-gc-required': '--expose-gc-as=v8GC',
}
SKIPPED_FEATURES = set(['class-methods-private',