diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-01-30 21:21:53 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-01-30 21:21:53 +0530 |
commit | 0ada7f9c8eda9879b5536cea3266c94214f9ce9b (patch) | |
tree | f2fbc9ee19d6dbc814fc04db5448d333e7bc44fc /components/script/dom/bindings/codegen/parser/WebIDL.py | |
parent | 31657811d33f23c79eae49dea171718562b031c5 (diff) | |
parent | 83a492a533aecdb122052a9cacd735779ab9dfdd (diff) | |
download | servo-0ada7f9c8eda9879b5536cea3266c94214f9ce9b.tar.gz servo-0ada7f9c8eda9879b5536cea3266c94214f9ce9b.zip |
Auto merge of #9459 - shinglyu:testwebidl, r=Wafflespeanut
Add mach test-webidl command
I updated the `WebIDL.py` from latest mozilla-central. And add a `./mach test-webidl` command. For #9397
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9459)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/codegen/parser/WebIDL.py')
-rw-r--r-- | components/script/dom/bindings/codegen/parser/WebIDL.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/components/script/dom/bindings/codegen/parser/WebIDL.py b/components/script/dom/bindings/codegen/parser/WebIDL.py index 8bf415c269b..273824fb1b0 100644 --- a/components/script/dom/bindings/codegen/parser/WebIDL.py +++ b/components/script/dom/bindings/codegen/parser/WebIDL.py @@ -501,6 +501,10 @@ class IDLExposureMixins(): def isExposedInWindow(self): return 'Window' in self.exposureSet + def isExposedOnMainThread(self): + return (self.isExposedInWindow() or + self.isExposedInSystemGlobals()) + def isExposedInAnyWorker(self): return len(self.getWorkerExposureSet()) > 0 @@ -564,6 +568,9 @@ class IDLExternalInterface(IDLObjectWithIdentifier, IDLExposureMixins): def isJSImplemented(self): return False + def isProbablyShortLivingObject(self): + return False + def getNavigatorProperty(self): return None @@ -1409,6 +1416,7 @@ class IDLInterface(IDLObjectWithScope, IDLExposureMixins): identifier == "Unforgeable" or identifier == "UnsafeInPrerendering" or identifier == "LegacyEventInit" or + identifier == "ProbablyShortLivingObject" or identifier == "Abstract"): # Known extended attributes that do not take values if not attr.noArguments(): @@ -1523,6 +1531,14 @@ class IDLInterface(IDLObjectWithScope, IDLExposureMixins): def isJSImplemented(self): return bool(self.getJSImplementation()) + def isProbablyShortLivingObject(self): + current = self + while current: + if current.getExtendedAttribute("ProbablyShortLivingObject"): + return True + current = current.parent + return False + def getNavigatorProperty(self): naviProp = self.getExtendedAttribute("NavigatorProperty") if not naviProp: |