main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
594 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | var callBound = require('call-bound');
|
---|
4 | var SLOT = require('internal-slot');
|
---|
5 |
|
---|
6 | var $TypeError = require('es-errors/type');
|
---|
7 |
|
---|
8 | var ClearKeptObjects = require('./ClearKeptObjects');
|
---|
9 |
|
---|
10 | var isObject = require('../helpers/isObject');
|
---|
11 |
|
---|
12 | var $push = callBound('Array.prototype.push');
|
---|
13 |
|
---|
14 | // https://262.ecma-international.org/12.0/#sec-addtokeptobjects
|
---|
15 |
|
---|
16 | module.exports = function AddToKeptObjects(object) {
|
---|
17 | if (!isObject(object)) {
|
---|
18 | throw new $TypeError('Assertion failed: `object` must be an Object');
|
---|
19 | }
|
---|
20 | $push(SLOT.get(ClearKeptObjects, '[[es-abstract internal: KeptAlive]]'), object);
|
---|
21 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.