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

16524 Коммитов

Автор SHA1 Сообщение Дата
Mats Palmgren 008ea680be Bug 1376487 - Use LookupForAdd instead of Get+Put to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: 7rLiC9ZeIhp
2017-06-28 01:03:17 +02:00
Mats Palmgren a59535d127 Bug 1376483 - Use Lookup instead of Get+Remove, and LookupForAdd instead of Get+Put, to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: Lgq12HL5gnd
2017-06-28 01:03:17 +02:00
Mats Palmgren 30c6d6295a Bug 1376477 - Use Lookup instead of Get+Remove to avoid unnecessary hashtable lookups. Replace Get with Contains to avoid ref-counting. r=froydnj
MozReview-Commit-ID: G4F2pAnNA73
2017-06-28 01:03:17 +02:00
Mats Palmgren e0fc464fa9 Bug 1376476 - Use Lookup instead of Get+Remove, and LookupForAdd instead of Get+Put, to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: FpFNg0vJXc5
2017-06-28 01:03:17 +02:00
Mats Palmgren 59d3163a68 Bug 1376473 - Use Lookup instead of Get+Remove to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: lWNPPBDNh7
2017-06-28 01:03:17 +02:00
Ehsan Akhgari 04f49b5fc2 Bug 1376563 - Improve the hash key generation for hashtables containing pointers on 64-bit platforms by using 2 more bits of the original pointer in calculating the hash key; r=froydnj 2017-06-27 18:18:32 -04:00
Ehsan Akhgari 8e07c31301 Bug 1376472 - Annotate likely branches in nsTSubstring_CharT::StripTaggedASCII(); r=froydnj 2017-06-27 18:18:31 -04:00
Carsten "Tomcat" Book 9c5ccdbab2 Merge mozilla-central to autoland 2017-06-27 15:15:58 +02:00
JW Wang 8a5ba394b7 Bug 1371982 - Use a RefPtr<> to hold the MozPromise. r=gerald 2017-06-26 20:13:27 -04:00
Haik Aftandilian c3cf53a7ef Bug 1334550 - Part 1 - Proxy moz-extension protocol requests to the parent process; r=jimm,mayhemer
Changes ExtensionProtocolHandler to use remote streams for
moz-extension loads of file and JAR URI's to allow for
filesystem read-access sandboxing.

Adds messaging to PNecko to allow child processes to
request an input stream or file descriptor for moz-extension
URI's.

Add ExtensionProtocolHandler singleton so that NeckoParent can
call methods directly and ExtensionProtocolHandler::NewFD
can use a new member variable |mFileOpenerThread| to open files.

Adds FileDescriptorFile, a limited implementation of nsIFile
that wraps a file descriptor, to be sideloaded into
nsJARChannels so that extension JAR files can be read
using a file descriptor without accessing the filesystem
directly.

MozReview-Commit-ID: 1pcnIpjz2yR

--HG--
extra : rebase_source : 9d7334778fc81837b11b98d4e32603f7e5eb3a27
2017-06-23 17:10:54 -07:00
Bill McCloskey d5f10f6b39 Bug 1372405 - Remove NewRunnable functions that lack a name param (r=froydnj)
MozReview-Commit-ID: vGCnkBey03
2017-06-26 14:19:58 -07:00
Bill McCloskey d808e4bea3 Bug 1372405 - Delete default Runnable ctor so name must be provided (r=froydnj)
MozReview-Commit-ID: 9L4UoBJWzQ3
2017-06-26 14:19:58 -07:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Bill McCloskey 3f0e196a4c 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-26 14:19:58 -07:00
Nicholas Nethercote 58786e1ea7 Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +10:00
Andreas Farre 059d5cc125 Bug 1374514 - Don't use alias for SetDeadline signature. r=nfroyd 2017-06-19 23:59:00 +02:00
Nicholas Nethercote 033f83145c Bug 1375387 - Reorder and section-ify GeckoProfiler.h. r=mstange.
This patch gives some structure and order to the profiler's API.

It also renames AutoProfilerRegister as AutoProfilerRegisterThread, to match
profiler_register_thread().
2017-06-22 14:28:47 +10:00
Nicholas Nethercote f1364a75ea Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
All the instances are converted as follows.

- nsSubstring  --> nsAString
- nsCSubstring --> nsACString

