Commit Graph

6464 Commits

Author SHA1 Message Date
Benoit Girard
2e648924e7 Bug 1182516 - Add Chaos Mode environment variable MOZ_CHAOSMODE. r=roc 2015-07-14 17:29:23 -04:00
Ben Kelly
ed26f6af2a Bug 1173912 Fail opaque responses for client requests. r=ehsan 2015-07-14 13:11:26 -07:00
Ben Kelly
a8c12eb83d Bug 1173934 Show a message if a docshell fails to load due to SW intercept failure. r=ehsan r=jdm 2015-07-14 13:11:26 -07:00
Ryan VanderMeulen
5ac973a158 Merge m-c to inbound. a=merge 2015-07-15 13:26:44 -04:00
Peter Elmers
9295a3b690 Bug 1183291 - Factor idl-parser into a Python package. r=khuey
Move Python code into an xpidl subdirectory, and include a setup.py to allow
inclusion from pip install or requirements files. Change build directory
variables appropriately.
2015-07-13 13:09:11 -07:00
Jeff Muizelaar
9214c5266a Bug 1178426. Add GfxInfo to ServicesList.h. r=nfroyd 2015-07-08 16:51:09 -04:00
Andrew McCreight
cf0193e16b Bug 1182318 - Part 2: Remove Closure from CycleCollectedJSRuntime. r=smaug
Closure is now just a wrapper around a single boolean, so instead pass a pointer to the boolean.
2015-07-14 08:01:00 -04:00
Andrew McCreight
b393aa72bf Bug 1182318 - Part 1: Remove Closure::mCb. r=smaug
This field no longer needs to be passed in the closure thanks to the iterator.
2015-07-14 08:01:00 -04:00
Olli Pettay
8c595e2828 Bug 1182277, don't leak when using nsAutoTArray inside nsTArray, r=nfroyd 2015-07-14 17:05:10 +03:00
Nicholas Nethercote
356d85f592 Bug 1180122 - Make Chaos Mode affect PLDHashTable's iterators. r=froydnj.
This makes the code less elegant, but that's unavoidable.
2015-07-03 00:27:27 -07:00
Alexandre Poirot
4df82cdc06 Bug 814497 - Cleanup console service cache when a window is destroyed. r=nfroyd 2015-07-09 06:49:00 -04:00
Birunthan Mohanathas
e52329c788 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
Michael Layzell
9511b77f2b Bug 1028132 - Remove mozilla::HasDangerousPublicDestructor<T>. r=mccr8 2015-07-07 18:45:00 -04:00
Nicholas Nethercote
31ca4b223d Bug 1182926 - Fix "observer-service-suspect" bustage. r=poiru. 2015-07-12 15:55:27 -07:00
Nicholas Nethercote
47d6587f73 Bug 1181411 - Test some expected aborts in PLDHashTable. r=glandium. 2015-07-12 18:50:21 -07:00
Wes Kocher
9c30d6953d Backed out changeset adf95d1cd0aa (bug 1173934) for fetch-frame-resource.https.html WPT orange and test_synthesized_response.js S4 orange CLOSED TREE 2015-07-10 15:59:01 -07:00
Wes Kocher
6782732de2 Backed out changeset df6593df027b (bug 1173912) 2015-07-10 15:58:24 -07:00
Ben Kelly
918ed053a7 Bug 1173912 Fail opaque responses for client requests. r=ehsan 2015-07-10 14:28:32 -07:00
Ben Kelly
6a200d95d9 Bug 1173934 Show a message if a docshell fails to load due to SW intercept failure. r=ehsan r=jdm 2015-07-10 14:28:32 -07:00
Wes Kocher
a89a1a1447 Backed out changeset 9814f77d258b (bug 1179924) for frequent random serviceworkers failures CLOSED TREE 2015-07-10 12:48:34 -07:00
Andrew McCreight
7340de08b8 Bug 1179924 - Create a more modern JS object holder for cross-thread references to JS objects. r=smaug 2015-07-10 07:41:33 -07:00
Nicholas Nethercote
e7e7541033 Bug 1181445 (part 13) - Use nsBaseHashTable::Iterator in xpcom/ds/. r=froydnj. 2015-07-09 16:54:59 -07:00
Nicholas Nethercote
4d241772da Bug 1181445 (part 12) - Use nsBaseHashTable::Iterator in xpcom/threads/. r=froydnj. 2015-07-09 16:54:59 -07:00
Nicholas Nethercote
8b5bd66a0f Bug 1181445 (part 11) - Use nsBaseHashTable::Iterator in xpcom/glue/. r=froydnj. 2015-07-09 16:54:59 -07:00
Nicholas Nethercote
fdf29836d5 Bug 1181445 (part 10) - Use nsBaseHashTable::Iterator in CycleCollectedJSRuntime. r=mccr8. 2015-07-09 16:54:59 -07:00
Nicholas Nethercote
8ed306e02d Bug 1181445 (part 9) - Use nsBaseHashTable::Iterator in nsConsoleService. r=froydnj. 2015-07-09 16:54:59 -07:00
Nicholas Nethercote
e9ffe574bf Bug 1181445 (part 8) - Use nsBaseHashTable::Iterator in SystemMemoryReporter. r=froydnj. 2015-07-09 16:54:59 -07:00
Nicholas Nethercote
6d4e3a6d5b Bug 1181445 (part 7) - Use nsBaseHashTable::Iterator in xpcom/reflect/. r=froydnj. 2015-07-09 16:54:59 -07:00
Nicholas Nethercote
079510d088 Bug 1181445 (part 6) - Use nsBaseHashTable::Iterator in xpcom/components/. r=froydnj.
Note that enumfunc_pentries and persistent_userstruct are unused, and so could
be removed.
2015-07-09 16:54:59 -07:00
Nicholas Nethercote
5434b5214c Bug 1181445 (part 5) - Use nsTHashTable::Iterator in nsTHashtable.h. r=mccr8.
This is a particularly nice example of how iterators can be so much nicer than
Enumerate()-style functions:

  1 file changed, 4 insertions(+), 33 deletions(-)
