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

16524 Коммитов

Автор SHA1 Сообщение Дата
Andreas Farre 67964eb4e6 Bug 1371274 - Don't call SetDeadline on receivers without one. r=froydnj
Check if the receiver has SetDeadline and use a specialization that
doesn't use it if it isn't present. This makes it possible to call:

NewIdleRunnable(obj, Obj::Method)

where Obj doesn't need to implement SetDeadline. This makes it easier
to avoid unnecessary wrappers.

--HG--
extra : rebase_source : 83c30b0590475d65b072b41c466321330af07dc7
2017-06-16 07:50:00 +02:00
Ehsan Akhgari c342914631 Bug 1373996 - Make nsTObserverArray::RemoveElementsBy() take a template argument; r=froydnj
This avoids a dynamic allocation in EventListenerManager::HandleEventInternal().
2017-06-19 14:27:39 -04:00
Ehsan Akhgari 5ad8772be5 Bug 1374033 - Remove double bounds checking from the next accessors of the iterator classes of nsTObserverArray; r=froydnj 2017-06-19 14:13:32 -04:00
Nicholas Nethercote 5d3808c6e5 Bug 1373436 (part 4) - Use UniquePtr with profile_add_marker(). r=mstange.
Once the |aPayload| argument to profile_add_marker() became a UniquePtr the
default value of nullptr caused compilation difficulties that could only be
fixed by #including ProfilerMarkerPayload.h into lots of additional places
(because the UniquePtr<T> instantiation required the T to be fully defined). To
get around this I just split profile_add_marker() into two functions, one with
1 argument and one with 2 arguments.

The patch also removes the definition of PROFILER_MARKER_PAYLOAD in the case
where MOZ_GECKO_PROFILER isn't defined. A comment explains why.
2017-06-16 12:26:26 +10:00
Sebastian Hengst 1f7d31312c merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-06-18 20:50:40 +02:00
Mats Palmgren e4f9fc369e Bug 1372317 part 3 - Remove nsBaseHashtable::LookupRemoveIf() since it's not used anymore. r=froydnj
Also, change the gtest to test Lookup() and Lookup().Remove()
in various forms.

MozReview-Commit-ID: 6AguNDhcR5W
2017-06-18 17:07:54 +02:00
Mats Palmgren a57cd6c138 Bug 1372317 part 1 - Introduce a nsBaseHashtable::Lookup() method that allows modifying the value and optionally remove the entry. r=froydnj
MozReview-Commit-ID: AcNBQvTMnX8
2017-06-18 17:07:54 +02:00
Mats Palmgren 95f7896de5 Bug 1371928 - Add a new EnsureInserted() method that return true if a new entry was created, and EnsureRemoved() that return true if an existing entry was removed. r=froydnj
As opposed to PutEntry/RemoveEntry which do not indicate what happened.

MozReview-Commit-ID: LeNKDqpSksR
2017-06-17 00:06:04 +02:00
Sebastian Hengst efd723cdad merge mozilla-central to autoland. r=merge 2017-06-18 00:21:41 +02:00
Masatoshi Kimura 3231cb3535 Bug 1372886 - Remove dead parameters from nsIConverterInputStream.init(). r=hsivonen
MozReview-Commit-ID: GliLHLsUWjt

--HG--
extra : rebase_source : 50d3f4680a498125ddf600b0d64f6740b0229f80
2017-06-17 19:30:09 +09:00
Bill McCloskey 0767e31489 Bug 1372736 - Avoid using AbstractThread for non-media MozPromises (r=bkelly)
MozReview-Commit-ID: BBi0pK4DXxf
2017-06-15 20:16:25 -07:00
Bill McCloskey 1158c7c282 Bug 1372733 - EventTargetFor should return an nsISerialEventTarget (r=bkelly)
MozReview-Commit-ID: Kchg4kqBERt
2017-06-15 20:16:25 -07:00
Eitan Isaacson 309b4202e7 Bug 1366837 - Add AccessibleHandler registration info to aboutSupport. r=smaug r=aklotz 2017-06-15 15:55:06 -07:00
Michael Layzell b2730ca921 Bug 1373281 - Null-check mStackToFill before collecting psuedostacks, r=froydnj
This was causing a crash on nightly. The browser would try to collect only a
native stack, and then attempt to dereference the null pointer for the
pseudostack. I think this didn't happen on infra as it only occurs when the user
has hung a sufficient number of times.

MozReview-Commit-ID: 6RSW2llKBjT
2017-06-15 17:04:42 -04:00
Florian Quèze 65e6947718 Bug 1373053 - nsObserverService::NotifyObservers should add a pseudo stack frame showing the topic of the notification, r=mstange. 2017-06-15 00:58:25 +02:00
Bill McCloskey d7df561295 Bug 1372426 - More detailed names for nsInputStreamReadyEvent (r=erahm)
MozReview-Commit-ID: 6beE0eMCxg7
2017-06-14 14:44:04 -07:00
Michael Layzell 7121551189 Bug 1357829 - Part 2: Use profiler_suspend_sample_thread in the background hang monitor, r=froydnj
This patch uses the profiler_suspend_sample_thread method which was added in
part 1.

With this patch, we no longer manually run code to pause the target thread,
instead using the profiler's provided code to do so. In addition, we no longer
manually walk the stack to collect native stack frames, instead relying on the
profiler's cross-platform stack walking logic.

This helps remove some of the code from ThreadStackHelper which was redundant
with the profiler. Much of the pseudostack code in ThreadStackHelper is also
redundant, and should hopefully be eliminated in a follow-up.

MozReview-Commit-ID: 4RjLHt6inH9
2017-06-14 12:27:49 -04:00
Ehsan Akhgari 562c07cb88 Bug 1371728 - Don't honor the idle period during shutdown; r=smaug 2017-06-14 08:27:39 -04:00
Jan de Mooij 83f290de99 Bug 1370608 part 1 - Move newEnumerate hook from ObjectOps to ClassOps. r=evilpie,bz 2017-06-14 10:37:44 +02:00
Wes Kocher 6c1a0ae549 Backed out 6 changesets (bug 1371699) for various failures including frequent img-blobURI-2.html failures and leaks a=backout
Backed out changeset 67a27cf0ab80 (bug 1371699)
Backed out changeset 7e494fa90087 (bug 1371699)
Backed out changeset 30405ec37e1e (bug 1371699)
Backed out changeset 2d67624a01dc (bug 1371699)
Backed out changeset 503c9d22e6bb (bug 1371699)
Backed out changeset eedcb67a9fb6 (bug 1371699)

MozReview-Commit-ID: 4HydLjK7Ond
2017-06-13 17:50:11 -07:00
Wes Kocher e883883e7c Backed out changeset 45b5cadadc22 (bug 1372426) because it's blocking a backout a=backout
MozReview-Commit-ID: Jl0zxef8R9k
2017-06-13 17:48:38 -07:00
Mats Palmgren efb3f5fa2f Bug 1371094 part 2 - Add some tests for the LookupForAdd/OrInsert/LookupRemoveIf methods. r=froydnj
MozReview-Commit-ID: 4TgtCwyvBQt
2017-06-14 01:03:38 +02:00
Mats Palmgren a4d601d6c4 Bug 1371094 part 1 - Move the nsClassHashtable::LookupForAdd() method to nsBaseHashtable. r=froydnj
Also change nsClassHashtable::LookupOrAdd to not regard existing entries with
a nullptr value as non-existent.  This is to make it consistent with
nsBaseHashtable::LookupForAdd() and other methods.