--HG--
extra : rebase_source : cfd2238c52e3cb4d13e3bd5ddb80ba6584ab6d91
2017-06-20 19:19:52 +10:00
Nicholas Nethercote fe9268c4cd Bug 1374580 (part 2) - Remove nsAFlat{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsAFlatString  --> nsString
- nsAFlatCString --> nsCString

--HG--
extra : rebase_source : b37350642c58a85a08363df2e7c610873faa6e41
2017-06-20 19:19:05 +10:00
Nicholas Nethercote 1572f96f5d Bug 1374580 (part 1) - Remove nsASingleFragment{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsASingleFragmentString  --> nsAString
- nsASingleFragmentCString --> nsACString

--HG--
extra : rebase_source : e6a1ddc8938fecd9a735b15e872c054edf4c7910
2017-06-20 19:18:17 +10:00
Nicholas Nethercote 915a56fb41 Bug 1375299 (part 2) - Remove PROFILER_MARKER. r=mstange.
PROFILER_MARKER is now just a trivial wrapper for profiler_add_marker(). This
patch removes it.

--HG--
extra : rebase_source : 9858f34763bb343757896a91ab7ad8bd8e56b076
2017-06-22 13:40:21 +10:00
Nicholas Nethercote 4b364cf3f3 Bug 1375299 (part 1) - Reduce usage of MOZ_GECKO_PROFILER. r=mstange.
This patch reduces the differences between builds where the profiler is enabled
and those where the profiler is disabled. It does this by removing numerous
MOZ_GECKO_PROFILER checks.

These changes have the following consequences.

- Various functions and classes are now defined in all builds, and so can be
  used unconditionally: profiler_add_marker(), profiler_set_js_context(),
  profiler_clear_js_context(), profiler_get_pseudo_stack(), AutoProfilerLabel.
  (They are effectively no-ops in non-profiler builds, of course.)

- The no-op versions of PROFILER_* are now gone. The remaining versions are
  almost no-ops when the profiler isn't built.

--HG--
extra : rebase_source : 8fb5e8757600210c2f77865694d25162f0b7698a
2017-06-22 06:26:16 +10:00
Ehsan Akhgari cb111ebec5 Bug 1376323 - Unroll the loop in nsTSubstring_CharT::StripTaggedASCII() in order to speed up StripCRLF(); r=froydnj 2017-06-27 01:56:57 -04:00
Andreas Farre 2a138dd325 Bug 1368072 - Move idle dispatch to thread manager. r=froydnj
Also exposes idle dispatch with timeout.
2017-06-22 11:14:10 +02:00
Phil Ringnalda cb4caa5dfa Merge m-c to m-i
MozReview-Commit-ID: FKVZCEscusy
2017-06-21 23:50:09 -07:00
Phil Ringnalda 08e2f5187b Backed out 3 changesets (bug 1368072) for colliding with a new use of the thing it was renaming
Backed out changeset 1d7e008d7d70 (bug 1368072)
Backed out changeset c4a1ddf9be0d (bug 1368072)
Backed out changeset ba1cdae5a8d6 (bug 1368072)
2017-06-21 23:28:37 -07:00
Wes Kocher ac0fd2038c Merge inbound to m-c a=merge
MozReview-Commit-ID: 3LXFVwSoMvs
2017-06-21 17:58:17 -07:00
Nathan Froyd b28fcc5c4b Bug 1372670 - part 5 - add nsIThreadManager::spinEventLoopUntilEmpty; r=erahm,florian
A number of places in JS need to drain the current thread's event queue,
which cannot be done with nsIThreadManager::spinEventLoopUntil, since we
need to not wait for an incoming event when attempting to process one.
2017-06-21 12:59:28 -04:00
Nathan Froyd 27c58cf89f Bug 1372670 - part 3 - add spinEventLoopUntil to nsIThreadManager; r=erahm,florian 2017-06-21 12:59:28 -04:00
Nathan Froyd 2c70f522cc Bug 1372670 - part 2 - remove nsIThreadManager::isMainThread; r=erahm
Nobody calls this from JS, and we have better ways to accomplish the
same task in C++
2017-06-21 12:59:28 -04:00
Nathan Froyd e6133920ca Bug 1372670 - part 1 - remove non-MOZILLA_INTERNAL_API NS_IsMainThread(); r=erahm
Everybody who cares about this function calls it from within libxul.
2017-06-21 12:59:28 -04:00
Sebastian Hengst 17c1285d32 Backed out changeset 733c828d5ba3 (bug 1355746) for frequently failing mochitest dom/html/test/test_fullscreen-api.html and devtools' browser_service_workers_multi_content_process.js, both on Linux. r=backout a=backout
MozReview-Commit-ID: 7VDiCD8uwOy
2017-06-21 19:51:13 +02:00
Sebastian Hengst b2f7adcc7d Backed out changeset 38722eed8c8a (bug 1355746)
MozReview-Commit-ID: 1HcpK10x0V4
2017-06-21 19:49:04 +02:00
Sebastian Hengst 0cbb4ac4e7 Backed out changeset 8cd0a75a643a (bug 1355746)
MozReview-Commit-ID: 1CxBzyDfpIP
2017-06-21 19:48:59 +02:00
Phil Ringnalda 44f60566a9 Backed out 3 changesets (bug 1368072) for timeouts in test_TelemetrySession.js and test_fullscreen-api.html and unhandled "TypeError: Services.tm.mainThread.idleDispatch is not a function" promise rejections
Backed out changeset 357635c84e49 (bug 1368072)
Backed out changeset 1797afe16a2a (bug 1368072)
Backed out changeset 4782401394a9 (bug 1368072)

MozReview-Commit-ID: 6kdcSkERjTD
2017-06-20 21:41:14 -07:00
Wes Kocher c0e1236f1a Merge autoland to m-c a=merge
MozReview-Commit-ID: LFtpTAueYrF
2017-06-20 18:24:29 -07:00
Carsten "Tomcat" Book 956f2121eb Backed out changeset ce7c27a7a91e (bug 1372405) for bustage in fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj
--HG--
extra : rebase_source : 6e612ad00e834b2cf4014fdd3fbbc33c716ecf80
2017-06-21 13:59:42 +02:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Carsten "Tomcat" Book 4f575539e6 Backed out changeset 328c356c0bcd (bug 1372405)
--HG--
extra : rebase_source : 643149a6a75f94c8d1000882d3a679d2c1418345
2017-06-21 13:59:20 +02:00
Carsten "Tomcat" Book 8e9d47abae Backed out changeset f4521f4c0fc3 (bug 1372405)
--HG--
extra : rebase_source : 1762fbc22a4cb72330b6867fb34cb032e97985ce
2017-06-21 13:59:18 +02:00
Gerald Squelart 2d68784a91 Bug 1374594 - Allow mutex/monitor scoped unlockers to be constructed from their locking counterparts - r=froydnj
MozReview-Commit-ID: 7PResfLcEeO

--HG--
extra : rebase_source : aab88391ef689bf92742a0ef37729d664dd528b3
2017-06-20 22:20:49 +12:00
Chris Peterson de85740dbf Bug 1373525 - xpcom/build: Remove unused member function DebugFilesAutoLock::Clear(). r=froydnj
xpcom/build/PoisonIOInterposerBase.cpp:79:21 [-Wunused-member-function] unused member function 'Clear'

MozReview-Commit-ID: ITI1mZk0DTx

--HG--
extra : source : 77e0683d430bac85376b476a783862db7acc384c
extra : intermediate-source : 935b7d158e4a1d2727998b0c2e7a9122ebefa257
2017-06-07 00:56:55 -07:00
Andreas Farre 2a8a39cf8e Bug 1368072 - Move idle dispatch to thread manager. r=froydnj
Also exposes idle dispatch with timeout.
2017-06-21 12:36:41 +02:00
Eric Rahm 23446e3a7b Bug 1374414 - Stop warning if target is null in idle dispatch. r=froydnj 2017-06-20 10:31:33 -07:00
Andreas Farre 9598aa65ed Bug 1368072 - Move idle dispatch to thread manager. r=froydnj
Also exposes idle dispatch with timeout.
2017-06-19 06:36:00 +02:00
Carsten "Tomcat" Book de892834ed Merge mozilla-central to mozilla-inbound 2017-06-20 11:31:34 +02:00
Carsten "Tomcat" Book 013fb0680e merge mozilla-inbound to mozilla-central a=merge 2017-06-20 11:26:40 +02:00
Wes Kocher 976d5437f9 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 6A96Fe0GPjw
2017-06-19 17:37:53 -07:00
Masayuki Nakano f337b95b60 Bug 1372829 - part2: mozilla::EditorBase should cache raw pointer of nsISelectionController and nsIDocument with nsWeakPtr r=froydnj,m_kato
mozilla::EditorBase stores nsISelectionController and nsIDocument with nsWeakPtr.  However, nsWeakPtr requires QI to retrieve actual pointer and it makes some damage to the performance.  If mozilla::WeakPter were available for them, it'd be great.  However, it's not available with nsISelectionController nor nsIDocument because it's possible to implement SupportsWeakPtr only with their subclasses but the subclasses shouldn't be referred by editor.  Therefore, this patch creates mozilla::CachedWeakPtr<class T> which stores both raw pointer (as cache) and nsWeakPtr and when its cache is requested, it checks if the object referred by nsWeakPtr is still alive.

Additionally, this patch hides the members from subclasses of EditorBase for reducing the maintenance cost.

MozReview-Commit-ID: FvtM7453Vv8

--HG--
extra : rebase_source : a524a8ea327c3993645fafa81db8aef65090f1e0
2017-06-20 00:55:00 +09:00
Andreas Farre 43c18d7af3 Bug 1371274 - Add tests for NewIdleRunnable for classes without SetDeadline. r=froydnj
--HG--
extra : rebase_source : 9291a38f5533faf030b13d0c4e27dab06ddd5afe
2017-06-09 02:44:00 +02:00
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