mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 813623. Fix Xrays to actually work correctly for static methods and properties. r=peterv
This commit is contained in:
parent
e6f9803bf5
commit
3727b0d820
@ -1337,10 +1337,6 @@ class PropertyArrays():
|
||||
return [ "staticMethods", "staticAttrs", "methods", "attrs",
|
||||
"unforgeableAttrs", "consts" ]
|
||||
|
||||
@staticmethod
|
||||
def xrayRelevantArrayNames():
|
||||
return [ "methods", "attrs", "unforgeableAttrs", "consts" ]
|
||||
|
||||
def hasChromeOnly(self):
|
||||
return any(getattr(self, a).hasChromeOnly() for a in self.arrayNames())
|
||||
def hasNonChromeOnly(self):
|
||||
@ -1417,7 +1413,7 @@ class CGCreateInterfaceObjectsMethod(CGAbstractMethod):
|
||||
# There is no need to init any IDs in workers, because worker bindings
|
||||
# don't have Xrays.
|
||||
if not self.descriptor.workers:
|
||||
for var in self.properties.xrayRelevantArrayNames():
|
||||
for var in self.properties.arrayNames():
|
||||
props = getattr(self.properties, var)
|
||||
# We only have non-chrome ids to init if we have no chrome ids.
|
||||
if props.hasChromeOnly():
|
||||
|
@ -186,6 +186,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=741267
|
||||
for (var i in url) {
|
||||
url[i];
|
||||
}
|
||||
isnot(url.createObjectURL, undefined, "Should have a createObjectURL");
|
||||
ok(true, "We didn't crash!");
|
||||
} catch (e) {
|
||||
ok(false, "URL interface object manipulation via an Xray shouldn't throw" + e);
|
||||
|
Loading…
Reference in New Issue
Block a user