main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
680 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | // https://github.com/tc39/proposal-explicit-resource-management
|
---|
3 | var call = require('../internals/function-call');
|
---|
4 | var defineBuiltIn = require('../internals/define-built-in');
|
---|
5 | var getMethod = require('../internals/get-method');
|
---|
6 | var hasOwn = require('../internals/has-own-property');
|
---|
7 | var wellKnownSymbol = require('../internals/well-known-symbol');
|
---|
8 | var IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;
|
---|
9 |
|
---|
10 | var DISPOSE = wellKnownSymbol('dispose');
|
---|
11 |
|
---|
12 | if (!hasOwn(IteratorPrototype, DISPOSE)) {
|
---|
13 | defineBuiltIn(IteratorPrototype, DISPOSE, function () {
|
---|
14 | var $return = getMethod(this, 'return');
|
---|
15 | if ($return) call($return, this);
|
---|
16 | });
|
---|
17 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.