MozReview-Commit-ID: 1wYqK8XQbyW
2017-06-14 01:03:38 +02:00
Bill McCloskey 1b366c9ec9 Bug 1372426 - More detailed names for nsInputStreamReadyEvent (r=erahm)
MozReview-Commit-ID: 6beE0eMCxg7
2017-06-13 15:24:08 -07:00
Wes Kocher fdca69feeb Backed out changeset e8a63038d787 (bug 1372426) for build failures in nsStringStream.cpp a=backout
MozReview-Commit-ID: 8ci8nKoiLhz
2017-06-13 15:20:12 -07:00
Bill McCloskey 7efe80ba16 Bug 1372426 - More detailed names for nsInputStreamReadyEvent (r=erahm)
MozReview-Commit-ID: 6beE0eMCxg7
2017-06-13 14:53:26 -07:00
Bill McCloskey d44ca1b9a4 Bug 1371080 - Use GetCurrentVirtualThread for XPCOM thread safety checks (r=froydnj)
MozReview-Commit-ID: 4fSphF86cDK
2017-06-13 14:51:11 -07:00
Bill McCloskey 5066de8593 Bug 1366072 - MozPromise tests (r=jwwang)
MozReview-Commit-ID: 69OQb1f3UTd
2017-06-13 14:51:07 -07:00
Bill McCloskey c85ab6308c Bug 1366072 - Change promises to take nsISerialEventTarget instead of AbstractThread (r=jwwang)
MozReview-Commit-ID: 4azUhSB6whu
2017-06-13 14:51:01 -07:00
Bill McCloskey 40acc9e3a0 Bug 1366072 - Make AbstractThread inherit from nsISerialEventTarget (r=jwwang)
MozReview-Commit-ID: 5L3gUEyGfyL
2017-06-13 14:50:58 -07:00
Bill McCloskey 90c9540b82 Bug 1366072 - Remove useless ThenCommand::mResponseThread field (r=jwwang)
MozReview-Commit-ID: F9shMirkSiu
2017-06-13 14:50:56 -07:00
Eric Rahm ab9516d40d Bug 1353593 - Part 2: Remove wwc functions. r=froydnj
This removes the use of |wwc| functions in favor of char16ptr_t's implicit
conversion operators.

MozReview-Commit-ID: GHONYieMPla
2017-06-12 16:20:49 -07:00
Boris Zbarsky 319fd7b3aa Bug 1371699 part 6. Implement nsIAsyncInputStream for nsStringInputStream. r=bkelly 2017-06-13 16:16:58 -04:00
Boris Zbarsky 5193353a61 Bug 1371699 part 4. Make nsIMultiplexInputStream not inherit from nsIInputStream. r=bkelly
This is a preexisting issue that makes nsMultiplexInputStream multiple-inherit
from nsIInputStream: once via nsIMultipartInputStream and once via
nsIAsyncInputStream.  This causes problems once we end up with more multiplex
streams that are async streams, because then some assingments to
nsCOMPtr<nsIInputStream> start asserting.  This patch just removes the footgun
by getting rid of the multiple inheritance.
2017-06-13 16:16:39 -04:00
Boris Zbarsky 3d884086c3 Bug 1371699 part 3. Make nsIStringInputStream not inherit from nsIInputStream anymore. r=bkelly
This will prevent ambiguous nsIInputStream inheritance once we also inherit from nsIAsyncInputStream.
2017-06-13 16:16:23 -04:00
Boris Zbarsky 4c7424ec25 Bug 1371699 part 2. Implement nsICancelableRunnable on AsyncWaitRunnable. r=bkelly
It's just luck that we haven't ended up with a multiplex stream on workers that contains at least one async stream.
2017-06-13 16:16:07 -04:00
Boris Zbarsky d071e405b2 Bug 1371699 part 1. Give nsStringInputStream an mStatus variable. r=bkelly
This will make it simple to implement CloseWithStatus.
2017-06-13 16:16:04 -04:00
Michael Layzell cc6563e878 Bug 1369594 - Get module information for BHR off main thread, r=froydnj
MozReview-Commit-ID: L0ANHNKKAkY
2017-06-16 14:55:15 -04:00
Olli Pettay 2edc8a2488 bug 1358898, ensure AsyncFreeSnowWhite is run often enough, r=mccr8,nfroyd 2017-06-16 20:00:04 +03:00
Carsten "Tomcat" Book 583566fabf Backed out changeset 301e80f20046 (bug 1372405) for bustage
--HG--
extra : rebase_source : e878e085dc4f872e3af0d9f98337ac6d2e86f37a
2017-06-20 08:27:17 +02:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Carsten "Tomcat" Book 3b7856021f Backed out changeset ac1e2098e59e (bug 1372405)
--HG--
extra : rebase_source : 6cd7f407dd9c0ed1449cfa3efe72e72db3c18e32
2017-06-20 08:26:57 +02:00
Carsten "Tomcat" Book 1083602212 Backed out changeset 4d33d0e50338 (bug 1372405)
--HG--
extra : rebase_source : e615bdaa0bca09ea4b39c732dd952d2faddb8207
2017-06-20 08:26:56 +02:00
Bill McCloskey 78272721a6 Bug 1372405 - Remove NewRunnable functions that lack a name param (r=froydnj)
MozReview-Commit-ID: vGCnkBey03
2017-06-19 22:25:47 -07:00
Bill McCloskey b37fc62051 Bug 1372405 - Delete default Runnable ctor so name must be provided (r=froydnj)
MozReview-Commit-ID: 9L4UoBJWzQ3
2017-06-19 22:25:47 -07:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Bill McCloskey 8fb9da1035 Bug 1372405 - Change SchedulerGroup::GetName so it doesn't delegate to mozilla::Runnable (r=froydnj)
Delegating to mozilla::Runnable caused us to return the wrong value once
SchedulerGroup started passing a non-empty name to the Runnable constructor.

MozReview-Commit-ID: 2zMlpiMnHwv
2017-06-19 22:20:08 -07:00
Bevis Tseng d1637b9c5a Bug 1372453 - Part 2: Name the caller of ProxyReleaseEvent. r=billm
MozReview-Commit-ID: LYhSWnZkq0i
2017-06-14 09:27:17 +08:00
Bevis Tseng 03f90b6e33 Bug 1372453 - Part 1: Support to name the callers of ProxyReleaseEvent. r=froydnj
MozReview-Commit-ID: 8rmwqzPrzM7
2017-06-13 18:10:13 +08:00
Henry Chang 2e272c0cd8 Bug 1355746 - Part 3. Test cases for IdleTaskRunner. r=smaug
MozReview-Commit-ID: 3RsC1pT9Fzc

--HG--
extra : rebase_source : d91cbd4da3c45c4d07159ecd80427d46fd10cd25
extra : intermediate-source : 59ea54d209ac6d47df340e9ff185b01f09afb995
extra : source : a14555b477d6c46d2ab75df7935d2af327e73cc3
2017-06-15 17:32:01 +08:00
Henry Chang a221ac674f Bug 1355746 - Part 2. Polish IdleTaskRunner and reuse it for background parsing. r=smaug
This patch is mainly to make IdleTaskRunner reusable by nsHtml5TreeOpExecutor.
The only necessary work to that purpose is to remove the dependency of
sShuttingDown, which was a static variable in nsJSEnvironment.cpp.
The idea is to have a "ShouldCancel" as a callback for the consumer to
return sShuttingDown.

In addition to sShuttingDown, we use std::function<bool()> as the runner
main callback type.

MozReview-Commit-ID: FT2X1unSvPS

--HG--
extra : rebase_source : cfd99aba19f014327875683f5ea85d183c8af674
extra : intermediate-source : 99af874c7b1d278057194894d406474b8af07349
extra : source : 792359c898f68241e1373820ea8fd3ba18b09994
2017-06-15 15:51:29 +08:00
Henry Chang e13aeee5fd Bug 1355746 - Part 1. Rename CollectRunner to IdleTaskRunner and move to xpcom/threads/IdleTaskRunner.h/cpp r=smaug
Nothing is changed in this patch except for renaming and code move around.
The strategy is to have the final file setup in this patch without any
detail change. The actual code change will be in the next patch so that
we can focus on reviewing the diff in the next patch regarding IdleTaskRunner.

MozReview-Commit-ID: 4Bul9mZ7z1n

--HG--
extra : rebase_source : 21d7d601c70304d69100d96cecfdb3e0322cb777
extra : intermediate-source : 366862231c26e085fe749012a09418aa31936224
extra : source : 7b4e77911d1471c33fda0a43b50ed17c5274e795
2017-06-15 14:47:56 +08:00
Wes Kocher a6d47c0012 Merge m-c to inbound, a=merge
MozReview-Commit-ID: KowMPlgSlAW
2017-07-06 16:17:24 -07:00
Kris Maglione 6684dd79a5 Bug 1377538: Store blocklistState and blocklistURL in the add-ons DB. r=rhelmer
MozReview-Commit-ID: AQx51Vn0R4R

--HG--
extra : rebase_source : 9efd6306c2b6b9d1e315a8baec7086aa7101e7df
2017-07-03 18:05:52 -07:00
Perry Jiang 45ea222ca2 Bug 1357154 - Cache Windows executable path after BinaryPath::Get is called in main. r=ehsan
MozReview-Commit-ID: Qby9b4ngz2
2017-06-22 10:56:04 -07:00
Aaron Klotz 77f4e5b25c Bug 1372422: Make mozilla::HangMonitor::IsUIMessageWaiting always return false in content processes; r=jimm
MozReview-Commit-ID: 3OoH1ptkyeL
2017-06-12 17:19:50 -06: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
Henri Sivonen 432653453a Bug 1261841 part 2 - Use encoding_rs instead of uconv. r=emk,mystor.
MozReview-Commit-ID: 15Y5GTX98bv
2017-06-13 13:23:23 +03:00
Nicholas Nethercote 0be77baa96 Bug 1370329 (part 1) - Clean up the profiler's RAII classes. r=mstange.
This patch does the following renamings, which increase consistency.

