During the integration of Test262 into Web Platform Tests (WPT) (PR), we noted that $262.gc() is expected by Test262 tests to be synchronous. However, in many modern web browsers, garbage collection is inherently asynchronous or non-blocking for performance reasons, and WPT's TestUtils.gc() is often asynchronous.
Test262 tests that rely on $262.gc() usually assume it is synchronous and that garbage collection has occurred before the next line of code executes.
Would Test262 consider allowing $262.gc() to return a Promise or provide some other completion signal for hosts where GC is asynchronous?
Or is there a recommended pattern for handling async GC in Test262 tests?
During the integration of Test262 into Web Platform Tests (WPT) (PR), we noted that $262.gc() is expected by Test262 tests to be synchronous. However, in many modern web browsers, garbage collection is inherently asynchronous or non-blocking for performance reasons, and WPT's TestUtils.gc() is often asynchronous.
Test262 tests that rely on $262.gc() usually assume it is synchronous and that garbage collection has occurred before the next line of code executes.
Would Test262 consider allowing $262.gc() to return a Promise or provide some other completion signal for hosts where GC is asynchronous?
Or is there a recommended pattern for handling async GC in Test262 tests?