Commit Graph

5860 Commits

Author SHA1 Message Date
Tom Tromey
12bab7b44e Bug 1135081 - Fix typo in nsTString::AssertValidDepedentString. r=froydnj 2015-02-20 08:02:00 -05:00
Alex Henrie
d0bc166248 Bug 1134537 - Only support GIO in nsLocalFileUnix. r=froydnj 2015-02-19 12:58:58 -07:00
Andrew McCreight
e6c775fc7f Bug 1130142, part 4 - Use reinterpret_cast for PR_SetThreadPrivate. r=froydnj 2015-02-20 09:38:47 -08:00
Andrew McCreight
48944cc57b Bug 1130142, part 3 - Use HashNumber method in more places in trace refcounting. r=froydnj
This should not change any behavior.
2015-02-20 09:38:47 -08:00
Andrew McCreight
92b82f1a88 Bug 1130142, part 2 - Don't explicitly coerce pointer to bool in nsTraceRefCnt. r=froydnj 2015-02-20 09:38:47 -08:00
Andrew McCreight
c2f8541239 Bug 1130142, part 1 - Don't truncate pointers to 32-bit values in refcount logging. r=froydnj 2015-02-20 09:38:46 -08:00
Nicholas Nethercote
e87c07a6b6 Bug 1132802 - Add more assertions to pldhash.cpp. r=froydnj.
The use of |new| in PL_NewDHashTable() is necessary to avoid the new
assertions in Init() from failing.
2015-02-11 20:24:33 -08:00
Nicholas Nethercote
0f5dc1f481 Bug 1127201 (attempt 2, part 3) - Remove the NS_ABORT_IF_FALSE macro. r=Waldo. 2015-02-04 20:07:09 -08:00
Trevor Saunders
d48baddbc0 bug 1133075 - add more MOZ_OVERRIDE r=froydnj, waldo, jrmuizel 2015-02-18 17:03:30 -05:00
Frédéric Wang
dc7d640cbc Bug 467729 - Add a PackageKit XPCOM API. r=karlt 2015-02-16 23:59:00 -05:00
Boris Zbarsky
07d01d9155 Bug 1117242 followup. Rev the nsIStackFrame IID so things get rebuilt correctly. r=bustage 2015-02-13 20:24:20 -05:00
Nick Fitzgerald
ea358e92e1 Bug 1117242 - SavedFrame objects should do principal checks for every accessor; r=jimb,jandem,bz 2015-02-13 09:21:50 -08:00
Mason Chang
a7692466c4 Bug 1127151. Part 4: Update TimeStamp::FromSystemTime with windows testing. r=kats 2015-02-13 17:17:28 +08:00
James Cowgill
df0a1ae1a9 Bug 1130434- xpcom: add support for mips n64 abi. r=froydnj 2015-02-06 08:28:00 -05:00
Makoto Kato
5d85732a61 Bug 1131436 - WindowsDllInterceptor is always failure with --disable-optimize and --enable-debug. r=dmajor 2015-02-12 15:07:57 +09:00
Nicholas Nethercote
89491db0c6 Bug 1131199, part 3 - Update comments relating to PLDHashTableOp::initEntry. r=mccr8.
DONTBUILD because this is a comment-only change.
2015-02-11 14:24:47 -08:00
Nicholas Nethercote
74f1b127f3 Bug 1131901 (part 2) - Make CCGraphBuilder::AddNode() infallible. r=mccr8. 2015-02-02 23:58:42 -08:00
Nicholas Nethercote
09156539d5 Bug 1131901 (part 1) - Make PL_DHashTableAdd() infallible by default, and add a fallible alternative. r=froydnj.
I kept all the existing PL_DHashTableAdd() calls fallible, in order to be
conservative, except for the ones in nsAtomTable.cpp which already were
followed immediately by an abort on failure.
2015-02-02 14:48:58 -08:00
Ben Kelly
2b0ffce836 Bug 1100398 P5 Provide NS_CloneInputStream() factory method in nsStreamUtils.h. r=froydnj 2015-02-10 23:55:43 -05:00
Ben Kelly
c1651128c6 Bug 1100398 P4 Make nsPipeInputStream cloneable. r=froydnj 2015-02-10 23:55:43 -05:00
Ben Kelly
65b6d3cb3e Bug 1100398 P3 Make nsStorageStream's input streams cloneable. r=froydnj 2015-02-10 23:55:43 -05:00
Ben Kelly
d38f4641c3 Bug 1100398 P2 Make nsStringInputStream cloneable. r=froydnj 2015-02-10 23:55:43 -05:00
Ben Kelly
a4ec611b4f Bug 1100398 P1 Add the nsICloneableInputStream interface. r=froydnj 2015-02-10 23:55:43 -05:00
Ben Kelly
7f8ecbcda1 Bug 1100398 P0 Break out helper routines to support gtests for more stream types. r=froydnj 2015-02-10 23:55:43 -05:00
Nathan Froyd
d00f3c3065 Bug 1036515 - narrow the scope of unlocking mMonitor in nsTimerImpl::PostTimerEvents; r=bsmedberg 2015-02-06 16:19:36 -05:00
Andrew McCreight
c946357872 Bug 1131199, part 2 - Make PLDHashtInitEntry infallible. r=froydnj
Also, drop the unused table argument.
2015-02-11 09:46:40 -08:00
Nicholas Nethercote
a3bfc736ba Back out changesets 2fcef6b54be7, 2be07829fefc, 66dfe37b8532, df3fcd2be8fd, 0a436bce77a6 (bug 1050035) for causing intermittent crashes and assertion failures. 2015-02-10 14:39:49 -08:00
Bobby Holley
9289af1f68 Bug 1129877 - Add a templatized move constructor for nsRefPtr. v1 r=froydnj 2015-02-10 13:45:02 -08:00
L. David Baron
758cb58c30 Bug 680547 bustage fix: Make #pragmas be #ifndef __clang__. No review. 2015-02-10 16:24:54 +11:00
L. David Baron
562f07be92 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
2015-02-10 16:04:46 +11:00
Nicholas Nethercote
ee41df7dc2 Bug 1127201 (attempt 2, part 1) - Replace most NS_ABORT_IF_FALSE calls with MOZ_ASSERT. r=Waldo. 2015-02-09 14:34:50 -08:00
Andrew McCreight
1ee96e7527 Back out Bug 1127201 (part 2) for various problems. 2015-02-06 15:04:32 -08:00
Andrew McCreight
f3dd98b6fc Back out Bug 1127201 (part 3) for various problems. 2015-02-06 15:04:00 -08:00
Andrew McCreight
7c2c57efdf Bug 1125005 - Change the reentrance assertion in IncrementalFinalizeRunnable to a warning. r=smaug 2015-02-06 09:54:21 -08:00
Dhi Aurrahman
a3d52372b7 Bug 1125766 - Throw proper error types for TextEncoder(), TextDecoder() and TextDecoder.decode(). r=bz 2015-02-04 18:46:26 +07:00
Wes Kocher
ec2159dddd Merge inbound to m-c a=merge CLOSED TREE 2015-02-05 16:55:01 -08:00
Dave Townsend
121d197d22 Bug 1083281: Use flags to determine which chrome and about URIs are loaded in the content process. r=mconley, r=bsmedberg, r=jduell, r=mratcliffe 2015-02-05 08:09:15 -08:00
Nicholas Nethercote
aa8347555e Bug 1127201 (part 3) - Remove the NS_ABORT_IF_FALSE macro. r=Waldo. 2015-02-04 20:07:09 -08:00
Nicholas Nethercote
0a02b5d31c Bug 1127201 (part 2) - Convert all NS_ABORT_IF_FALSE calls to MOZ_ASSERT. r=Waldo. 2015-02-04 20:05:36 -08:00
Nicholas Nethercote
96047a2559 Bug 1050035 (part 5) - Make CCGraphBuilder::AddNode() infallible. r=mccr8. 2015-02-02 23:58:42 -08:00
Nicholas Nethercote
a40419dc43 Bug 1050035 (part 4) - Make PL_DHashTableAdd() infallible by default, and add a fallible alternative. r=froydnj.
I kept all the existing PL_DHashTableAdd() calls fallible, in order to be
conservative, except for the ones in nsAtomTable.cpp which already were
followed immediately by an abort on failure.
2015-02-02 14:48:58 -08:00
Nicholas Nethercote
3aa6fd7b3d Bug 1050035 (part 3) - Remove PL_NewDHashTable() and PL_DHashTableDestroy(). r=froydnj.
Because they are now just equivalent to |new PLDHashTable()| +
PL_DHashTableInit() and PL_DHashTableFinish(t) + |delete t|, respectively.

