mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 817387 - Remove last occurences of NS_OVERRIDE; r=ehsan
DONTBUILD as this is NPOTB.
This commit is contained in:
parent
53492a52ce
commit
10a08b1f0c
@ -9,7 +9,6 @@ DEHYDRA_SCRIPT = $(topsrcdir)/config/static-checking.js
|
||||
|
||||
DEHYDRA_MODULES = \
|
||||
$(topsrcdir)/xpcom/analysis/final.js \
|
||||
$(topsrcdir)/xpcom/analysis/override.js \
|
||||
$(topsrcdir)/xpcom/analysis/must-override.js \
|
||||
$(NULL)
|
||||
|
||||
|
@ -1,46 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/**
|
||||
* NS_OVERRIDE may be marked on class methods which are intended to override
|
||||
* a method in a base class. If the method is removed or altered in the base
|
||||
* class, the compiler will force all subclass overrides to be modified.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Generate all the base classes recursively of class `c`.
|
||||
*/
|
||||
function all_bases(c)
|
||||
{
|
||||
for each (let b in c.bases) {
|
||||
yield b.type;
|
||||
for (let bb in all_bases(b.type))
|
||||
yield bb;
|
||||
}
|
||||
}
|
||||
|
||||
function process_decl(d)
|
||||
{
|
||||
if (!hasAttribute(d, 'NS_override'))
|
||||
return;
|
||||
|
||||
if (!d.memberOf || !d.isFunction) {
|
||||
error("%s is marked NS_OVERRIDE but is not a class function.".format(d.name), d.loc);
|
||||
return;
|
||||
}
|
||||
|
||||
if (d.isStatic) {
|
||||
error("Marking NS_OVERRIDE on static function %s is meaningless.".format(d.name), d.loc);
|
||||
return;
|
||||
}
|
||||
|
||||
for (let base in all_bases(d.memberOf)) {
|
||||
for each (let m in base.members) {
|
||||
if (m.shortName == d.shortName && signaturesMatch(m, d))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
error("NS_OVERRIDE function %s does not override a base class method with the same name and signature".format(d.name), d.loc);
|
||||
}
|
Loading…
Reference in New Issue
Block a user