2015-07-09 16:54:59 -07:00
Nicholas Nethercote
afe7b7aefd Bug 1181445 (part 4) - Use nsTHashTable::Iterator in nsCategoryManager. r=froydnj. 2015-07-09 16:54:58 -07:00
Nicholas Nethercote
8a6e87eb69 Bug 1181445 (part 3) - Use nsTHashTable::Iterator in nsObserverService. r=froydnj. 2015-07-09 16:49:32 -07:00
Nicholas Nethercote
1840f58314 Bug 1181445 (part 2) - Use nsTHashTable::Iterator in nsMemoryReporterManager. r=froydnj. 2015-07-08 22:32:39 -07:00
Nicholas Nethercote
099f5c1870 Bug 1181445 (part 1) - Implement iterators for nsTHashtable and nsBaseHashtable. r=froydnj.
nsBaseHashtable has both EnumerateRead() and Enumerate(). A comment claims that
the latter locks the table, but this is false, so I removed the comment. Other
than that the only notable difference between them is that they have slightly
different types for dealing with values (|UserDataType| vs |DataType&|) so I've
implemented both GetUserData() and GetData(), allowing either type to be used.
2015-07-07 20:47:59 -07:00
Jim Mathies
ae4dea3e65 Bug 1128454 - Add crash report annotations for plugin bridge operation failures. r=billm 2015-07-09 19:07:49 -05:00
Randell Jesup
1a65dae1b5 Bug 1155059: Patch 3&7 - fix leaks in Promise, ConsoleService and JS Finalize r=froydnj 2015-07-09 23:21:46 -04:00
Randell Jesup
efc08ab894 Bug 1155059: Patch 4 - invoke NS_ASSERTION if DispatchToMainThread fails to get MainThread ptr r=froydnj 2015-07-09 23:21:46 -04:00
Randell Jesup
37ad9bc8b6 Bug 1155059: Patch 1&2 - Convert Dispatch() and friends to already_AddRefed<> r=froydnj
Modify Dispatch IDL and code to deal with MSVC issues with overloaded templates r=froydnj
2015-07-09 23:21:46 -04:00
Randell Jesup
a7a84b1acd Bug 1155059: Patch 0 - add do_AddRef() r=froydnj 2015-07-09 23:21:46 -04:00
Mike Hommey
2e6cb09122 Bug 833117 - Replace g_slice_set_config() with G_SLICE environment variable. r=nfroyd,r=karlt
Using g_slice_set_config() fails with newer glib because the slice allocator
now has a static constructor that runs when glib is loaded, consequently
emitting a noisy error message which confuses people into believing it's the
root of their problems.

The only way left to force the slice allocator to use "system" malloc (in
practice, jemalloc) is to set the G_SLICE environment variable to
always-malloc, and that needs to happen before glib is loaded.

