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

58 Коммитов

Автор SHA1 Сообщение Дата
Nika Layzell 14da321a67 Bug 1444745 - Part 5: Update consumers of nsIInterfaceInfo to use the nsXPTInterfaceInfo directly, r=mccr8
Due to the decision to keep the old API on nsXPTInterfaceInfo in part 4, this is
a fairly straightforward patch.

1. I had to change a couple of consumers of `IsRetval()` due to the movement of
that flag.
2. I changed all code which held a nsIInterfaceInfo to hold an `const
nsXPTInterfaceInfo*` instead.
3. I changed code which used the nsIInterfaceInfoManager to instead call the
static methods on nsXPTInterfaceInfo.
2018-04-17 19:20:56 -04:00
Nika Layzell f5f86c989e Bug 1444745 - Part 1: Clear out xptinfo and typelib to make way for the this patch, r=mccr8
Unfortunately, I wasn't able to figure out a way to make firefox build & run in
the intermediate stages of these commits. Because of this, I am going to just
delete most of the code which I am deleting in the first patch, as I figure that
those are somewhat uninteresting changes, and then make the other changes in the
following patches.

In total, the following things are deleted:
1. All of xpcom/typelib, except for `xpt/tools` - this directory is being
subsumed entirely into xpcom/reflect/xptinfo.
2. Most of the code in xpcom/reflect/xptinfo, it is being rewritten to avoid
allocating and contain all of the necessary data structures.
3. idl-parser's typelib.py XPT generator, as it will be replaced.
4. Most includes of files which have been deleted.

NOTE: xpcom/typelib/xpt/tools/xpt.py was not removed, as it is used by bundling
code & bundling tests, which we don't want to remove yet.
2018-04-17 19:20:50 -04:00
Ryan VanderMeulen 5383105dd9 Bug 1086964 - Remove uses of no_pgo that are no longer needed. r=dmajor 2018-03-14 18:18:32 -04:00
Ryan VanderMeulen 0007daf65b Backed out changeset 1ec0f839a905 (bug 1086964) for mass Win7 debug test failures. 2018-03-14 20:35:43 -04:00
Ryan VanderMeulen 3f80fd8acc Bug 1086964 - Remove uses of no_pgo that are no longer needed. r=dmajor 2018-03-14 18:18:32 -04:00
qiaopengcheng-hf@loongson.cn 6193e70667 Bug 1429650 - mips64-linux PrepareAndDispatch float-formate data error when running xpcshell-test js/xpconnect/tests/unit/test_attribute.js and test_params.js r=froydnj 2018-01-15 09:59:11 +08:00
Chris Peterson 37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Sylvestre Ledru 9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
David Major 66bfbba514 Bug 1423791: Remove clang-cl workarounds from xptcstubs.cpp. r=jrmuizel
The clang-cl-specific code is hitting https://bugs.llvm.org/show_bug.cgi?id=35482 on 32-bit ThinLTO builds. As far as I can tell, this workaround is no longer needed in clang-cl anyway; it should be able to support declspec(naked) etc nowadays.

Drive-by MSVC warnings fix.

--HG--
extra : rebase_source : a8b585c554674daca6d75bae66c1a1d892ed6e57
2017-12-01 16:29:47 -05:00
Ted Mielczarek 586c3a1834 bug 1253607 - remove xpcom/reflect/xptcall/md/unix/Makefile.in. r=mshal
This Makefile.in contains a bunch of cruft for Tier-3 platforms. If
someone is still supporting any of them they can make the necessary
fixes to moz.build files themselves.

MozReview-Commit-ID: HxbbCv395Y5

--HG--
extra : rebase_source : 94f04128d2b3dd1285dfeafbfeb320b2f0d0bb19
extra : histedit_source : 2353127161ae58e54b6296e98b6b4b972ae439fe
2017-10-04 06:37:43 -04:00
qiaopengcheng-hf@loongson.cn b051bf36d9 Bug 1394286 - mips64: fix error correction about stackpointer within function _NS_InvokeByIndex. r=froydnj
--HG--
extra : rebase_source : 716b6ff862d57e13b2169ba7fcc1f6e6ef2d636e
2017-08-30 10:01:26 +08:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Petr Sumbera b9cd2c83f0 Bug 1369713 - Solaris gcc build of xptcall wrongly expects xptcstubsdef_asm.solx86. r=glandium
--HG--
extra : rebase_source : cf7139ba22da4208c00dbaf1175abf1bfee6f5ba
2017-06-02 05:46:31 -07:00
Jim Chen 14dbe23a6c Bug 1360321 - 6. Add AArch64 support in xpcom; r=froydnj
Add breakpoint support for AArch64, and fix a scanf format specifier
warning. Also fix an #if line in xptcinvoke_arm.cpp to work as intended.

MozReview-Commit-ID: BSjYVD8Zq0t
2017-05-17 13:06:23 -04:00
Nathan Froyd bfc429531b Bug 1355853 - add CFI directives for x86-64 Linux xptcall assembly routines; r=jseward
Adding these directives means unwinding the stack with the profiler will
no longer get confused when we need to unwind through these functions.
2017-04-13 08:30:56 -04:00
Jan Beich 5f6e848e09 Bug 1330119 - Build Linux aarch64 code in XPTCALL also on BSDs. r=froydnj
MozReview-Commit-ID: 92T1qG5yVx2

--HG--
extra : rebase_source : db1579c6ef5493bbdeb347d9021faa521261d24b
2017-01-10 22:50:32 +00:00
Sylvestre Ledru 5bedb078f1 Bug 1338086 - Remove useless else blocks in order to reduce complexity in xpcom/ r=froydnj
MozReview-Commit-ID: JUJARn5Nspp

--HG--
extra : rebase_source : c719d19215fb26ace822269c2a28faf5cf35ffbb
2017-02-09 15:31:35 +01:00
John David Anglin 0beeba79e1 Bug 1325495 - xpcom: Save %r26 in arg0 stack slot on hppa with gcc. r=froydnj
In the 32-bit parisc runtime, the first four non floating-point
arguments are passed in registers (%r26, %r25, %r24 and %r23).
The remaining arguments are passed on the stack. There are four
reserved slots on the stack that the callee can use to save the
first four argument registers if the callee desires.

The StubN functions are special in that arguments are not explicitly
declared. %r26 is used for the "self" pointer. The call to SharedStub(n)
loads n into %r26 and clobbers the "self" pointer in %r26. The hppa
SharedStub implementation expects to find the "self" pointer on the
stack in the slot reserved for StubN. However, gcc doesn't copy any
arguments to the stack as no arguments are declared for StubN. Even
if it did, there's no guarantee that we could force gcc to save the
argument on the stack as that's more expensive than copying to a
free register. Thus, we need to copy %r26 to the stack slot manually.
2017-01-12 06:37:13 +09:00
John Paul Adrian Glaubitz fde7f4bca8 Bug 1275204 - Use OpenBSD/sparc64 xptcall stubs on Linux/sparc64. r=froydnj 2017-01-11 16:04:34 +09:00
Trevor Saunders ed793c18d7 bug 1272498 - remove a obsolete and now useless comment 2016-11-16 01:17:40 -05:00
Trevor Saunders 17486e3454 bug 1272498 - rewrite NS_InvokeByIndex in assembly r=froydnj 2016-11-15 22:07:40 -05:00
Laszlo Ersek b3ba117711 Bug 1304962 - fix argument processing in AARCH64 xptcall; r=froydnj
The invoke_copy_to_stack() function passes incorrect "stack_args" and
"end" arguments to the alloc_word() utility function, for parameter types
T_I8..T_I64, T_U8..T_U64, T_BOOL, T_CHAR and T_WCHAR.

Namely, the "end" input parameter of invoke_copy_to_stack(), which is
currently incorrectly passed as "end" to alloc_word(), points to the very
end of the entire exchange area between _NS_InvokeByIndex() and
invoke_copy_to_stack(). However, alloc_word()'s "end" parameter should
point to the end of the "ireg" (integer registers) sub-area of the
exchange area. That is, "ireg_end" should be passed to alloc_word() as
"end".

Because invoke_copy_to_stack()'s "end" input parameter is strictly greater
than "ireg_end", alloc_word() will happily trample over the "freg"
(floating point registers) area, on the above-mentioned type branches,
given a large enough "paramCount".

Similarly, as second argument, "stack_args" should be passed to
alloc_word(), pointing to the next available stack slot, for spilled-over
arguments. Passing "stk", which initially points to the base of the entire
exchange area (and hence the base of the "ireg" area) makes no sense.

The two other alloc_word() calls in the function are correct. So
centralize all calls to alloc_word() to a single location -- thereby
ending up with a sole call site per alloc_XXX() function --, and compute
only the last argument, "word", conditionally.

This fixes an obscure SIGSEGV in AARCH64 Firefox. Triggering the bug
requires a target function with seven integer-like parameters (not
counting the implicit "this" -- aka "that" -- parameter), followed by at
least one parameter of the above buggy types. nsIOService::NewChannel2()
is such a target function, for example.

