Skip to content
Merged
39 changes: 38 additions & 1 deletion spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ contributors: Matthew Gaudet, Justin Ridgewell
<emu-alg>
1. <ins>If _o_ is *null*, return *false*.</ins>
Comment thread
mgaudet marked this conversation as resolved.
Outdated
1. <ins>If _o_ has a [[ProxyHandler]] internal slot, return *true*.</ins>
1. <ins>If _o_ uses different steps than the ordinary object steps for [[GetPrototypeOf]] or [[GetOwnProperty]], return *true*.</ins>
1. <ins>If HostObjectHasImpureLookupInternalMethods(_o_) returns *true*, return *true*.</ins>
Comment thread
mgaudet marked this conversation as resolved.
Outdated
1. <ins>if _o_ is a Module Namespace Object, return *true*.</ins>
Comment thread
mgaudet marked this conversation as resolved.
Outdated
1. <ins>Let _desc_ be _o_.[[GetOwnProperty]](_propertyKey_).</ins>
Comment thread
mgaudet marked this conversation as resolved.
Outdated
1. <ins>If _desc_ is not *undefined*, then</ins>
1. <ins>If _desc_ has a [[Get]] field and kind is ~any~ or ~get~, return *true*.</ins>
Expand Down Expand Up @@ -226,3 +227,39 @@ contributors: Matthew Gaudet, Justin Ridgewell
</emu-clause>
</emu-clause>
</emu-clause>

<emu-clause id="sec-hosthasinternalmethodswhichcanrunusercode" type="host-defined abstract operation">
<h1>
HostObjectHasImpureLookupInternalMethods (
_object_: A job
Comment thread
mgaudet marked this conversation as resolved.
Outdated
): a boolean
Comment thread
mgaudet marked this conversation as resolved.
Outdated
</h1>
<dl class="header">
<dt>description</dt>
<dd>Indicates if a host object overrides the methods [[GetOwnProperty]] or [[GetPrototypeOf]] in such a way that user code could run.</dd>
</dl>

<p>An implementation of HostObjectHasImpureLookupInternalMethods should return *true* if the given object is a host defined object with its own definition of [[GetOwnProperty]] or [[GetPrototypeOf]] such that
user code could run</p>
Comment thread
mgaudet marked this conversation as resolved.
Outdated
Comment thread
mgaudet marked this conversation as resolved.
Outdated
</emu-clause>

<emu-annex id="sec-host-hooks-summary">
<h1>Host Hooks</h1>
<p><b>HostCallJobCallback(...)</b></p>
<p><b>HostEnqueueFinalizationRegistryCleanupJob(...)</b></p>
<p><b>HostEnqueueGenericJob(...)</b></p>
<p><b>HostEnqueuePromiseJob(...)</b></p>
<p><b>HostEnqueueTimeoutJob(...)</b></p>
<p><b>HostEnsureCanCompileStrings(...)</b></p>
<p><b>HostFinalizeImportMeta(...)</b></p>
<p><b>HostGetImportMetaProperties(...)</b></p>
<p><b>HostGrowSharedArrayBuffer(...)</b></p>
<p><b>HostHasSourceTextAvailable(...)</b></p>
<p><b>HostLoadImportedModule(...)</b></p>
<p><b>HostGetSupportedImportAttributes(...)</b></p>
<p><b>HostMakeJobCallback(...)</b></p>
<p><b>HostPromiseRejectionTracker(...)</b></p>
<p><b>HostResizeArrayBuffer(...)</b></p>
<p><b>InitializeHostDefinedRealm(...)</b></p>
<ins><p><b>HostObjectHasImpureLookupInternalMethods(...)</b></p></ins>
</emu-annex>
Loading