зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1792356, part 1 - [noscript] on XPIDL interfaces doesn't do anything. r=xpcom-reviewers,necko-reviewers,nika,kershaw
The [noscript] attribute does nothing on XPIDL interfaces, so make it invalid so people don't think something might be affected if they set it. Differential Revision: https://phabricator.services.mozilla.com/D158136
This commit is contained in:
Родитель
fc029513a6
Коммит
f0ce4cf5ac
|
@ -9,11 +9,11 @@
|
|||
* behavior for the channel's IsPending(), forcing 'true' to be returned.
|
||||
*/
|
||||
|
||||
[noscript, uuid(2ac3e1ca-049f-44c3-a519-f0681f51e9b1)]
|
||||
[uuid(2ac3e1ca-049f-44c3-a519-f0681f51e9b1)]
|
||||
interface nsIForcePendingChannel : nsISupports
|
||||
{
|
||||
|
||||
/**
|
||||
/**
|
||||
* forcePending(true) overrides the normal behavior for the
|
||||
* channel's IsPending(), forcing 'true' to be returned. A call to
|
||||
* forcePending(false) reverts IsPending() back to normal behavior.
|
||||
|
|
|
@ -54,12 +54,12 @@ class TestParser(unittest.TestCase):
|
|||
self.assertTrue(iface.attributes.builtinclass)
|
||||
self.assertTrue(iface.attributes.function)
|
||||
|
||||
i = self.p.parse("[noscript, uuid(abc)] interface foo {};", filename="f")
|
||||
i = self.p.parse("[uuid(abc)] interface foo {};", filename="f")
|
||||
self.assertTrue(isinstance(i, xpidl.IDL))
|
||||
self.assertTrue(isinstance(i.productions[0], xpidl.Interface))
|
||||
iface = i.productions[0]
|
||||
self.assertEqual("foo", iface.name)
|
||||
self.assertTrue(iface.attributes.noscript)
|
||||
self.assertFalse(iface.attributes.scriptable)
|
||||
|
||||
def testMethod(self):
|
||||
i = self.p.parse(
|
||||
|
|
|
@ -908,7 +908,6 @@ class InterfaceAttributes(object):
|
|||
scriptable = False
|
||||
builtinclass = False
|
||||
function = False
|
||||
noscript = False
|
||||
main_process_scriptable_only = False
|
||||
|
||||
def setuuid(self, value):
|
||||
|
@ -920,9 +919,6 @@ class InterfaceAttributes(object):
|
|||
def setfunction(self):
|
||||
self.function = True
|
||||
|
||||
def setnoscript(self):
|
||||
self.noscript = True
|
||||
|
||||
def setbuiltinclass(self):
|
||||
self.builtinclass = True
|
||||
|
||||
|
@ -934,7 +930,6 @@ class InterfaceAttributes(object):
|
|||
"scriptable": (False, setscriptable),
|
||||
"builtinclass": (False, setbuiltinclass),
|
||||
"function": (False, setfunction),
|
||||
"noscript": (False, setnoscript),
|
||||
"object": (False, lambda self: True),
|
||||
"main_process_scriptable_only": (False, setmain_process_scriptable_only),
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче