Граф коммитов

1077 Коммитов

Автор SHA1 Сообщение Дата
Chris Peterson 8a9e2d2bd4 Bug 1272513 - Part 2: Remove redundant -Wshadow CXXFLAGS from moz.build files. r=glandium 2016-05-14 00:54:55 -07:00
Chris Peterson 353ee65255 Bug 1272513 - Part 1: Suppress -Wshadow warnings-as-errors in some directories. r=glandium 2016-05-11 00:00:01 -07:00
Nicholas Nethercote 2ae68d12e9 Bug 1268772 (part 4) - Use MOZ_MUST_USE with NS_NewISupportsArray(). r=erahm.
A few callers of NS_NewISupportsArray() didn't use the return value to detect
failure, but instead checked if the |array| argument was null after the call.
This is inconsistent with the majority of the calls to NS_NewISupportsArray().
This patch changes them to be checked in the normal way.

--HG--
extra : rebase_source : bf91836d7c3b159833c303a3716f4d9366f8b76a
2016-05-02 09:06:47 +10:00
Nicholas Nethercote 358a6071d9 Bug 1260653 - Shrink NativeProperties. r=bz.
This patch makes NativeProperties variable-length and reduces static data by
110,336 bytes on 64-bit, and half that on 32-bit.

MozReview-Commit-ID: 2etZ5AnEhgO

--HG--
extra : rebase_source : 6a167b64df7da3c6940114782fe08337f04a694d
2016-03-31 09:57:20 +11:00
Christian Holler 66408836a1 Bug 1252072 - Prevent ASan instrumentation for unsafe xpcom functions. r=froydnj
MozReview-Commit-ID: 5k2RAVPlcAI

--HG--
extra : rebase_source : cf9270a5f743d032f5e8cb0f1f8d691ec3d965b1
2016-02-29 21:39:03 +01:00
Nicholas Nethercote 2ddfe18454 Bug 1249174 (part 7.5) - Avoid wasted space around XPT strings. r=khuey.
This patch:

- Removes XPTArena's ability to support arbitrary alignments.

- Hardwires two sub-arenas into XPTArena, one with alignment of 8 and one with
  alignment of 1.

- Uses the first sub-arena for most allocations and the second sub-arena for C
  string allocations.

These changes reduce "xpti-working-set" by 56 KiB.

The patch also renames all the used of "malloc" in XPT identifiers with
"calloc", to make clearer that the result is always zeroed.

--HG--
extra : rebase_source : 8e6cc42644621a7f3c80593006734e25420c7229
2016-02-23 16:17:58 +11:00
Nicholas Nethercote 941e0d3432 Bug 1249174 (part 6) - Shrink XPTTypeDescriptor. r=khuey.
With careful layout we can reduce sizeof(XPTTypeDescriptor) from 4 to 3, which
also reduces sizeof(XPTParamDescriptor) from 6 to 4. This reduces
"xpti-working-set" by 16 KiB.

The union-of-structs also improves readability by making it clearer exactly
which fields are used for which types.

--HG--
extra : rebase_source : 08060096f93c756fda847b90b45df1b1b207e2b5
2016-02-23 16:17:44 +11:00
Nicholas Nethercote 50bd48ed70 Bug 1249174 (part 2) - Shrink xptiInterfaceEntry by reordering its fields. r=khuey.
This reduces "xpti-working-set" by another 16 KiB on 64-bit.

--HG--
extra : rebase_source : c04b60066ca517122f2b23874f5b3220e87fc303
2016-02-17 15:23:46 +11:00
Nicholas Nethercote 13ac3274cc Bug 1248534 (part 9) - Remove XPT arena logging code. r=khuey.
It's not useful.

--HG--
extra : rebase_source : 90cdfa37fff023adffd12327ce5c7595e0d8d285
2016-02-23 05:33:35 +11:00
Nicholas Nethercote b1487760df Bug 1248534 (part 6) - Stack-allocate XPTState. r=khuey.
RegisterBuffer() is the only place that creates an XPTState, and it also
destroys it. So the XPTState can be allocated on the stack, which voids the
need for the creation of an XPTArena.

--HG--
extra : rebase_source : b25f0e798d72b8742efc96793a927f8a060101cf
2016-02-23 05:33:35 +11:00
Nicholas Nethercote 2735b61ff4 Bug 1248534 (part 2) - Remove unused XPT flags. r=khuey.
--HG--
extra : rebase_source : 9423560ffca6b7e50e746ab86861888695d66df2
2016-02-16 19:04:18 +11:00
Nicholas Nethercote 0e4dc7f598 Bug 1248534 (part 1) - Remove XPT encoding support. r=khuey.
Currently XPT can both encode and decode, but encoding has been handled by
Python code since bug 643817, so the encoding support can be removed. This
results in many simplifications. Some notable changes:

- All the XPTHashTable code (including XPTDatapool::offset_map) is no longer
  necessary.

- PrimitiveTest.cpp and SimpleTypeLib.cpp both don't make much sense without
  encoding support, so I removed them.

- A lot of the version code was already unused, e.g. XPT_VERSION_*,
  XPT_TYPELIB_VERSIONS_STRUCT, XPT_TYPELIB_VERSIONS.
  XPT_MAJOR_INCOMPATIBLE_VERSION is the only thing actually used in version
  checks.

- The patch also removes some code that was dead even before encoding removal,
  such as XPT_ParseVersionString().

--HG--
extra : rebase_source : 11cfe0b01efde4e2ff0c74b02b408baebedd3dd8
2016-02-16 19:02:51 +11:00
Paul Bignier 73d69ff7c5 Bug 1245099 - Fixed uninitialized variable warning. r=bsmedberg 2016-02-02 06:41:00 +01:00
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Jan Beich b99a9577ea Bug 1235610 - Add xpctall support for Bitrig and DragonFly. r=glandium
--HG--
extra : transplant_source : %AD%3E%B5E%09%15%D7%CF%86%E37%FA%09%BF%E1%40%AF%E8%DCK
2015-12-29 18:06:20 +00:00
Nathan Froyd 0fe98fa9ef Bug 1234860 - move win32 NS_InvokeByIndex implementation to a separate assembly file; r=aklotz,ted.m
On win32, NS_InvokeByIndex is implemented with inline assembly.  This
inline assembly assumes that it is wrapped by the compiler with the
standard x86 prologue and epilogue:

    push ebp
    mov ebp, esp
    [inline assembly that manipulates the stack pointer]
    pop ebp
    ret

In particular, the last instruction of the inline assembly is:

    mov esp, ebp

which cancels out the effects of the stack manipulation performed by all
the inline assembly that proceeds the instruction.

When compiling with clang-cl, however, the above assumption does not
hold, as clang-cl inserts a more complex prologue and epilogue,
something like:

    push ebp
    mov ebp, esp
    sub esp, frame_size
    [save registers into stack frame]
    [inline assembly that manipulates the stack pointer]
    [restore registers from stack frame]
    add esp, frame_size
    mov esp, ebp
    pop ebp
    ret

Combining this more extensive prologue and epilogue with the assumptions
of the inline assembly leads to interesting crashes when
NS_InvokeByIndex is called: the inline assembly effectively deallocates
the stack allocated by the inline assembly *and* the stack frame
allocated by the compiler itself.  The compiler-generated code then
attemptes to deallocate the stack frame, leading to the crash, as the
code now returns to an unspecified address.

To avoid these sorts of problems in clang-cl and make the code more
robust generally, let's move the NS_InvokeByIndex implementation to a
separate assembly file.  We can then write exactly what we need to have
happen, safe from any manipulations of the compiler.

Since we don't compile much (any?) code in Gecko with MASM, we need to
add the /SAFESEH flag to the assembler invocation so that the object
file with be appropriately marked as not containing exception handlers;
the linker (which is invoked with the /SAFESEH flag itself) will then
consent to link it into libxul.
2015-12-23 11:45:38 -05:00
Andrea Marchesini c2230f21f8 Bug 1231100 - Get rid of nsIDOMFileReader - patch 1, r=sicking 2015-12-09 15:52:15 -05:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Ted Mielczarek c669bcf3d2 bug 681602 - Implement xptcall for arm iOS. r=glandium
xptcstubs_arm mostly works on iOS but Apple's assembler is ridiculous so
the inline assembly for the SharedStub and the stub methods needs judicious
preprocessor use.

--HG--
extra : commitid : ChAcktTzVX0
extra : rebase_source : 11fbaa4940fd9aaeba51e2477d4c8b1a7851791e
2015-09-23 09:57:10 -04:00
Chris Peterson 71920a9550 Bug 1207030 - Enable -Wshadow flag in more directories that have no -Wshadow warnings. r=glandium 2015-09-22 21:39:03 -07:00
Chris Peterson 0dbaae1ce2 Bug 1204403 - Fix -Wshadow warnings in xpcom. r=mccr8 2015-09-07 23:56:16 -07:00
Ehsan Akhgari 68e13b0044 Bug 1123323 - Ensure that xptiTypelibGuts cannot have a vtable; r=froydnj 2015-09-03 18:54:19 -04:00
Nicholas Nethercote f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
David Major 521d956cba Bug 1196370 - Remove the clang assembly workaround from bug 1028613. r=ehsan 2015-08-20 14:34:57 -07:00
Andrew McCreight 12b6a0a427 Bug 1189423 - part 2 - Remove superfluous |new| result check. r=froydnj 2015-07-30 15:06:00 +02:00
Andrew McCreight 0869c89dae Bug 1189423 - part 1 - Add MOZ_COUNT_CTOR/DTOR for nsXPTCStubBase. r=froydnj 2015-08-04 14:30:00 +02:00
Birunthan Mohanathas 7315345693 Bug 1191100 - Remove XPIDL signature comments in .cpp files. r=ehsan
Comment-only so DONTBUILD.
2015-08-04 16:17:36 -07:00
Nicholas Nethercote d98d14fa1e Bug 1189156 (part 4) - Don't use enumeration style for nsBaseHashtable::SizeOf{In,Ex}cludingThis(). r=erahm,jfkthame.
After this change, we have ShallowSizeOf{In,Ex}cludingThis(), which don't do
anything to measure children. (They can be combined with iteration to measure
children.)

--HG--
extra : rebase_source : f98420176f50990bbc5a25e35788328154cfeb00
2015-07-30 21:19:57 -07:00
Kyle Huey ee4f5ba9fb Bug 1185470: Remove 'Get' prefixes from hashtable iterator methods. r=froydnj 2015-07-20 20:21:28 +08:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Nicholas Nethercote 4230c038ed Bug 1181445 (part 7) - Use nsBaseHashTable::Iterator in xpcom/reflect/. r=froydnj.
--HG--
extra : rebase_source : eca5822aff7c334c74a5cabea6cef2fc3b94bf3d
2015-07-09 16:54:59 -07:00
Nathan Froyd 0e1fa707ed Bug 1151506 - move nsIInterfaceInfo::isMainProcessScriptable to the end of the interface's vtable; r=dbaron
Adding isMainProcessScriptable() into the middle of nsIInterfaceInfo
caused problems with some binary addons that relied on the ordering of
the methods in nsIInterfaceInfo.  In an attempt to placate those addons,
move isMainProcessScriptable() to the end of the vtable.  This change is
a no-op for normal libxul usage.
2015-06-29 10:28:14 -04:00
Wes Kocher b4ebe3c719 Merge m-c to inbound, a=merge 2015-06-29 17:28:20 -07:00
Ryan VanderMeulen 872107fe72 Backed out changeset a1089f3645fc (bug 1151506) because it didn't fix the crashes it was intended to. a=lizzard 2015-06-29 14:53:55 -04:00
David Major d15cf4043f Bug 1151506: Work around broken binary callers of xptiInterfaceInfo. r=froydnj
--HG--
extra : rebase_source : 7a27a2da649ab44113525dec7f2ea365688c1c81
2015-06-26 10:33:44 -07:00
Nathan Froyd 2c8aa84236 Bug 1178317 - eliminate large static constructor from ShimInterfaceInfo.cpp; r=poiru
Constructing kComponentsInterfaceShimMap required a static constructor
on some compilers, due to a non-constexpr constructor and the necessity
of copying non-constexpr things like nsIID.  This static constructor is
large (several kilobytes of object code on x86-64) and completely
unnecessary.

To fix this, let's add a constexpr (well, MOZ_CONSTEXPR) constructor to
ComponentsInterfaceShimEntry.  This change alone doesn't completely
solve our problem, because the nsIID member still needs to be copied.
But doing that copying is silly: we only use the IID for constructing a
ShimInterfaceInfo in ShimInterfaceInfo::MaybeConstruct, and the
ShimInterfaceInfo constructor takes a const reference.  So let's store a
const reference in ComponentsInterfaceShimEntry, too, and make that
structure significantly smaller in the process.
2015-06-29 10:59:59 -04:00
David Major 17a51c4514 Bug 1151506 - Null-check the count parameter in GetConstantCount. r=froydnj 2015-06-24 09:07:11 -07:00
Heiher dcf2b9d940 Bug 1170859- MIPS64: Fix copy u32 type arg to argument register. r=froydnj 2015-06-02 18:49:00 -04:00
Michael Layzell 4d7b75425a Bug 1167378 - Mark ArrayAndPrefix as MOZ_STACK_CLASS and array member as MOZ_NON_OWNING_REF. r=froydnj 2015-05-28 10:06:00 -04:00
Andrew Osmond 52c7f139a7 Bug 1169342 - Remove nsIDOMDeviceStorage. Cleanup nsDOMDeviceStorage event wrappers. r=dhylands 2015-05-28 18:53:16 -04:00
Mike Hommey 806e0220a2 Bug 991983 - Use objdir-relative SOURCES instead of GENERATED_SOURCES. r=gps 2015-05-28 07:34:16 +09:00
Mike Hommey 7c306bdc19 Bug 1162845 - Move ASFLAGS to moz.build. r=mshal 2015-05-12 07:54:06 +09:00
Mike Hommey a85a743e41 Bug 1162847 - Fix misplaced xptcstubsdef_asm.solx86 after bug 941450. r=mshal 2015-05-12 07:27:54 +09:00
Mike Hommey 1d59644f14 Bug 1162846 - Don't use str.find in moz.build. r=mshal 2015-05-12 07:27:35 +09:00
David Major ebde6b9f4f Bug 1157835: Remove the MSVC_ENABLE_PGO flag from the build system. r=glandium
--HG--
extra : rebase_source : 0c47c99bb8b92f8361a51fd81b20a2cc8647a986
2015-04-27 19:59:27 -04:00
Ginn Chen 8232df4203 Bug 1153707 jsval is wrongly passed to XPT Javascript method on ppc/32 and SPARC/32 r=bobbyholley 2015-04-27 13:47:17 +08:00
Kyle Huey 0f81e8288a Bug 1158366: Remove nsIDOMHTML[BR|Div|Heading|TableCaption|Table|Title]Element.idl. r=ehsan 2015-04-25 07:23:54 -07:00
Wes Kocher 65b94d7a9d Backed out changeset 022beda1707c (bug 1158366) for wError build bustage 2015-04-24 16:52:52 -07:00
Kyle Huey cdd7af4cfa Bug 1158366: Remove nsIDOMHTML[BR|Div|Heading|TableCaption|Table|Title]Element.idl. r=ehsan 2015-04-24 16:09:30 -07:00
Andrea Marchesini ade2831035 Bug 1156632 - Remove unused forward class declarations - patch 6 - the rest of the tree, r=ehsan 2015-04-22 08:29:24 +02:00