- GeckoProfilerInitRAII -> AutoProfilerInit
- GeckoProfilerThread{Sleep,Wake}RAII -> AutoProfilerThread{Sleep,Wake}
- GeckoProfilerTracingRAII -> AutoProfilerTracing
- AutoProfilerRegister -> AutoProfilerRegisterThread
- ProfilerStackFrameRAII -> AutoProfilerLabel
- nsJSUtils::mProfilerRAII -> nsJSUtils::mAutoProfilerLabel

Plus a few other minor ones (e.g. local variables).

The patch also add MOZ_GUARD_OBJECT macros to all the profiler RAII classes
that lack them, and does some minor whitespace reformatting.

--HG--
extra : rebase_source : 47e298fdd6f6b4af70e3357ec0b7b0580c0d0f50
2017-06-07 12:33:19 +10:00
Bill McCloskey bd66079b0c Bug 1371127 - Use GetCurrentVirtualThread() in MediaManager (r=jesup)
MozReview-Commit-ID: 2Wf9Ln8TMOx
2017-06-12 20:21:43 -07:00
Bill McCloskey 2ab0191db6 Bug 1365102 - Convert NS_GetCurrentThread uses in xpcom/ (r=froydnj)
MozReview-Commit-ID: 69qVzf8QJMq
2017-06-12 20:21:43 -07:00
Bill McCloskey 171ac66ce4 Bug 1361164 - Add Get{Current,Main}ThreadEventTarget getters to replace NS_Get{Current,Main}Thread (r=froydnj)
We want people to transition to using event targets rather than threads when possible. These
getters should make it easier to make that change.

MozReview-Commit-ID: 3bN4tRgJjBL
2017-06-12 20:20:08 -07:00
Bill McCloskey 595e5d79c8 Bug 1361164 - Add nsISerialEventTarget (r=froydnj)
MozReview-Commit-ID: 8y1GdEGCPSB
2017-06-12 20:20:08 -07:00
Bill McCloskey 5ddda3bb77 Bug 1361164 - Add infallible IsOnCurrentThread to nsIEventTarget (r=froydnj)
MozReview-Commit-ID: 12bk9hQ7Wnv
2017-06-12 20:20:08 -07:00
Eric Rahm 32235488fc Bug 1370644 - Part 1: Only use NS_ERROR for an imminent failure. r=froydnj
This modifies the logic in |CheckAcquisition| to only call |NS_ERROR| if we're
really going to deadlock. Instead, if we detect a suspicious cycle, we just use
an |NS_WARNING|. This means that we'll still output warning text in debug
builds, but we won't cause the process to abort.

MozReview-Commit-ID: 71mFInWwbDY
2017-06-12 16:53:04 -04:00
Andrea Marchesini a698cd8d63 Bug 1372272 - AsyncStreamHelper::OnInputStreamReady() should be NOP if calling AsyncWait() in one of the substreams fails in ::Run(), r=bz 2017-06-12 19:45:05 +02:00
ffxbld 120e57745f Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2017-06-12 13:48:15 +01:00
Gerald Squelart 9438822797 Bug 1371880 - Use Variant with indexed access in MozPromise::ResolveOrRejectValue - r=jwwang
MozReview-Commit-ID: 4vobU19ebaX

--HG--
extra : rebase_source : fe1e73a3fdf3a5d612a41b53aca9c9f2ea363456
2017-06-12 11:19:58 +12:00
Arthur Edelstein 355ed44adc Bug 1344034 - Auto-enforce W^X for WindowsDllInterceptor hook pages. r=dmajor 2017-06-09 14:44:00 -04:00
Sebastian Hengst 943953276a Backed out changeset 091c5613b5cf (bug 1370644) for failing GTest XPCOMDeadlockDetectorTest.XPCOMSanity3DeathTest | Death test: Sanity3_Child(). r=backout 2017-06-10 10:34:03 +02:00
Sebastian Hengst 83ef207cf7 Backed out changeset 11c7b498a836 (bug 1353593) 2017-06-10 10:04:13 +02:00
Olli Pettay c6e5adc488 Bug 1371438, investigate why assertion fails on Windows, r=bkelly 2017-06-10 03:21:29 +03:00
Eric Rahm d213203a86 Bug 1353593 - Part 2: Remove wwc functions. r=froydnj
This removes the use of |wwc| functions in favor of char16ptr_t's implicit
conversion operators.

MozReview-Commit-ID: GHONYieMPla
2017-06-09 17:00:24 -07:00
Eric Rahm e1cf6f5041 Bug 1370644 - Part 1: Only use NS_ERROR for an imminent failure. r=froydnj
This modifies the logic in |CheckAcquisition| to only call |NS_ERROR| if we're
really going to deadlock. Instead, if we detect a suspicious cycle, we just use
an |NS_WARNING|. This means that we'll still output warning text in debug
builds, but we won't cause the process to abort.

MozReview-Commit-ID: 71mFInWwbDY
2017-06-09 16:09:17 -07:00
Wes Kocher d49e092dc0 Backed out 2 changesets (bug 1353593) for windows build bustage a=backout
Backed out changeset c16b53fc17d9 (bug 1353593)
Backed out changeset 4bc441fc5860 (bug 1353593)

MozReview-Commit-ID: F2pCPyEOmwn
2017-06-09 15:17:57 -07:00
Eric Rahm 10538136d5 Bug 1353593 - Part 2: Remove wwc functions. r=froydnj
This removes the use of |wwc| functions in favor of char16ptr_t's implicit
conversion operators.

MozReview-Commit-ID: GHONYieMPla
2017-06-09 14:50:47 -07:00
Ehsan Akhgari cb3e227493 Bug 1371279 - Try to use reserved stack space instead of heap allocation in nsLocalFile::GetNativeTarget(); r=froydnj 2017-06-09 01:14:16 -04:00
Michael Layzell e8c6bd15df Bug 1368524 - Add a telemetry probe for how long we spend processing NotifyObservers callbacks, dr=bsmedberg, r=ehsan
MozReview-Commit-ID: KWypjvFscVu
2017-06-08 13:58:31 -04:00
Carsten "Tomcat" Book 247a47fac9 Merge mozilla-central to mozilla-inbound 2017-06-08 15:16:36 +02:00
Carsten "Tomcat" Book b9d94b34d4 merge mozilla-inbound to mozilla-central a=merge 2017-06-08 14:43:56 +02:00
Mats Palmgren c4730f96bb Bug 1371061 - Optimize nsBaseHashtable::GetOrInsert() to only do a single hashtable lookup. r=froydnj
MozReview-Commit-ID: 6muOorLplG1
2017-06-08 12:48:32 +02:00
Stephen A Pohl 630acd56de Bug 1364984 - Ensure that our sandbox and tests can handle temp directory paths using symlinks on macOS. r=haik,aswan 2017-06-07 20:40:58 -04:00
Colin Dean 0f028d9bc9 Bug 1364984 - use non-deprecated API for finding the temporary directory on OS X; r=mstange
FSFindFolder is deprecated as of 10.9 and apparently continues to
work...except for the case of finding the temporary directory when the
user's home directory lives on an NFS mount (!).  Using
NSTemporaryDirectory does The Right Thing here, so let's use that instead.
2017-06-07 20:40:50 -04:00
Ryan VanderMeulen 9b7a73b65a Merge m-c to autoland. a=merge
UPGRADE_NSPR_RELEASE UPGRADE_NSS_RELEASE

--HG--
extra : amend_source : a59e53ba2f8db608f613f21ad6da2b5be8814aa4
2017-06-07 22:55:56 -04:00
Andreas Farre cf4cd748f1 Bug 1292600 - Add telemetry to measure how idle budgets are used. r=froydnj, data-r=bsmedberg 2017-06-07 16:14:42 +02:00
Mats Palmgren 6467c38383 Bug 1370632 - Move LookupRemoveIf() to nsBaseHashtable instead so that it can be used on more hashtables types. r=froydnj
MozReview-Commit-ID: 9kQSytPWok5
2017-06-07 15:22:41 +02:00
Mats Palmgren 0630f5b2bf Bug 1367207 part 3 - Introduce nsClassHashtable::LookupRemoveIf() for consumers that wants to do a Get() then inspect/modify the value then, maybe, Remove() the entry. This is to avoid a second hashtable lookup for the Remove(). r=froydnj
Also, make RemoveAndForget() use RemoveEntry(), not Remove(), to remove
the entry to avoid a second hashtable lookup.

