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.

Is the current Realm well-defined everywhere that the "implements" algorithm is used? I'm wondering if we should leave "implements" alone and define a separate algorithm that's invoked from operations, which does what you have written here.

-- 
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#pullrequestreview-231278930

Received on Friday, 26 April 2019 17:40:44 UTC