Fortunately, the firefox and plugin-container executables don't depend on
glib. Unfortunately, webapprt does, so the problem remains for web apps
running through it. xpcshell and other executables that depend on libxul
directly (as opposed to loading it dynamically) are not covered either.
2015-07-10 09:56:05 +09:00
Randell Jesup
bf0dd2d19b Bug 1178890: Update timer arrays after sleep to account for time sleeping r=bwc,froydnj 2015-07-09 20:18:34 -04:00
Nathan Froyd
380868c9df 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
Nicholas Nethercote
24ab7bcdca Bug 1179071 - Merge RemovingIterator into Iterator. r=froydnj.
The original motivation for the Iterator/RemovingIterator split was that
PLDHashTable Checker class would treat them differently. But that didn't end up
happening (see bug 1131308). So this patch merges them. This is a small code
size win now but it will become bigger when I add iterators to nsTHashTable and
nsBaseHashtable.

The only complication is that PLDHashTable::Iter() is now non-const, which is
a problem if you use it in a const method. So I added PLDHashTable::ConstIter()
which is used in just two places. It's a bit of a hack -- effectively a
const_cast -- but I don't think it's too bad.
2015-07-06 22:02:26 -07:00
Nicholas Nethercote
0b6d896c26 Bug 1180084 - Convert TestPLDHash.cpp to a gtest. r=froydnj.
The switch to unsigned integer constants (e.g. "0u") are necessary to avoid
compiler warnings about signed/unsigned comparisons.
2015-07-07 17:54:03 -07:00
Birunthan Mohanathas
89f8804f4f Bug 968520 - Add nsTArray::Assign. r=froydnj 2015-07-07 11:27:03 -07:00
Dragana Damjanovic
c7fc0a288e Bug 905127 - Part 2 - remove unnecessary nsNetUtil.h includes r=jduell 2015-07-06 07:55:00 +02:00
Robert O'Callahan
3c3f108344 Bug 1143575. Avoid use of COMPARE macro which can clash with Android headers. r=bent 2015-06-07 12:26:40 +03:00
Nicholas Nethercote
b476985af5 Bug 1180072 - Remove PL_DHashTableEnumerate(). r=froydnj.
It's no longer used, and the Iterator classes are much nicer. Yay.
2015-06-18 22:19:10 -07:00
Bill McCloskey
b162c4e892 Bug 1177013 - Use CancelCurrentTransaction to avoid crashes (r=dvander) 2015-07-06 19:58:44 -07:00
Nicholas Nethercote
9e46a1c078 Bug 1131308 (part 1) - Improve PLDHashTable's internal checking. r=froydnj. 2015-05-20 23:11:35 -07:00
Nicholas Nethercote
dd9063908f Bug 1131308 (part 0) - Fix minor problems with RemovingIterator. r=froydnj.
- Its move constructor was moving |aOther.mTable| instead of |aOther|. This
  meant that |aOther| wasn't being zeroed out appropriately.

- test_pldhash_RemovingIterator() was testing Iterator's move constructor
  instead of RemovingIterator's move constructor, due to a copy/paste
  mistake.
2015-07-05 17:49:44 -07:00
Gabriele Svelto
4b943d4ca3 Bug 858928 - Switch XRE_StartupTimelineRecord() from PRTime to TimeStamp. r=froydnj 2015-07-06 18:01:09 +02:00
Andrea Marchesini
bfe593d668 Bug 1171603 - Better size check in nsTSubstring::ReplacePrep. r=ehsan 2015-07-06 14:27:35 -04:00
Fabrice Desré
e6be0311a5 Bug 1180533 - Disable BackgroundHangMonitor on gonk 2015-07-05 18:30:51 -07:00
Juan Gomez
21d73728f3 Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-07-03 18:29:00 -07:00
Phil Ringnalda
6d43ab4967 Back out 12 changesets (bug 1177013) on suspicion of causing b2g emulator debug test bustage
CLOSED TREE