MozReview-Commit-ID: Bj5Heo8YLFJ
2017-06-07 15:22:41 +02:00
Nathan Froyd cee39716e5 Bug 1370606 - fix fallible nsRefPtrHashtable::Put to really be fallible; r=erahm
Calling the infallible PutEntry effectively makes this function
infallible, despite Put taking a fallible_t argument.
2017-06-06 21:06:17 -04:00
Nathan Froyd cb5ef308b6 Bug 1370593 - avoid redundant lookups in nsRefPtrHashtable::Remove; r=mats
We already have a handle to the entry in the hashtable, we can remove
that directly, rather than implicitly looking up the entry to remove in
Remove().
2017-06-06 21:06:17 -04:00
Wes Kocher bb1d061819 Merge inbound to central, a=merge CLOSED TREE
UPGRADE_NSS_RELEASE UPGRADE_NSPR_RELEASE

MozReview-Commit-ID: 2CXltQtu4Y1

--HG--
extra : amend_source : 16333c0fa5342dfbbb2a4ded71f94119a022e27b
2017-06-06 17:15:21 -07:00
Ehsan Akhgari 19d6dc61bb Bug 1368286 - Take the idle queue into account in nsThread::HasPendingEvents(); r=smaug 2017-06-06 12:37:27 -04:00
Mike Hommey e9c25fa403 Bug 1369622 - Restore static asserts for lack of arguments on some macros. r=froydnj
Bug 1368932 removed MOZ_STATIC_ASSERT_VALID_ARG_COUNT because it didn't
actually work for large numbers of arguments. But it was kind of useful
for macros that expand to something broken when they are given no
variadic argument at all.

Now that we have a macro that doesn't require tricks to count empty
arguments lists, however, we can use straightforward static_asserts
instead of a generic macro, which has the side effect of providing more
context in the error message.

--HG--
extra : rebase_source : 223f85c2c5cc7b3fa8c584b70bb084784fb5764a
2017-06-02 15:07:58 +09:00
Mike Hommey 8914ace4ce Bug 1369622 - Use MOZ_ARG_COUNT instead of MOZ_PASTE_PREFIX_AND_ARG_COUNT. r=froydnj
In a couple places, MOZ_PASTE_PREFIX_AND_ARG_COUNT is used to only count
the number of arguments, we can now use MOZ_ARG_COUNT directly for that.

--HG--
extra : rebase_source : 1064e4cc231863dc4aff83ee6bc90d318b4be418
2017-06-02 15:06:34 +09:00
Sylvestre Ledru aa1c00fb9f Bug 1370369 - Use the new MOZ_DIAGNOSTIC_ASSERT_ENABLED instead of several defines - follow up patch r=froydnj
MozReview-Commit-ID: I4ffmvKClc6

--HG--
extra : rebase_source : 0039cd09dfb199f77a1cbdca3bfdbcab21cc0049
2017-06-05 23:43:34 +02:00
Sebastian Hengst a2e96d0054 Backed out changeset 8adc00c59534 (bug 1369712) for crashes in xpcshell tests on Linux and OS X, e.g. in test_captive_portal_not_found.js @ JS::HeapObjectPostBarrier. r=backout 2017-06-06 15:30:02 +02:00
Jon Coppeard 4474d8cea0 Bug 1369712 - Fix removing the gray roots tracer r=mccr8 2017-06-06 11:25:58 +01:00
Sebastian Hengst a0bd7b9c0d merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: BDyuSdNALvH
2017-06-06 11:20:56 +02:00
Nicholas Nethercote 1b418b1c18 Bug 1369644 - Remove use of |volatile| from ProfileEntry. r=mstange,shu,jseward,froydnj.
These annotations aren't doing anything useful. The important thing with
the PseudoStack is that, during pushes, the stack pointer incrementing happens
after the new entry is written, and this is ensured by the stack pointer being
Atomic.

The patch also improves the comments on PseudoStack.

--HG--
extra : rebase_source : 100f8a5e4b750c15fac66175550c4c284a141f16
2017-06-02 17:16:56 +10:00
Olli Pettay e4559f5c3b Bug 1368493, TimerThread::FindNextFireTimeForCurrentThread should look at timers in order, r=bkelly
--HG--
extra : rebase_source : a86b344380cbcd34d8930688eb90192846636dd8
2017-06-05 16:49:54 +03:00
Wes Kocher 7faba1c580 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 81kvO3JCHf0
2017-06-05 17:43:44 -07:00
Masayuki Nakano 94170bb269 Bug 1370198 Back out the patch for bug 1369419 because the patch couldn't fix bug 1361132 and causes new crash bugs r=jimm
MozReview-Commit-ID: Eq7Dkk6Ghwc

--HG--
extra : rebase_source : edc2d10f4e0359152927830a269f74b75daf5883
2017-06-05 21:52:16 +09:00
JW Wang 531fbb106b Bug 1367679. P4 - specialize the type of mCompletionPromise according to whether chaining is supported. r=gerald
MozReview-Commit-ID: 8dPXiGl5njE

--HG--
extra : rebase_source : f38a5ddfcf9789d623e2de7776ae4e8a33448225
extra : intermediate-source : d3447a672312867335e5e7a5ee320b34f7f91ead
extra : source : ec5fa27b3c4f65acc7719ffaa9931bd4a5476a47
2017-06-02 10:16:31 +08:00
JW Wang c6caf473c8 Bug 1367679. P3 - pass mCompletionPromise to InvokeCallbackMethod(). r=gerald
This reduces duplicate code by handling promise chaining in one place.

MozReview-Commit-ID: 474T5hvf9oM

--HG--
extra : rebase_source : b8de5bad5597234654d476b93c0c89abc5215073
extra : intermediate-source : b0f3d3fef28646c31c87acfbfbf36ec9329e7a6c
extra : source : 89aab3206558922271aff1d611f029aed3910acf
2017-05-31 17:28:09 +08:00
JW Wang c58f498b84 Bug 1367679. P2 - overload InvokeCallbackMethod() according to whether promise-chaining is supported. r=gerald
This patch fixes InvokeCallbackMethod() which should return null
if promise-chaining is not supported.

Before this patch, it could return non-null if one of the resolve/reject callbacks
returns a MozPromise while the other not.

MozReview-Commit-ID: 7YKNvRKEHQx

--HG--
extra : rebase_source : 6429d9eef35efa0128e8b5967097850e6f4a4325
extra : intermediate-source : 6f73de7d2d5fb01be19fdf7d7037b506425eab18
extra : source : a1849e24b09b0b4e986ffaef14d2602541c1c6e8
2017-05-31 17:08:08 +08:00
JW Wang 71260a8c0f Bug 1367679. P1 - refactor InvokeCallbackMethod() to deal with one concern at a time. r=gerald
InvokeMethod() handles optional arguments.
InvokeCallbackMethod() handles optional return value.

MozReview-Commit-ID: AyT6TEKRqbs

--HG--
extra : rebase_source : 9327dfe75f4cb0a23925aaa7dd939b8a2ae1a95d
extra : intermediate-source : cc1df19154f7371bd6ab98ef490e1ad10c3c0ea9
extra : source : 719d64b06a0e9a345f402b8c721d08ff511a5c1b
2017-05-26 00:12:29 +08:00
JW Wang ea2f8c0d3a Bug 1370005. P1 - backout bug 1367679. r=gerald
MozReview-Commit-ID: 4SUCinaz3Cj

--HG--
extra : rebase_source : 2d6f7fec44a8fb4dd3a526ec6bd2cd5737c93727
2017-06-05 14:03:34 +08:00
Sebastian Hengst 5e4755df68 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: IdRgoZ9hiXq
2017-06-03 20:15:27 +02:00
Wes Kocher 269f7e9f5c Merge m-c to inbound, a=merge
MozReview-Commit-ID: 9wTctDOsPpO
2017-06-02 17:31:31 -07:00
Randell Jesup bafb1e730e Bug 1344223 error-check mkstemp() r=froyd
MozReview-Commit-ID: 1z3cQXioTXP
2017-06-02 15:53:40 -04:00
Masayuki Nakano d3789d2d6b Bug 1369419 GetMessage() and PeekMessage() shouldn't be used directly as far as possible r=jimm
In TSF mode, application should retrieve messages with ITfMessagePump::GetMessage() or ITfMessagePump::PeekMessage() since TSF/TIP may handle the message before or after the host application handles it.

