tc39 / proposal-explicit-resource-management

ECMAScript Explicit Resource Management
https://arai-a.github.io/ecma262-compare/?pr=3000
BSD 3-Clause "New" or "Revised" License
725 stars 29 forks source link

Streamline DisposableStack.prototype.use #143

Closed rbuckton closed 1 year ago

rbuckton commented 1 year ago

This simplifies DisposableStack.prototype.use to use the existing logic in AddDisposableResource handle retrieving the Symbol.dispose method. This is pretty much the same change I made in https://tc39.es/proposal-async-explicit-resource-management/#sec-disposablestack.prototype.use.

github-actions[bot] commented 1 year ago

A preview of this PR can be found at https://tc39.es/proposal-explicit-resource-management/pr/143.

rbuckton commented 1 year ago

NOTE: This is mainly editorial cleanup and does not affect the intended semantics as the spec internal comparisons to null and undefined are not observable.

rbuckton commented 1 year ago

I believe this should have no differences in observable semantics, but would appreciate a review to verify.

rbuckton commented 1 year ago

@tc39/ecma262-editors can you review this change?