Backed out changeset 912aae0815f8 (bug 1177013)
Backed out changeset 3b6448172e50 (bug 1177013)
Backed out changeset 2af18bef5703 (bug 1177013)
Backed out changeset e6bf35115c11 (bug 1177013)
Backed out changeset 4d7f5205b60b (bug 1177013)
Backed out changeset f7de893911bc (bug 1177013)
Backed out changeset de79eba232f0 (bug 1177013)
Backed out changeset 978a77b60f2a (bug 1177013)
Backed out changeset f5b52fa19511 (bug 1177013)
Backed out changeset e14a7b70b6fa (bug 1177013)
Backed out changeset d0f5a3474659 (bug 1177013)
Backed out changeset bff9f07dad52 (bug 1177013)
2015-07-02 22:08:54 -07:00
Bill McCloskey
af77069eb7 Bug 1177013 - Use CancelCurrentTransaction to avoid crashes (r=dvander) 2015-07-02 17:18:10 -07:00
Nicholas Nethercote
6122d59008 Bug 1179657 - Remove PL_DHASHMETER. r=froydnj.
Because it's totally busted and not a very good way of getting that kind of
statistics.
2015-07-01 22:59:53 -07:00
Hamzata Diallo
9a79d7372b Bug 1178513 - Export libxul symbols needed by ACL. r=mattwoodrow 2015-07-02 15:19:35 -07:00
Ryan VanderMeulen
9cd6cd7ca3 Backed out changeset 97c7e83acb6b (bug 1171603) for Windows Werror bustage.
CLOSED TREE
2015-07-02 15:33:10 -04:00
Andrea Marchesini
d9e5b0cca8 Bug 1171603 - Better size check in nsTSubstring::ReplacePrep. r=ehsan 2015-07-02 14:51:42 -04:00
Boris Kudryavtsev
68742d4ecb Bug 1155968 - Fix variable use before initialization. r=khuey 2015-06-02 12:17:00 +02:00
Boris Kudryavtsev
e5e9e9d064 Bug 1155968 - Fix correct number of empty lines between objects to comply with PEP8. r=khuey 2015-05-20 21:56:00 +02:00
Boris Kudryavtsev
dd64bfcd7e Bug 1155968 - Fix indentation warnings to comply with PEP8. r=khuey 2015-05-20 21:55:00 +02:00
Boris Kudryavtsev
73ede5653d Bug 1155968 - Whitespace fixes in xpidl.py to comply with PEP8. r=khuey 2015-05-16 12:18:00 +02:00
Boris Kudryavtsev
0958d700ab Bug 1155968 - Change '==' and '!=' to 'is' and 'is not' to comply with PEP8. r=khuey 2015-05-14 19:50:00 +02:00
Boris Kudryavtsev
ed6de56d10 Bug 1155968 - Correct indent not multiple of 4. r=khuey 2015-05-12 18:41:00 +02:00
Boris Kudryavtsev
8c1ddefa36 Bug 1155968 - Remove semicolons at ends of statements (PEP8). r=khuey 2015-05-09 12:38:00 +02:00
Boris Kudryavtsev
caec934f82 Bug 1155968 - Move statements to their own lines. r=khuey 2015-05-05 17:24:00 +02:00
Boris Kudryavtsev
a9551aa849 Bug 1155968 - Whitespace changes in header.py and runtests.py. r=khuey 2015-05-04 22:45:00 +02:00
Boris Kudryavtsev
bada76ff86 Bug 1155968 - Remove trailing whitespace in header.py. r=khuey 2015-05-04 22:41:00 +02:00
Boris Kudryavtsev
d028dd7f6f Bug 1155968 - Add blank lines where needed in xpcom/idl-parser. r=khuey 2015-05-04 22:35:00 +02:00
Boris Kudryavtsev
d1eb1b611b Bug 1155968 - Place imports on separate lines. r=khuey 2015-05-04 22:34:00 +02:00
William Chen
b672752886 Bug 1178513 - Add <extapp> element and interfaces to be used by ACL. r=khuey 2015-06-30 11:27:57 -07:00
Nathan Froyd
461098e261 Bug 1174344 - make error message for mismatched leak log entries more helpful; r=mccr8 2015-06-29 16:36:32 -04:00
Mike Hommey
bb576d901a Backout changeset f70b74488807 (bug 833117) for gtest bustage on Linux 2015-07-01 16:41:20 +09:00
Mike Hommey
c77a743583 Bug 833117 - Replace g_slice_set_config() with G_SLICE environment variable. r=nfroyd,r=karlt
Using g_slice_set_config() fails with newer glib because the slice allocator
now has a static constructor that runs when glib is loaded, consequently
emitting a noisy error message which confuses people into believing it's the
root of their problems.

The only way left to force the slice allocator to use "system" malloc (in
practice, jemalloc) is to set the G_SLICE environment variable to
always-malloc, and that needs to happen before glib is loaded.

