Skip to content

Commit

Permalink
Bug 1466255. Allow interfaces only exposed to chrome-or-XBL to be in …
Browse files Browse the repository at this point in the history
…chrome-webidl. r=kmag
  • Loading branch information
bzbarsky committed Jun 9, 2018
1 parent 8dfa5a5 commit 4a41216
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dom/bindings/Configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,15 @@ def isInWebIDLRoot(path):
"%s" %
(partialIface.location, iface.location))
if not (iface.getExtendedAttribute("ChromeOnly") or
iface.getExtendedAttribute("Func") == ["IsChromeOrXBL"] or
not (iface.hasInterfaceObject() or
iface.isNavigatorProperty()) or
isInWebIDLRoot(iface.filename())):
raise TypeError(
"Interfaces which are exposed to the web may only be "
"defined in a DOM WebIDL root %r. Consider marking "
"the interface [ChromeOnly] if you do not want it "
"exposed to the web.\n"
"the interface [ChromeOnly] or [Func='IsChromeOrXBL'] "
"if you do not want it exposed to the web.\n"
"%s" %
(webRoots, iface.location))
self.interfaces[iface.identifier.name] = iface
Expand Down

0 comments on commit 4a41216

Please sign in to comment.