DONTBUILD because NPTOB
2016-09-24 06:36:16 +02:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
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
2016-07-14 10:16:42 -06:00
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
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
Paul Bignier 73d69ff7c5 Bug 1245099 - Fixed uninitialized variable warning. r=bsmedberg 2016-02-02 06:41:00 +01: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
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 0dbaae1ce2 Bug 1204403 - Fix -Wshadow warnings in xpcom. r=mccr8 2015-09-07 23:56:16 -07: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
Heiher dcf2b9d940 Bug 1170859- MIPS64: Fix copy u32 type arg to argument register. r=froydnj 2015-06-02 18:49:00 -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
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
Andrew McCreight bc9d4b1de6 Bug 1151541, part 1 - Add MPL2 to StaticMutex.h and stub_test.cpp. r=froydnj 2015-04-09 10:25:05 -07:00
James Cowgill 716e7de1ef Bug 1130434- xpcom: add support for mips n64 abi. r=froydnj 2015-02-06 08:28:00 -05:00
L. David Baron 5a1bc25cf4 Bug 680547 bustage fix: Make #pragmas be #ifndef __clang__. No review. 2015-02-10 16:24:54 +11:00
L. David Baron e5f1b47ba8 Bug 680547 - Compile Linux 64-bit NS_InvokeByIndex with -mno-avx to allow compiling with -march=native on new hardware, or similar -march flags. r=froydnj
As explained in bug 1111355, having avx enabled appears to change the
alignment behavior of alloca (apparently adding an extra 16 bytes) of
padding/alignment (and using 32-byte alignment instead of 16-byte).  The
suggestion of using __bultin_alloca_with_align in bug 1111355 didn't fix
the problem, so this seems to be the best available workaround, given
that this code, which should perhaps better be written in assembly, is
written in C++.

Interestingly, this is NOT fixed by #pragma GCC target ("arch=x86-64").
(I determined the (undocumented) name for the default -march value on
x86_64 from the gcc source code (gcc/config/i386/i386.c, function
ix86_option_override_internal, code that sets opts->x_ix86_arch_string .)
I confirmed that this sets the same macros based on the empty diff
between the output of 'gcc -E -dM -x c++ /dev/null' and 'gcc -E -dM -x
c++ -march=x86-64 /dev/null', which was not an empty diff for other
-march values (e.g., k8).)

I confirmed that the push_options and pop_options actually work by
putting the push/pop pair around a different (earlier) function, and
testing that this did not fix the bug (with the pop_options before
NS_InvokeByIndex).

See the gcc documentation at:
https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Function-Specific-Option-Pragmas.html
https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Function-Attributes.html
https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/i386-and-x86-64-Options.html

--HG--
extra : transplant_source : %DA%7CJ4H%DE%80%15%84%0D%116%85Q%9A%F9%2C%D1v%16
2015-02-10 16:04:46 +11:00
Masatoshi Kimura c10ac9defc Bug 1128273 - Stop using |typedef enum class tag_nsresult { ... } nsresult;| trick. r=froydnj 2015-02-02 23:44:25 +09:00
Trevor Saunders 5b86ecf80c bug 1077549 - remove useless gcc version checks r=glandium 2015-01-15 21:30:05 -05:00
Landry Breuil f79152492c Bug 1113374 followup: test for equality against 'GNU' instead of against a single-entry tuple r=froydnj 2014-12-22 21:45:41 +01:00
Thomas Klausner 9e0d49a170 Bug 1113374 : like done in bug 971897, use xpct{stubs,invoke}_x86_64 from linux/unix on NetBSD/amd64 r=froydnj 2014-12-22 21:16:48 +01:00
Chris Peterson 249ac81315 Bug 1110031 - Part 1: Mark more directories as FAIL_ON_WARNINGS. r=gps 2014-12-10 22:56:31 -08:00
Jacob Bramley d7eea06a91 Bug 1050258 - ARM hard-float XPCOM: correct argument passing. r=dougc 2014-11-07 19:44:08 +11:00
Landry Breuil d436a73cbd Bug 971897: Use xpct{stubs,invoke}_x86_64 from linux/unix on OpenBSD/amd64 for consistency r=bsmedberg
This fixes the download panel issue, and brings us revs 727721e5d8ac,
844b142d8111 and 236989b3a807 as a bonus. Remove the unmaintained
OpenBSD/amd64 specific versions.
2014-10-26 17:13:19 +01:00
Mike Hommey 0060683747 Bug 1059090 - Don't require SOURCES to be set for CPP_UNIT_TESTS and SIMPLE_PROGRAMS. r=mshal 2014-09-03 14:16:37 +09:00