This patch rewrites the API users with WinUtils::(Get|Peek)Message() which use ITfMessagePump if it's available.

MozReview-Commit-ID: LwHIgp7SxLH

--HG--
extra : rebase_source : aa5750af9812f9b107c29546cbee6f9eede6ebfa
2017-06-02 12:02:35 +09:00
JW Wang 225cfa5af7 Bug 1367679. P4 - specialize the type of mCompletionPromise according to whether chaining is supported. r=gerald
MozReview-Commit-ID: 8dPXiGl5njE

--HG--
extra : rebase_source : f38a5ddfcf9789d623e2de7776ae4e8a33448225
extra : intermediate-source : d3447a672312867335e5e7a5ee320b34f7f91ead
extra : source : ec5fa27b3c4f65acc7719ffaa9931bd4a5476a47
2017-06-02 10:16:31 +08:00
JW Wang 6b6056f02f Bug 1367679. P3 - pass mCompletionPromise to InvokeCallbackMethod(). r=gerald
This reduces duplicate code by handling promise chaining in one place.

MozReview-Commit-ID: 474T5hvf9oM

--HG--
extra : rebase_source : b8de5bad5597234654d476b93c0c89abc5215073
extra : intermediate-source : b0f3d3fef28646c31c87acfbfbf36ec9329e7a6c
extra : source : 89aab3206558922271aff1d611f029aed3910acf
2017-05-31 17:28:09 +08:00
JW Wang 2bc689b541 Bug 1367679. P2 - overload InvokeCallbackMethod() according to whether promise-chaining is supported. r=gerald
This patch fixes InvokeCallbackMethod() which should return null
if promise-chaining is not supported.

Before this patch, it could return non-null if one of the resolve/reject callbacks
returns a MozPromise while the other not.

MozReview-Commit-ID: 7YKNvRKEHQx

--HG--
extra : rebase_source : 6429d9eef35efa0128e8b5967097850e6f4a4325
extra : intermediate-source : 6f73de7d2d5fb01be19fdf7d7037b506425eab18
extra : source : a1849e24b09b0b4e986ffaef14d2602541c1c6e8
2017-05-31 17:08:08 +08:00
JW Wang b5d3112f74 Bug 1367679. P1 - refactor InvokeCallbackMethod() to deal with one concern at a time. r=gerald
InvokeMethod() handles optional arguments.
InvokeCallbackMethod() handles optional return value.

MozReview-Commit-ID: AyT6TEKRqbs

--HG--
extra : rebase_source : 9327dfe75f4cb0a23925aaa7dd939b8a2ae1a95d
extra : intermediate-source : cc1df19154f7371bd6ab98ef490e1ad10c3c0ea9
extra : source : 719d64b06a0e9a345f402b8c721d08ff511a5c1b
2017-05-26 00:12:29 +08:00
Mike Hommey ff1697d6f2 Bug 1365419 - Allow to apply manifest entries for all non-(Darwin,Windows,Android) OSes. r=bsmedberg
Manifest entries can contain flags, one of which allows to match on the
os running Gecko. The match is performed against the value returned by
nsIXULRuntime.getOS, which itself comes from the build-system's
OS_TARGET.

In practice, this means that things like os=WINNT, os=Darwin,
os=Android, os=Linux are valid filters, but the latter is too specific,
and most of the time, one would want something that is "any OS but
WINNT, Darwin, Android", which can't be expressed with manifest entry
flags (there is no "and" for them, only "or").

For convenience, we add the keyword "LikeUnix", which has that meaning.

--HG--
extra : rebase_source : faf3986d2a4361d12a512752e15e81270be224ef
2017-05-26 08:56:18 +09:00
Wes Kocher 135f065d54 Merge m-c to autoland, a=merge
MozReview-Commit-ID: GZPNfYTsjn1
2017-06-01 18:43:48 -07:00
Wes Kocher 9782406dd8 Backed out 4 changesets (bug 1365419) for android mochitest failures in test_bug583533.html a=backout
Backed out changeset d82aa6aec2c1 (bug 1365419)
Backed out changeset 9aafdd1ca0bd (bug 1365419)
Backed out changeset 261eecf8497f (bug 1365419)
Backed out changeset 1d9b50fadc05 (bug 1365419)

MozReview-Commit-ID: HkhXf1Dkkbk
2017-06-01 18:39:21 -07:00
Mike Hommey 6a0f9240a2 Bug 1365419 - Allow to apply manifest entries for all non-(Darwin,Windows,Android) OSes. r=bsmedberg
Manifest entries can contain flags, one of which allows to match on the
os running Gecko. The match is performed against the value returned by
nsIXULRuntime.getOS, which itself comes from the build-system's
OS_TARGET.

In practice, this means that things like os=WINNT, os=Darwin,
os=Android, os=Linux are valid filters, but the latter is too specific,
and most of the time, one would want something that is "any OS but
WINNT, Darwin, Android", which can't be expressed with manifest entry
flags (there is no "and" for them, only "or").

For convenience, we add the keyword "LikeUnix", which has that meaning.

--HG--
extra : rebase_source : ce2549fab96cb1df3f984e43cb08413cad49479e
2017-05-26 08:56:18 +09:00
Bryce Van Dyk 99d1ede409 Bug 1272371 - Update multiplexed input stream seek behaviour. r=froydnj
This patch is originally from :baku and updates the seek behaviour of
nsMulitplexInputStream. This fixes an issue with absolute seeking where if a
seek is performed and the correct offset reached, the members of the multiplex
stream were not updated to reflect this.

MozReview-Commit-ID: 7lEvuXxzYkI

--HG--
extra : rebase_source : d86a7ce0fc26abd3c9a60810bd7f7f6346e7a5b0
2017-05-25 13:38:01 +12:00
Bryce Van Dyk 5d382edc2b Bug 1272371 - Add gtest to cover nsMultiplexInputStream set seek. r=froydnj
MozReview-Commit-ID: b3kTP3rerq

--HG--
extra : rebase_source : 3c760baa52a409eaf371d966fdaa293d3d53f81a
2017-05-30 11:27:18 +12:00
Daniel Holbert 4564af3454 Bug 1368326: Don't bother calling Clear() in destructor for empty nsTArrays. r=froydnj
MozReview-Commit-ID: 7mi2Os52JfJ

--HG--
extra : rebase_source : 4c7296fd84509f71b680a55f513574285e754481
2017-06-01 14:38:13 -07:00
Carsten "Tomcat" Book 972b7a5149 merge mozilla-inbound to mozilla-central a=merge 2017-06-01 13:50:56 +02:00
Phil Ringnalda 8b48aeb2ba Merge m-c to a CLOSED TREE m-i
MozReview-Commit-ID: BrsSHyBv1nf
2017-05-31 23:41:56 -07:00
Ehsan Akhgari fb6d29cdc3 Backout bug 1368286 because of event processing regressions with nested event loops on OSX a=RyanVM
Landing on a CLOSED TREE
2017-05-31 22:47:47 -04:00
Ben Kelly 3c709a6f61 Bug 1363829 P15 Expose nsITimer::GetAllowedEarlyFiringMicroseconds(). r=froydnj 2017-05-31 17:13:20 -07:00
Ben Kelly be1903d4a8 Bug 1363829 P12 Expose nsITimer::InitHighResolutionWithCallback() method. r=froydnj 2017-05-31 17:13:19 -07:00
JW Wang 99328fb386 Bug 1368382. P4 - move mCompletionPromise down the class hierarchy so it can store a different promise type. r=gerald
MozReview-Commit-ID: 4beSwBzN8b3

--HG--
extra : rebase_source : 109738143300a47525b8e1bb4d0a5df3aa0f956c
extra : intermediate-source : b979cb04a83f427baa8b0c3d27a98a29baa45a24
extra : source : 4fb388fafec2e572e5755c8ea8d0420a819a5909
2017-05-25 17:35:47 +08:00
JW Wang ec61811621 Bug 1368382. P3 - remove 2 overloads of Then() using variadic template. r=gerald
MozReview-Commit-ID: 9KzYGnrFoQN

--HG--
extra : rebase_source : a80bf6107950dec868d314c0c4426b46439b7969
extra : source : e8c1b29f65f594d7a32ce9557e2c1c915f68373c
2017-05-31 16:10:17 +08:00
JW Wang 138c302d05 Bug 1368382. P2 - let ThenCommand reference the sub-type of ThenValueBase. r=gerald
Since we will store mCompletionPromise in the sub-class of ThenValueBase,
ThenCommand needs to reference the sub-type in order to access mCompletionPromise.