Fortunately, the firefox and plugin-container executables don't depend on
glib. Unfortunately, webapprt does, so the problem remains for web apps
running through it. xpcshell and other executables that depend on libxul
directly (as opposed to loading it dynamically) are not covered either.
2015-07-01 15:29:46 +09:00
Ryan VanderMeulen
48b4249f49 Backed out changeset 37bee149c935 (bug 968520) for checktest failures. 2015-06-30 15:47:18 -04:00
Birunthan Mohanathas
0c2de052a3 Bug 968520 - Add nsTArray::Assign. r=froydnj 2015-06-30 11:16:03 -07:00
Jan de Mooij
61c36ee986 Bug 1177825 - Remove JSVAL_* constants. r=evilpie 2015-06-29 18:36:44 -07:00
Wes Kocher
8dd9876db4 Merge m-c to inbound, a=merge 2015-06-29 17:28:20 -07:00
ffxbld
2997272b35 Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2015-06-29 13:34:04 -07:00
Ryan VanderMeulen
9d5363caa0 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
Nicholas Nethercote
5f3d1cb2da Bug 1176163 - Remove remaining uses of PL_DHashTableEnumerate() from xpcom/. r=froydnj. 2015-06-18 18:09:37 -07:00
David Major
94d66538a9 Bug 1151506: Work around broken binary callers of xptiInterfaceInfo. r=froydnj 2015-06-26 10:33:44 -07:00
Nathan Froyd
8cff51fa1f 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
Nathan Froyd
e5f7077f9b Bug 1178363 - make nsTimerImpl::GetGeneration a private method; r=poiru
Since GetGeneration() is only called by nsTimerEvent, it doesn't need to
be public.
2015-06-29 13:09:11 -04:00
Nathan Froyd
26761c12a0 Bug 1178363 - make nsTimerImpl::PostTimerEvent a private method; r=poiru
PostTimerEvent is only called by the timer thread, which is already able
to access private members of nsTimerImpl; there's no reason for
PostTimerEvent to be public.
2015-06-29 10:33:30 -04:00
Nathan Froyd
f7e2d88bc7 Bug 1178363 - make MOZ_TASK_TRACER-dependent bits of nsTimerImpl private; r=poiru
GetTracedTask() is only called from nsTimerImpl itself, so it doesn't
need to be public.  GetTLSTraceInfo() is called from the timer thread,
which has access to our private members already.
2015-06-18 12:02:23 -04:00
Nathan Froyd
4f7d6bfd69 Bug 1178363 - make nsTimerImpl::Fire a private method; r=poiru
This method is only called by nsTimerEvent, which is an implementation
detail of nsTimerImpl.
2015-06-18 12:00:56 -04:00
Nathan Froyd
94f92e85f3 Bug 1178363 - make nsTimerImpl::SetDelayInternal a private method; r=poiru
Nothing outside nsTimerImpl uses it, and with a name like
"SetDelayInternal", nothing should.
2015-06-17 21:40:18 -04:00
Ryan VanderMeulen
55b2086097 Backed out changeset 8b4e4083639e (bug 1171931) for B2G debug emulator bustage. 2015-06-25 19:48:42 -04:00
Juan Gomez
98461fc4a4 Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-06-24 14:11:00 -04:00
David Major
2f80184007 Bug 1151506 - Null-check the count parameter in GetConstantCount. r=froydnj 2015-06-24 09:07:11 -07:00
Chris Peterson
ced822e043 Bug 1175049 - Fix non-universal 32-bit build on OS X with Xcode 6.3 tools. r=josh 2015-06-14 00:20:27 -07:00
Bill McCloskey
9de6fdd63f Bug 1143006 - Show warning for http-on-* in child process (r=mrbkap) 2015-06-19 17:35:06 -07:00
Benoit Girard
fa09f0548c Bug 1172216 - Move nsStackwalk to mozglue. r=glandium 2015-06-10 16:32:45 -04:00
Benoit Girard
198176edf9 Bug 858927 - Move the mozilla::TimeStamp into mozglue. r=glandium 2015-06-05 16:03:11 -04:00
Ryan VanderMeulen
30470a16f0 Bug 704368 - Re-enable test_nsIProcess_stress.js on Linux64 debug. 2015-06-18 11:28:51 -04:00
Carsten "Tomcat" Book
b8a0bf4eb3 merge mozilla-inbound to mozilla-central a=merge 2015-06-18 15:13:19 +02:00
Tom Tromey
3a7023a303 Bug 1159507 - make allocation times consistent with timeline; r=fitzgen,mccr8 2015-06-17 13:01:27 -07:00
Nicholas Nethercote
5a87cc336d Bug 1173600 (part 3) - Add PLDHashTable::RemovingIterator. r=froydnj. 2015-06-10 17:04:07 -07:00
Nicholas Nethercote
52d23574a5 Bug 1173600 (part 2) - Move post-enumeration shrinking code into its own function. r=froydnj.
This will allow it to be re-used by the removing iterator class.
2015-06-10 16:36:02 -07:00
Nicholas Nethercote
8d9b28eb13 Bug 1173600 (part 1) - Tweak PLDHashTable post-enumeration shrinking. r=froydnj.
This patch factors out the existing capacity calculation code in HashShift()
into a new function called BestCapacity(), and then reuses it for
post-enumeration shrinking.