They're only used in a handful of places and obscure things more than they
clarify -- I only recently worked out exactly how they different from Init()
and Finish().
2015-02-01 20:36:52 -08:00
Nicholas Nethercote
a5bbfabc46 Bug 1050035 (part 2) - Remove the fallible version of PL_DHashTableInit(). r=froydnj,mrbkap.
Because it's no longer needed now that entry storage isn't allocated there.
(The other possible causes of failures are much less interesting and simply
crashing is a reasonable thing to do for them.)

This also makes PL_DNewHashTable() infallible.
2015-02-01 20:19:08 -08:00
Nicholas Nethercote
47a06e67ef Bug 1050035 (part 1) - Lazily allocate PLDHashTable::mEntryStore. r=froydnj.
This makes zero-element hash tables, which are common, smaller, and also avoids
unnecessary malloc/free pairs.

I did some measurements during some basic browsing of a few sites. I found that
35% of all live tables were empty with a few tabs open. And cumulatively, for
the whole session, 45% of tables never had an element added to them.

There is more to be done w.r.t. simplifying initialization, which will occur in
the next patch.
2015-02-01 14:56:33 -08:00
Xidorn Quan
1aa524cf40 Bug 1127045 part 3 - Make nsTArray support reverse iterating. r=froydnj 2015-02-04 19:07:32 +11:00
Xidorn Quan
901d25c409 Bug 1126552 part 1 - Make nsTArray support range-based for loops. r=froydnj 2015-02-04 19:07:32 +11:00
Xidorn Quan
3f8ebecfd2 Bug 1126552 part 0 - Rename end to iend to avoid shadowing warnings. r=froydnj 2015-02-04 19:07:32 +11:00
Nicholas Nethercote
e6990105a1 Bug 1127401 - Tweak PL_DHashTableSearch() to counter a Fennec regression. r=froydnj.
PL_DHashTableLookup() had the same return protocol as SearchTable(), which
meant that compilers could generate a tail call from the former to the latter.
Bug 1124973 replaced PL_DHashTableLookup() with PL_DHashTableSearch(), which
has a slightly different return protocol, and so the tail call was lost. This
appears to be the cause of the Fennec performance regression.

This patch splits SearchTable() in two (using templates to avoid explicit code
duplication). SearchTable<false>() now has the same return protocol as
PL_DHashTableSearch(), and so the tail call can now be used again.
2015-01-29 20:18:28 -08:00
Masatoshi Kimura
5572f00123 Bug 1128273 - Stop using |typedef enum class tag_nsresult { ... } nsresult;| trick. r=froydnj 2015-02-02 23:44:25 +09:00
Mike Hommey
50e6916b40 Bug 1126593 - Add a global fallible instance, so that using fallible works directly, everywhere. r=njn 2015-02-02 09:56:13 +09:00