MozReview-Commit-ID: BUi7jElOhP7

--HG--
extra : rebase_source : e94c7da8488bb51e543740149925c4cb6514ad54
extra : source : 21dc7e0202dcc64a781c1d92d4d1b7988b5d37a2
2017-05-31 15:23:43 +08:00
JW Wang 8d1189611e Bug 1368382. P1 - rename and make MethodThenValue/FunctionValue specializations of ThenValue<>. r=gerald
This allows us to remove 2 overloads of MozPromise::Then() using variadic template.

MozReview-Commit-ID: 5LHwDhIhh8e

--HG--
extra : rebase_source : 9b84a92858736b389bd2e60aa7392bfec526ab72
extra : source : 3cdd047583693a7abf479dd75620d1c7d07da70d
2017-05-31 07:44:53 +08:00
L. David Baron 07c2f2dc49 Bug 1352889 - Ensure that PLDHashTable's second hash doesn't have padding with 0 bits for tables with capacity larger than 2^16. r=njn
PLDHashTable takes the result of the hash function and multiplies it by
kGoldenRatio to ensure that it has a good distribution of bits across
the 32-bit hash value, and then zeroes out the low bit so that it can be
used for the collision flag.  This result is called hash0.  From hash0
it computes two different numbers used to find entries in the table
storage:  hash1 is used to find an initial position in the table to
begin searching for an entry; hash2 is then used to repeatedly offset
that position (mod the size of the table) to build a chain of positions
to search.

In a table with capacity 2^c entries, hash1 is simply the upper c bits
of hash0.  This patch does not change this.

Prior to this patch, hash2 was the c bits below hash1, padded at the low
end with zeroes when c > 16.  (Note that bug 927705, changeset
1a02bec165e16f370cace3da21bb2b377a0a7242, increased the maximum capacity
from 2^23 to 2^26 since 2^23 was sometimes insufficient!)  This manner
of computing hash2 is problematic because it increases the risk of long
chains for very large tables, since there is less variation in the hash2
result due to the zero padding.

So this patch changes the hash2 computation by using the low bits of
hash0 instead of shifting it around, thus avoiding 0 bits in parts of
the hash2 value that are significant.

Note that this changes what hash2 is in all cases except when the table
capacity is exactly 2^16, so it does change our hashing characteristics.
For tables with capacity less than 2^16, it should be using a different
second hash, but with the same amount of random-ish data.  For tables
with capacity greater than 2^16, it should be using more random-ish
data.

Note that this patch depends on the patch for bug 1353458 in order to
avoid causing test failures.

MozReview-Commit-ID: JvnxAMBY711

--HG--
extra : transplant_source : 2%D2%C2%CE%E1%92%C8%F8H%D7%15%A4%86%5B%3Ac%0B%08%3DA
2017-05-31 13:44:02 -07:00
L. David Baron f22aab91c2 Bug 1352888 - Don't set the collision flag when adding to PLDHashTable if we've already found the entry we're going to add. r=njn
PLDHashTable's entry store has two types of unoccupied entries:  free
entries and removed entries.  The search of a chain of entries
(determined by the hash value) in the entry store to search for an entry
can stop at free entries, but it continues across removed entries,
because removed entries are entries that may have been skipped over when
we were adding the value we're searching for to the hash, but have since
been removed.  For live entries, we also maintain this distinction by
using one bit of storage for a collision flag, which notes that if the
hashtable entry is removed, its place in the entry store must become a
removed entry rather than a free entry.

When we add a new entry to the table, Add's semantics require that we
return an existing entry if there is one, and only create a new entry if
no existing entry exists.  (Bug 1352198 suggests the possibility of a
faster alternative Add API where the caller guarantees that the key is
not already in the hashtable.)  When we search for the existing entry,
we must thus continue the search across removed entries, even though we
record the first removed entry found to return if the search for an
existing entry fails.

The existing code adds the collision flag through the entire table
search during an Add.  This patch changes that behavior so that we only
add the collision flag prior to finding the first removed entry.  Adding
it after we find the first removed entry is unnecessary, since we are
not making that entry part of a path to a new entry.  If it is part of a
path to an existing entry, it will already have the collision flag set.

This patch effectively puts an if (!firstRemoved) around the else branch
of the if (MOZ_UNLIKELY(EntryIsRemoved(entry))), and then refactors that
condition outwards since it is now around the contents of both the if
and else branches.

MozReview-Commit-ID: CsXnMYttHVy

--HG--
extra : transplant_source : %80%9E%83%EC%CCY%B4%B0%86%86%18%99%B6U%21o%5D%29%AD%04
2017-05-31 13:44:02 -07:00
Ryan VanderMeulen b9fe830aa0 Merge inbound to m-c. a=merge
CLOSED TREE
2017-05-31 14:32:55 -04:00
Bevis Tseng 024ff96b5b Bug 1363318 - Part 2: Label FetchBody. r=baku 2017-05-16 18:12:24 +08:00
Carl Corcoran 3ec4012254 Bug 1367899: Add handling for call reg opcode; r=dmajor
MozReview-Commit-ID: 2ncXsGf2H95

--HG--
extra : rebase_source : 70419541bf28844af4ce6348e343691d073556c3
2017-05-25 19:39:43 +02:00
Carl Corcoran f203b4e69b Bug 1367899: Add handling for test r/m32, r32 and jne rel8 opcodes; r=dmajor
MozReview-Commit-ID: 3Cnx5tYrqMT

--HG--
extra : rebase_source : 723d961913e8d2788dcf3ce9b18aa6dffee4e963
2017-05-26 01:56:07 +02:00
Carsten "Tomcat" Book b318c7dca7 merge mozilla-inbound to mozilla-central + UPGRADE_NSS_RELEASE a=merge
--HG--
rename : toolkit/components/extensions/test/xpcshell/xpcshell.ini => toolkit/components/extensions/test/xpcshell/xpcshell-common.ini
extra : amend_source : 458fd54fe8070ca3034ac441267ff7025adb5251
2017-05-30 11:37:46 +02:00
Ehsan Akhgari 632ef747e7 Bug 1368286 - Take the idle queue into account in nsThread::HasPendingEvents(); r=smaug 2017-05-29 14:34:34 -04:00
Olli Pettay 5e7b0d0105 Bug 1368358 - ThrottledEventQueue::Inner::IsOnCurrentThread should work similarly to other IsOnCurrentThread implementations, r=bkelly
--HG--
extra : rebase_source : 976c25959938bb6572c95ff6120552b9ebad65d7
2017-05-29 17:04:36 +03:00
JW Wang 80a1b6063a Bug 1367674. P2 - remove unused code. r=gerald
MozReview-Commit-ID: 5OHWP5rpiff

--HG--
extra : rebase_source : 723d07adf131912a73b81738b0b43e9d67673c6c
2017-05-25 15:42:35 +08:00
JW Wang 6f82ddffdf Bug 1367674. P1 - add templates to deal with CV and argument number correctly. r=gerald
MozReview-Commit-ID: 5qeSBDny6uc

--HG--
extra : rebase_source : 92530c9efd7cdaaf50fba56d423532546059f37e
2017-05-25 15:41:01 +08:00
Manish Goregaokar e104a8487b Bug 1367619 - Use RWLock when accessing font prefs service off main thread; r=heycam
MozReview-Commit-ID: Dxdq6Etbwxa

--HG--
extra : rebase_source : ec9f847c7dce6a101db6a3d157395f5b73d87ba1
2017-05-25 15:04:13 -07:00
Ryan VanderMeulen 25cb66b774 Merge m-c to autoland on a CLOSED TREE. a=merge 2017-05-26 15:45:41 -04:00
Milan Sreckovic 831111d1d7 Bug 1361724: Remove unused offset parameter from StripChar, StripChars, StripTaggedASCII, StripCRLF. r=froydnj
MozReview-Commit-ID: 3MV5TFMxGjn

