nl_tokens: 25 . 4 . 1 . 5 . 1 CreatePromiseCapabilityRecord ( promise constructor )
pl_tokens: function CreatePromiseCapabilityRecord ( promise , constructor ) { var promiseCapability = { } , executor , constructorResult ; defineInternal ( promiseCapability , '[[Promise]]' , promise ) ; defineInternal ( promiseCapability , '[[Resolve]]' , undefined ) ; defineInternal ( promiseCapability , '[[Reject]]' , undefined ) ; executor = <mask> GetCapabilitiesExecutor ( ) ; defineInternal ( executor , '[[Capability]]' , promiseCapability ) ; try { constructorResult = constructor . call ( promise , executor ) ; } catch ( e ) { return e ; } if ( ! IsCallable ( promiseCapability [ '[[Resolve]]' ] ) ) { throw TypeError ( ) ; } if ( ! IsCallable ( promiseCapability [ '[[Reject]]' ] ) ) { throw TypeError ( ) ; } if ( typeof constructorResult === 'object' && ! SameValue ( promise , constructorResult ) ) { throw TypeError ( ) ; } return promiseCapability ; }