mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1239788 - Don't include non-main-thread assertions in the constructor enabled check for [Exposed=System] WebIDL interfaces; r=bzbarsky
This commit is contained in:
parent
50027e1417
commit
086b12d574
@ -3240,7 +3240,7 @@ class CGConstructorEnabled(CGAbstractMethod):
|
||||
conditions = []
|
||||
iface = self.descriptor.interface
|
||||
|
||||
if not iface.isExposedInWindow():
|
||||
if not iface.isExposedOnMainThread():
|
||||
exposedInWindowCheck = dedent(
|
||||
"""
|
||||
MOZ_ASSERT(!NS_IsMainThread(), "Why did we even get called?");
|
||||
@ -3259,7 +3259,7 @@ class CGConstructorEnabled(CGAbstractMethod):
|
||||
}
|
||||
""", workerCondition=workerCondition.define())
|
||||
exposedInWorkerCheck = CGGeneric(exposedInWorkerCheck)
|
||||
if iface.isExposedInWindow():
|
||||
if iface.isExposedOnMainThread():
|
||||
exposedInWorkerCheck = CGIfWrapper(exposedInWorkerCheck,
|
||||
"!NS_IsMainThread()")
|
||||
body.append(exposedInWorkerCheck)
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user