--HG--
extra : rebase_source : de7ee1fd36e1b18427c67d9ac6e98f50f780a498
2017-05-17 13:49:52 -04:00
Olli Pettay 2c06db876d Bug 1311425, review comment fix to ensure low priority timers aren't taken into account when calling NS_GetTimerDeadlineHintOnCurrentThread, r=smaug 2017-05-26 09:13:39 -04:00
Olli Pettay d9d7f6e11e Bug 1311425 - gtests for NS_GetTimerDeadlineHintOnCurrentThread, r=ehsan
--HG--
extra : rebase_source : 3c0164dac2d12705838fc6663bc8f824f17bbbea
2017-05-25 21:20:00 -04:00
Andreas Farre 1cf93d7962 Bug 1311425 - Avoid expiration timers when scheduling idle runnables, r=froydnj
--HG--
extra : rebase_source : b20edf82a69a24965b4bb6300ff9b1be39ad7b8a
2017-05-24 21:17:06 -04:00
Andreas Farre 892408079a Bug 1311425 - Add pref for how far into the timer queue, r=smaug,f=froydnj
--HG--
extra : rebase_source : 170404bed646efffa71f1e5b0970ec69f6dc4ce5
2017-05-24 21:14:29 -04:00
Andreas Farre 8e2322bcce Bug 1311425 - Make idle callbacks aware of nsITimers, r=froydnj
--HG--
extra : rebase_source : 3baa3054c1ca08783fd0d04dab91d3f97d2e65f1
2017-05-24 21:12:55 -04:00
Andreas Farre 0833711613 Bug 1311425 - Prepare for handling several sources of idleness, r=smaug
--HG--
extra : rebase_source : 7f771167ae460a50715f23c587eea10d5fe7e815
2017-05-24 21:11:12 -04:00
Carsten "Tomcat" Book e92dffa1b6 merge mozilla-inbound to mozilla-central a=merge 2017-05-26 11:06:11 +02:00
Nicholas Nethercote 0840bb61c6 Bug 1366650 (part 1) - Move PseudoStack into SpiderMonkey. r=mstange,shu.
This includes renaming its fields to match SpiderMonkey naming conventions
instead of Gecko naming conventions.

This patch is just about moving the code. The next patch will change
SpiderMonkey to actually use PseudoStack directly.

--HG--
extra : rebase_source : 27e77ddf950201eb6bdba60003218056442cf7ab
2017-05-26 09:37:28 +10:00
Carl Corcoran 42a16ea02c Bug 1343149: Add handling for movups opcode; r=dmajor
MozReview-Commit-ID: 3fDrr2FkfD

--HG--
extra : rebase_source : 09b094868e0c6d754abf8e92b696699c70976382
2017-05-25 22:52:16 +02:00
Kan-Ru Chen c54925d495 Bug 1365827 - Make MozPromise::Private::{Resolve,Reject} no-op when it's not pending. r=jwwang
MozReview-Commit-ID: 5HbUS9yA29K

--HG--
extra : rebase_source : ffbf53148e486757e5b36bdc0510bacce424a5e5
2017-05-24 13:46:19 -04:00
Gabriele Svelto 69f2bbaf90 Bug 1366711 - Make it possible to hide applications launched with nsIProcess; r=bsmedberg
MozReview-Commit-ID: K3vadzPg8SR

--HG--
extra : rebase_source : 9803bdca46c7dceb9bae0eefa4972369c7b36202
2017-05-22 10:23:00 +02:00
Samael Wang ecbe18e933 Bug 1363036 - Part 1: Remove MOZ_DIAGNOSTIC_ASSERTs previously added for bug hunting. r=smaug
MozReview-Commit-ID: BAkuRlHtMcP

--HG--
extra : rebase_source : 5e708d0dacec9a673851d689d1f5274a0f1b69aa
2017-05-22 11:25:54 +08:00
Sebastian Hengst 011ef9ea3e merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 2iKvbnEUJsY
2017-05-25 10:32:22 +02:00
Ryan VanderMeulen ce2fe4e709 Merge m-c to autoland. a=merge 2017-05-24 20:48:16 -04:00
Olli Pettay 67c78feadf Bug 1358476, add support for timeout when doing idle dispatch, tests, p=farre,smaug, r=nfroyd
--HG--
extra : rebase_source : 054bb7a4b7fdb41f255199bdc60a210149957292
2017-05-24 15:36:49 -04:00
Olli Pettay bc787a0ec7 Bug 1358476, add support for timeout when doing idle dispatch, p=farre,smaug, r=nfroyd
--HG--
extra : rebase_source : 8561bd1e1aad04be8b9d3efa7b43d4833a4703bf
2017-05-24 17:34:50 -04:00
Andrew McCreight e437a7e4e5 Bug 1367496 - Add more release asserts to the cycle collector. r=smaug
A previous bug missed a few places where we could theoretically
reenter the CC.

MozReview-Commit-ID: I0otlAEwyZa

--HG--
extra : rebase_source : 064b127a2c28a52b2807cd78031de9af4f258f60
2017-05-24 10:13:02 -07:00
L. David Baron f2c24eea94 Backed out changeset e4ac2148c920 (bug 1352888) to see if it is responsible for input latency regression bug 1362094.
--HG--
extra : rebase_source : bfb451e911058496c2a6498d658cb6ab777da8e6
2017-05-24 11:42:19 -04:00
L. David Baron 34315c4eee Backed out changeset 52fff3b1e209 (bug 1352889) to see if it is responsible for input latency regressions in bug 1365334 or bug 1366156.
--HG--
extra : rebase_source : 387401d1417a29c19e5dbc1ee7413d9d6f810d23
2017-05-24 11:41:02 -04:00
Ehsan Akhgari b1a6df0904 Backout the experimental patch for bug 1366156 because it didn't help 2017-05-24 09:46:39 -04:00
Andreas Farre 9b389ab049 Bug 1353206 - Expose nsIThread::idleDispatch to script. r=froydnj 2017-05-24 12:16:04 +02:00
Bill McCloskey 226f6b9185 Bug 1366869 - Make DISPATCH_NORMAL be the default flags argument for nsIEventTarget::Dispatch (r=froydnj)
MozReview-Commit-ID: 5DVcIaMHH95
2017-05-23 12:05:43 -07:00
Michael Layzell 590b8f81b4 Bug 1363883 - Share memory maps between BHR native stacks, dr=bsmedberg, r=froydnj
MozReview-Commit-ID: IQ1fMXUD0ch
2017-05-23 13:41:52 -04:00
David Parks 51b34f2689 Bug 1363290 - Part 4: Extend DLL interceptor to handle mov r32, imm32. r=dmajor
The code already handles this if the r32 is eax.  This allows it to use the other 32-bit registers.

--HG--
extra : histedit_source : 1cff5b54640cc48a0574b0b4323ad909e8a7e7b2
2017-05-16 14:48:56 -07:00
David Parks efb6b228f4 Bug 1363290 - Part 2: Add movxsd instruction to WindowsDllInterceptor. r=dmajor
movxsd moves 32-bit register values to 64-bit registers, sign-extending them.  It is used by SetCursorPos.
2017-05-16 14:42:58 -07:00
Mike Hommey c1becb4a54 Bug 1368932 - Allow MOZ_PASTE_PREFIX_AND_ARG_COUNT to work with 0 arguments. r=froydnj
At the same time, remove the MOZ_STATIC_ASSERT_VALID_ARG_COUNT, which
doesn't actually work for more than 50 arguments(*), and which is now not
useful to detect 0 arguments.

(*) the build fails, but not directly thanks to the static_assert it
expands to.

--HG--
extra : rebase_source : 8f0fe7b352c89b5a3ec87f42ef5464c370c362ef
2017-05-25 15:47:21 +09:00
Carsten "Tomcat" Book 87a9dfd869 Merge mozilla-central to autoland 2017-06-07 13:49:00 +02:00
JW Wang 24a19f81e0 Bug 1370453 - fix potential race condition in ThenCommand<>::Track(). r=gerald
http://searchfox.org/mozilla-central/rev/d441cb24482c2e5448accaf07379445059937080/xpcom/threads/MozPromise.h#953-958

MozPromiseRequestHolder is not thread-safe and it is possible for
mReceiver->ThenInternal() to trigger resolve/reject callbacks before
aRequestHolder.Track() is run. We should call aRequestHolder.Track()
before mReceiver->ThenInternal() to avoid the race condition.

MozReview-Commit-ID: K2R09m9UFBF

--HG--
extra : rebase_source : d656498e74d470fdbb82e7525d82af5fb3100735
2017-06-06 14:19:59 +08:00
Phil Ringnalda 5046ec0134 Merge m-c to m-i
MozReview-Commit-ID: 5k3Ip7tGRsC
2017-06-20 21:49:33 -07:00
Bill McCloskey fb8e8e334c Bug 1372405 - Remove NewRunnable functions that lack a name param (r=froydnj)
MozReview-Commit-ID: vGCnkBey03
2017-06-20 21:44:11 -07:00
Bill McCloskey 8c169acdd7 Bug 1372405 - Delete default Runnable ctor so name must be provided (r=froydnj)
MozReview-Commit-ID: 9L4UoBJWzQ3
2017-06-20 21:44:11 -07:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Bill McCloskey 3c1581f160 Bug 1372405 - Change SchedulerGroup::GetName so it doesn't delegate to mozilla::Runnable (r=froydnj)
Delegating to mozilla::Runnable caused us to return the wrong value once
SchedulerGroup started passing a non-empty name to the Runnable constructor.