BestCapacity() computes capacity with |CeilingLog2(ceil(length * 4 / 3))|,
which ensures a minimum capacity while respecting the "max 75% full" and
"capacity is a power of two" constraints. In contrast, the old post-enumeration
shrink calculation was |CeilingLog2(length + length/2)|, which gives higher
results in some cases. (Both calculations also ensured the capacity wasn't too
small.) E.g. if length is 48, the former calculation will give 64, while the
latter will give 128.

Therefore, post-enumeration shrinking will no longer give a
larger-than-necessary capacity some cases. This feels like the right thing to
do in isolation, and making it consistent with HashShift() -- used during table
construction -- is also good.
2015-06-10 13:54:06 -07:00
Boris Zbarsky
be5f64f66d Bug 1175601. Make nsIFile.getRelativeDescriptor work with paths with paths with arbitrary numbers of segments, not just 32. r=froydnj 2015-06-17 16:17:22 -04:00
Boris Zbarsky
f28dc01652 Bug 1175600. Add getRelativePath/setRelativePath to nsIFile. r=froydnj 2015-06-17 16:17:20 -04:00
Nicholas Nethercote
cc52eef894 Bug 11746250 (follow-up) - Fix link errors on Linux and Android. r=me. 2015-06-16 23:48:53 -07:00
Nicholas Nethercote
c2df231328 Bug 1174625 - Overhaul PLDHashTable's iterator. r=froydnj.
This change splits PLDHashTable::Iterator::NextEntry() into two separate
functions, which allow you to get the current element and advance the iterator
separately, which means you can use a for-loop to iterate instead of a
while-loop.

