Slightly less than half (93 / 210) of the NS_METHOD instances in the codebase
are because of the use of NS_CALLBACK in
nsI{Input,Output,UnicharInput},Stream.idl. The use of __stdcall on Win32 isn't
important for these callbacks because they are only used as arguments to
[noscript] methods.
This patch converts them to vanilla |nsresult| functions. It increases the size
of xul.dll by about ~600 bytes, which is about 0.001%.
--HG--
extra : rebase_source : c15d85298e0975fd030cd8f8f8e54501f453959b
This patch makes the following changes on many in-class methods.
- NS_IMETHODIMP F() override; --> NS_IMETHOD F() override;
- NS_IMETHODIMP F() override {...} --> NS_IMETHOD F() override {...}
- NS_IMETHODIMP F() final; --> NS_IMETHOD F() final;
- NS_IMETHODIMP F() final {...} --> NS_IMETHOD F() final {...}
Using NS_IMETHOD is the preferred way of marking in-class virtual methods.
Although these transformations add an explicit |virtual|, they are safe --
there's an implicit |virtual| anyway because |override| and |final| only work
with virtual methods.
--HG--
extra : rebase_source : 386ee4e4ea2ecd8d5001efabc3ac87b4d6c0659f
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.
As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.
--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
This removes the unnecessary setting of c-basic-offset from all
python-mode files.
This was automatically generated using
perl -pi -e 's/; *c-basic-offset: *[0-9]+//'
... on the affected files.
The bulk of these files are moz.build files but there a few others as
well.
MozReview-Commit-ID: 2pPf3DEiZqx
--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
This patch:
- Removes eTreeOpAddError{Atom,TwoAtoms}, which are unused.
- Adds a MOZ_CRASHing case for eTreeOpUninitialized.
- Reorders the cases in the switch to match the enum declaration order, which
makes it easier to see that all opcodes are now covered.
The web platform tests changes are just a cherrypick of
https://github.com/w3c/web-platform-tests/pull/2926 so I don't have to add
failure annotations until the next test uplift.
I've audited our uses of nsIFormControl, and this patch looks to me like it
preserves existing behavior in all but the following cases:
1) nsXBLPrototypeHandler::DispatchXBLCommand, the case of scrolling when space
is pressed while something inside a <label> is focused. We used to not scroll
in this situation; I think this is a bug, so I'm changing that behavior to
scroll instead.
2) In Accessible::RelationByType for the RelationType::DEFAULT_BUTTON case,
when mContent is a <label> we used to return its form's default submit element.
Now we will just return Relation().
This avoids the need for some virtual function calls and also will help lead to
distinct representations for dynamic and static atoms.
--HG--
extra : rebase_source : 16bbe6f1e1309ee3e4fab7a0d222e638178a2a9c
This patch changes things so that dynamic atoms and static atoms have distinct
implementations. This is a step towards allowing dynamic atoms and static atoms
to have different layouts in memory, which will allow static atoms to be
represented more compactly.
Specifically, the patch does the following.
- It renames AtomImpl as DynamicAtom and PermanentAtomImpl as StaticAtom, and
the latter is no longer a subclass of the former. This required duplicating
some methods from the former into the latter: ScriptableToString(),
ToUTF8String(), ScriptableEquals(), IsStaticAtom(). (This duplication will
disappear in the future if the representations of dynamic atoms and static
atoms diverge. Indeed, SizeOfIncludingThis() is already different in the two
classes.)
- It replaces all mentions of "permanent"/"non-permanent" atoms with
"static"/"dynamic".
- In ~DynamicAtom() it removes the check that causes gAtomTable to be deleted
when it becomes empty. This will only happen at shutdown and so doesn't seem
useful.
- It documents better various things, especially the basics of the
dynamic/static split, the transmutation of dynamic atoms to static atoms, and
the details of the SizeOf functions.
--HG--
extra : rebase_source : dbf903012e70ebf1a43de1e1088db1bc1b8dd4f4
This code is cherry picked from the trunk version of expat.
MozReview-Commit-ID: 8RDaArq2BwO
--HG--
extra : rebase_source : 72d9b56ec2d6d17a99e578017f0e5828ffd3aa1f