MozReview-Commit-ID: 2zMlpiMnHwv
2017-06-20 21:44:11 -07:00
Andreas Farre 5a1916b791 Bug 1366750 - Rename nsIIncrementalRunnable to nsIIdleRunnable. r=smaug
The name nsIIdleRunnable makes more sense, since its main use is in
nsIThread::idleDispatch.

MozReview-Commit-ID: H6qchxKnt7a
2017-05-23 13:24:25 +02:00
Nathan Froyd d0e620966f Bug 1363172 - add mozilla::RWLock; r=erahm
This sort of lock is mostly useful in the context of Stylo right now,
but perhaps there are other applications waiting to be written.
2017-05-22 21:26:26 -04:00
Nathan Froyd e75f6bd810 Bug 1353755 - remove nsCharTraits::assign; r=erahm
We don't need the tiny helper function for single-character assignment,
and the multi-argument assign() method is the only thing that uses it,
which is also itself unused.  So remove them both.
2017-05-22 09:23:09 -04:00
Nicholas Nethercote d1e495344b Bug 1365854 - Remove FRAME_LABEL_COPY. r=mstange,shu.
ProfileEntry has |string|, which can be static or dynamic, and |dynamicString|.
If |string| is dynamic, the FRAME_LABEL_COPY flag must be set, and it will be
copied into profiler output.

But there is only one place that uses dynamic |string| values, in SpiderMonkey.
And that place doesn't use |dynamicString|. So this patch changes that place to
use an empty |string| and put the old dynamic |string| value in
|dynamicString|. This in turn removes the need for FRAME_LABEL_COPY.

One minor wrinkle is that when |dynamicString| is used the old code put a space
between |string| and |dynamicString|. The new code omits the space if |string|
is empty.

The patch also renames ProfileEntry::string as ProfileEntry::label_, which
better matches how it's used, and ProfileEntry::dynamicString as
ProfileEntry::dynamicString_ so the getter can be renamed dynamicString().
2017-05-18 17:17:46 +10:00
Bill McCloskey b71d032b99 Bug 1363877 - Label IPC shmem messages as SystemGroup (r=dvander)
MozReview-Commit-ID: 3I5ny0wxVHI
2017-05-19 16:38:12 -07:00
Bill McCloskey 24b1d128db Bug 1363474 - Add a method to ask whether it's safe to run code related to a given SchedulerGroup (r=froydnj)
MozReview-Commit-ID: F8uZUTfUM9v
2017-05-19 14:31:52 -07:00
Bill McCloskey 2f4cd5e241 Revert "Bug 1363474 - Add a method to ask whether it's safe to run code related to a given SchedulerGroup (r=froydnj)"
This reverts commit 51714e98c2d248c02b326aeea64f3af0cbdecd50.
2017-05-19 14:24:45 -07:00
Bill McCloskey f63847577a Bug 1363474 - Add a method to ask whether it's safe to run code related to a given SchedulerGroup (r=froydnj)
MozReview-Commit-ID: F8uZUTfUM9v
2017-05-19 13:59:24 -07:00
Ehsan Akhgari f5567643a3 Bug 1366156 - Temporarily disable the collection of content js delay event telemetry probes to investigate whether they are the cause of child process INPUT_EVENT_RESPONSE_MS regressions; r=farre 2017-05-19 09:46:30 -04:00
Cervantes Yu 2dc8565a99 Bug 1348747 - Part 2: Support stub functions starting with jmp rel8 in WindowsDllDetourPatcher. r=handyman
MozReview-Commit-ID: 5hPBmxtBCnu

--HG--
extra : rebase_source : 52a1d43c9f57c9c8b70ded93cbcb76218922ea8b
extra : amend_source : 6377d7eb2246b38e69b95b2a7f507a0f86e300b1
extra : histedit_source : 5cc91dfb4613431466ccde12610a36578361bf53
2017-05-19 15:53:54 +08:00
Cervantes Yu cd7a0759ce Bug 1348747 - Part 1: Fix WindowsDllDetourPatcher that generates extra 0xff byte when generating a x64 jmp instruction. r=handyman
MozReview-Commit-ID: 8TfcwXh6GUN

--HG--
extra : rebase_source : dae5e7e517bdac97eae0983fe4eedacd59f33deb
extra : amend_source : 8332240c2eeff58bc6cd9ea6e6175f2b860777f8
extra : histedit_source : f287291c7405a283f62c15e7ad2a9d8a1c283e06
2017-05-19 15:53:44 +08:00
Iris Hsiao 02cae69058 Backed out 4 changesets (bug 1357829) for build bustage in xpcshell\selftest.py on windows 8 x64 opt. a=backout
Backed out changeset 8ea202bb1103 (bug 1357829)
Backed out changeset cebe4d7abeda (bug 1357829)
Backed out changeset 378d473c9619 (bug 1357829)
Backed out changeset 86ebe868d443 (bug 1357829)
2017-05-19 11:27:38 +08:00
Michael Layzell 3a8384acc0 Bug 1357829 - Part 2: Use profiler_suspend_sample_thread in the background hang monitor, r=froydnj
This patch uses the profiler_suspend_sample_thread method which was added in
part 1.

With this patch, we no longer manually run code to pause the target thread,
instead using the profiler's provided code to do so. In addition, we no longer
manually walk the stack to collect native stack frames, instead relying on the
profiler's cross-platform stack walking logic.

This helps remove some of the code from ThreadStackHelper which was redundant
with the profiler. Much of the pseudostack code in ThreadStackHelper is also
redundant, and should hopefully be eliminated in a follow-up.

MozReview-Commit-ID: 4RjLHt6inH9
2017-05-18 13:56:20 -04:00
Michael Layzell 04032b2cd0 Bug 1365749 - Bump kMaximumNativeHangStacks back to 300, and increase the number of native frames we are collecting, r=ehsan
MozReview-Commit-ID: FahsOqeXeLL
2017-05-17 17:27:12 -04:00
Bill McCloskey 8adfa773bb Revert "Bug 1363877 - Label IPC shmem messages as SystemGroup (r=dvander)" for valgrind failures
This reverts commit 1f7a7e259501b47a014959049e2ed069fe2fd9b8.
2017-05-17 12:58:35 -07:00
Paolo Amadini f3d8ecd611 Bug 1364050 - Part 4 - Remove references to "downloads.rdf". r=mak
MozReview-Commit-ID: y3BfYQYkF2

--HG--
extra : rebase_source : 0f09e7961aa0f226ba4cc1616172ee4856a50ee8
2017-05-11 09:37:10 +01:00
Bill McCloskey 71bfb5a04b Bug 1351021 - Compute mean time between unlabeled (r=froydnj,data-r=bsmedberg)
Accumulates the time in between running unlabeled runnables in a histogram. This
measurement will be useful to see how much of a win the cooperative scheduler
will be, assuming we label no more runnables.

MozReview-Commit-ID: 9lgoGJcXLP9
2017-05-17 11:47:40 -07:00
Bill McCloskey 68a155951c Bug 1351021 - Make SchedulerGroup::Runnable QIable (r=froydnj)
The patch allows us to tell whether a runnable is labeled using QI.

MozReview-Commit-ID: KkcCSUdWMBr
2017-05-17 11:47:40 -07:00
Bill McCloskey 2f2e996bf5 Bug 1363877 - Label IPC shmem messages as SystemGroup (r=dvander)
MozReview-Commit-ID: 3I5ny0wxVHI
2017-05-17 11:47:40 -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
Carsten "Tomcat" Book 845d4f803d Merge mozilla-central to mozilla-inbound 2017-05-17 12:27:56 +02:00
Samael Wang da20faa46e Bug 1363036 - Add MOZ_DIAGNOSTIC_ASSERTs for bug hunting. r=smaug
MozReview-Commit-ID: JPnkkJlkwDY
2017-05-16 10:54:01 +08:00
Carsten "Tomcat" Book c8ef78fe63 Merge mozilla-central to mozilla-inbound on a CLOSED TREE 2017-05-16 15:08:58 +02:00