As part of this change, the internals of PLDHashTable::Iterator were
significantly changed and simplified (and modelled after js::HashTable's
equivalent code). It's no longer duplicating code from PL_DHashTableEnumerator.
The chaos mode code was a casualty of this, but given how unreliable that code
has proven to be (see bug 1173212, bug 1174046) this is for the best. (We can
reimplement chaos mode once PLDHashTable::Iterator is back on more solid
footing again, if we think it's important.)

All these changes will make it much easier to add an alternative Iterator that
removes elements, which was turning out to be difficult with the prior code.

In order to make the for-loop header usually fit on a single line, I
deliberately renamed a bunch of things to have shorter names.

In summary, you used to write this:

  PLDHashTable::Iterator iter(&table);
  while (iter.HasMoreEntries()) {
    auto entry = static_cast<FooEntry*>(iter.NextEntry());
    // ... do stuff with |entry| ...
  }
  // iter's scope extends beyond here

and now you write this:

  for (auto iter = table.Iter(); !iter.Done(); iter.Next()) {
    auto entry = static_cast<FooEntry*>(iter.Get());
    // ... do stuff with |entry| ...
  }
  // iter's scope doesn't reach here
2015-06-11 21:19:53 -07:00
Andrew McCreight
884c626161 Bug 1174796 - Make sure ReleaseNow releases everything. r=smaug 2015-06-16 14:19:07 -07:00
Shelly Lin
da24650cb8 Bug 1113562 - Expected delay time of tasks should not be the latency of those kind. r=sinker 2015-06-16 10:57:19 +08:00
Wes Kocher
8309735e4f Merge m-c to inbound, a=merge 2015-06-15 18:34:29 -07:00
Boris Zbarsky
0f5c0e6231 Bug 1174486 part 4. Stop reporting exceptions in nsJSUtils::EvaluateString and have its consumers use AutoJSAPIs that take ownership of error reporting instead. r=bholley 2015-06-15 20:11:06 -04:00
Ryan VanderMeulen
08b08792ad Merge m-c to fx-team. a=merge 2015-06-15 15:59:05 -04:00
Florian Quèze
55c7ff176c Bug 1109354 - prefer Firefox default engines over profile-installed plugins with the same name, r=markh. 2015-06-15 18:32:09 +02:00
Terrence Cole
d492e66bd8 Bug 1173889 - Strongly type the CallbackTracer dispatch function; r=jonco, r=mccr8 2015-06-11 10:03:33 -07:00
Ted Mielczarek
2364b31667 bug 1171574 - XPCOMGlue doesn't need LEADING_UNDERSCORE for iOS. r=froydnj 2015-02-10 15:36:37 -05:00
Ted Mielczarek
11d4d96764 bug 1171125 - Fix nsStackWalk to build for iOS. r=froydnj 2015-02-04 10:50:10 -05:00
Ted Mielczarek
6ae9e53d1f bug 1171124 - Swap some XP_MACOSX for XP_DARWIN in nsLocalFileUnix. r=froydnj 2015-02-04 10:49:45 -05:00
Ted Mielczarek
05eeddde70 bug 1170586 - Make TimeStamp::FromSystemTime available on iOS. r=froydnj 2015-01-30 15:32:48 -05:00
Ted Mielczarek
8eb7635f03 bug 1170585 - Don't try to build IO Poisoning on iOS. r=froydnj 2015-02-27 12:38:27 -05:00
Nicholas Nethercote
f9f823ff3c Bug 1174046 - Fix PLDHashTable::Iterator in chaos mode again. r=froydnj.
If you use PLDHashTable::Iterator in chaos mode with a table with zero
capacity, a |% 0| operation takes place in randomUint32LessThan. This change
avoids that.
2015-06-11 18:23:26 -07:00
Nicholas Nethercote
cb61a62b65 Bug 1172782 - Change how nsTHashtable::Clear() works. r=froydnj.
This change reimplements nsTHashtable::Clear() using PLDHashable::Clear(). This
changes its semantics slightly -- the old version would clear the table but
leave its capacity unchanged. The new version will adjust the capacity
to the default, though the entry storage will only be re-allocated when the
first new element is added.
2015-06-10 13:07:40 -07:00
Eric Rahm
52c1ca3766 Bug 1171722 - Part 4: Don't warn if DebuggerOnGCRunnable::Enqueue fails during shutdown. r=mccr8 2015-06-10 21:31:35 -07:00
Nicholas Nethercote
308955e28b Bug 1172761 (part 2) - Remove PL_DHashTableEnumerator use from nsPersistentProperties. r=froydnj.
The old code attempted to deal with any OOMs during this enumeration --
OOMs are possible because it's growing an nsCOMArray -- but failed to do so
correctly.

- It didn't check the return value of AppendObject().

- It did check that EntryCount() matched the return value of
  PL_DHashTableEnumerate(), but that's always (and vacuously) true.

The new code just returns NS_ERROR_OUT_OF_MEMORY if AppendObject() fails; this
is trivial now that it uses an iterator and doesn't have to call out to another
function.
2015-06-10 13:07:40 -07:00
Nicholas Nethercote
cd3feeddb4 Bug 1172761 (part 1) - Remove PL_DHashTableEnumerator use from nsAtomTable. r=froydnj. 2015-06-10 13:07:40 -07:00
Birunthan Mohanathas
0f2d0d6e4e Bug 968520 - Always require fallible argument with FallibleTArray calls. r=froydnj 2015-06-10 14:30:41 -07:00
Nick Fitzgerald
6df6b2623b Bug 1141614 - Part 3: Trace cycle collection with AutoGlobalTimelineMarker; r=smaug 2015-06-10 14:05:53 -07:00
Nicholas Nethercote
5d7a320705 Bug 1173212 (part 2) - Make PLDHashTable::Iterator work in chaos mode. r=froydnj.
Iterator::NextEntry() miscomputes |entryLimit|. This doesn't matter in
non-chaos mode because we'll always find a live entry before hitting that
limit. But it does matter in chaos mode because it means we don't wrap around
when we should.

It's clear how this mistake was made -- the code from Enumerate() was copied.
In Enumerate() |mEntryStore| and |entryAddr| are the same when |entryLimit| is
computed, so you can use them interchangeably. But in NextEntry() |mEntryAddr|
will have moved past |mEntryStore|, so you have to use |mEntryStore|. I changed
both functions in the same way to keep the correspondence between them obvious.
2015-06-10 12:47:18 -07:00
Nicholas Nethercote
a02aa73be7 Bug 1173212 (part 1) - Remove some can't-fail tests in PLDHashTable. r=froydnj. 2015-06-10 12:47:18 -07:00
Eric Rahm
353c3fadf4 Bug 1171716 - Part 1: Add NS_ReleaseOnMainThread. r=froydnj 2015-06-10 08:33:27 -07:00
Chris Peterson
b906c6bb2c Bug 1026761 - CID 749761: nsAStreamCopier::Process can use sourceCondition, sinkCondition uninitialized. r=froydnj 2015-06-06 12:35:37 -07:00
Edwin Flores
6e95c9765a Bug 1172393 - Let XPCOM shutdown properly on Windows versions later than XP - r=mccr8 2015-06-10 14:39:05 +12:00
Wes Kocher
4517da5efb Backed out 5 changesets (bug 1171716) for android bustage
Backed out changeset 4986f8464f9c (bug 1171716)
Backed out changeset bc8405b07d10 (bug 1171716)
Backed out changeset 10e18e494630 (bug 1171716)
Backed out changeset be499a3cae5d (bug 1171716)
Backed out changeset f75717d3eba0 (bug 1171716)
2015-06-09 18:48:37 -07:00
Eric Rahm
b076f68075 Bug 1171716 - Part 1: Add NS_ReleaseOnMainThread. r=froydnj 2015-06-09 18:25:43 -07:00
Eric Rahm
5ce0f1f98b Bug 1172138 - Call PR_LogInit before profiler_init. r=froydnj 2015-06-09 17:44:46 -07:00
Birunthan Mohanathas
ab3a4dbee7 Bug 968520 - Add more fallible variants of nsTArray::InsertElementsAt. r=froydnj 2015-06-09 17:27:31 -07:00
Birunthan Mohanathas
342ba3d351 Bug 968520 - Add fallible variants of nsTArray::InsertElementSorted. r=froydnj 2015-06-08 13:39:57 -07:00
Birunthan Mohanathas
5acd40a297 Bug 968520 - Make nsTArray::InsertElementSorted support moves. r=froydnj 2015-06-08 13:39:53 -07:00
Birunthan Mohanathas
865133305b Bug 968520 - Add mozilla::fallible to FallibleArray calls in tests. r=froydnj 2015-06-08 13:39:49 -07:00
Ryan VanderMeulen
2913387549 Backed out 5 changesets (bug 1141614) for browser_timelineMarkers-02.js failures.
Backed out changeset 1db2b848699a (bug 1141614)
Backed out changeset 9becec7879dc (bug 1141614)
Backed out changeset fff492fc48ce (bug 1141614)
Backed out changeset f49e64db4a66 (bug 1141614)
Backed out changeset 63199013dac2 (bug 1141614)

CLOSED TREE
2015-06-09 13:20:24 -04:00
Nick Fitzgerald
5d181048fc Bug 1141614 - Part 3: Trace cycle collection with AutoGlobalTimelineMarker; r=smaug 2015-06-08 12:40:07 -07:00
Carsten "Tomcat" Book
48583b4851 merge mozilla-inbound to mozilla-central a=merge 2015-06-08 11:55:30 +02:00
Andrew McCreight
49aee5d5fa Bug 1152079 - Remove references to deleted Purify files from moz.build. r=bustage 2015-06-06 14:49:42 -07:00
Andrew McCreight
299f877f7c Bug 1152079 - Remove Purify support files. r=froydnj 2015-06-06 14:37:59 -07:00
Nicholas Nethercote
0019b45ad0 Bug 1171323 - Remove PL_DHashFreeStringKey(), because it's dead. r=froydnj. 2015-06-04 16:14:37 -07:00
Nikhil Marathe
34015f7ab9 Bug 1166504 - Make nsMultiplexInputStream cloneable. r=bkelly,froydnj 2015-06-02 16:12:57 -07:00
Andrew McCreight
16d2cce116 Bug 1163006, part 5 - Add a less COM-y getter for mWantAllTraces. r=smaug 2015-06-04 14:41:31 -07:00
Andrew McCreight
ae0d1907ba Bug 1163006, part 4 - De-COM the nsICycleCollectorListener methods we only call from C++. r=smaug 2015-06-04 14:41:31 -07:00
Andrew McCreight
bf07d59c96 Bug 1163006, part 3 - Clean up some cycle collector logger set up code. r=smaug
There's no need for the local variable.
2015-06-04 14:41:31 -07:00
Andrew McCreight
baa7619de8 Bug 1163006, part 2 - Rename various cycle collector listener variables to logger. r=smaug 2015-06-04 14:41:31 -07:00