Re: [heycam/webidl] Introduce a SameRealmBrandCheck extended attribute (#718)

littledan commented on this pull request.



> @@ -12284,9 +12310,15 @@ The value of the [=function object=]’s <code class="idl">name</code> property
 </div>
 
 <div algorithm>
-    An ECMAScript value |value| <dfn export>implements</dfn> an [=interface=] |interface|
-    if |value| [=is a platform object=] and the [=inclusive inherited interfaces=] of
-    |value|.\[[PrimaryInterface]] [=list/contains=] |interface|.
+    An ECMAScript value |value| <dfn export>implements</dfn> an [=interface=] |interface| if the
+    following steps return true:
+
+    1.  If |value| [=is a platform object|is not a platform object=], return false.
+    1.  If the [=inclusive inherited interfaces=] of |value|.\[[PrimaryInterface]] does not
+        [=list/contain=] |interface|, return false.
+    1.  If |interface| has a [{{SameRealmBrandCheck}}] [=extended attribute=] and
+        |value|.\[[Realm]] is not the [=current Realm=], return false.

I think separating out a separate "brand check" algorithm from the "implements" one, where the implements algorithm would remain unchanged, is the main thing needed here (besides multi-implementation buy-in) before this PR can land.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/718#discussion_r286344567

Received on Wednesday, 22 May 2019 07:21:35 UTC