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

16554 Коммитов

Автор SHA1 Сообщение Дата
Stephen Fewer 9aa633008d Bug 1372849 - Improve the security of WindowsDllDetourPatcher. r=dmajor
--HG--
extra : rebase_source : d5afe76d17a4af5c54d041cde29bce2f34477742
2017-06-14 14:46:39 -05:00
Nicholas Nethercote 2262103c96 Bug 1378051 - Remove bogus #include of nsStringAPI.h. r=froydnj.
nsStringAPI.h is long gone, so that branch is clearly never compiled.

--HG--
extra : rebase_source : 0b237e73a11eed11d05e7c572583362fe52eab70
2017-07-04 16:04:51 +10:00
Nicholas Nethercote 5d446671a8 Bug 1375776 (part 4) - Allow ProfilerMarkerPayload.h to be #included unconditionally. r=mstange.
This requires:

- Moving the constructors of ProfilerMarkerPayload and its subclasses into the
  .h file so they are visible even when ProfilerMarkerPayload.cpp isn't
  compiled.

- Similarly, using a macro to make StreamPayload() a crashing no-op when the
  profiler isn't enabled. (It is never called in that case.)

--HG--
extra : rebase_source : 7aad2fdb1bd4e49782024dba6664e8f992771520
2017-06-23 16:24:15 +10:00
Mats Palmgren 9a66affd7f Bug 1376498 part 5 - Remove nsClassHashtable::RemoveAndForget(). r=froydnj
MozReview-Commit-ID: 2VVgViNhruj
2017-07-05 02:01:45 +02:00
Mats Palmgren fae81013c9 Bug 1376498 part 3 - Make nsClassHashtable inherit Remove() for API consistency with ns[Base|Interface|RefPtr]Hashtable. r=froydnj
MozReview-Commit-ID: LQMaamZhkM4
2017-07-05 02:01:44 +02:00
Mats Palmgren 9542d00e58 Bug 1376498 part 2 - Use plain Remove(key) in some places instead of Lookup(key).Remove() for simplicity. r=froydnj
MozReview-Commit-ID: 7GlCL1jyGAz
2017-07-05 02:01:44 +02:00
Mats Palmgren f88bb52a9e Bug 1376498 part 1 - Unify the ns[Base|Interface|RefPtr]Hashtable::Remove() signatures for consistency. Make it return true if an entry was removed, with an optional out param to move the value. r=froydnj
MozReview-Commit-ID: JVciibiSPL5
2017-07-05 02:01:44 +02:00
Michael Layzell 2eb92d98f1 Backout Bug 1365309 for test failures on a CLOSED TREE
MozReview-Commit-ID: 143ac9l7Goq
2017-07-04 17:31:13 -04:00
Michael Layzell b24bf46af6 Bug 1377344 - Record the name of the currently running Runnable on thread hangs for BHR, r=njn, r=froydnj
MozReview-Commit-ID: IYRHh6jiTeo
2017-07-04 15:16:19 -04:00
Michael Layzell a318e760bd Bug 1365309 - Part 4: Disable the BackgroundHangMonitor in GMP processes, r=froydnj
This involved a change to BackgroundHangMonitor, as it initialized sDisabled
incorrectly to false, instead of true, We need sDisabled initialized to true, as
we cannot assume that it is enabled until BackgroundHangMonitor::Startup() is
called.

MozReview-Commit-ID: 94slLTkNk3C
2017-07-04 13:19:26 -04:00
Michael Layzell 256c09a0f1 Bug 1365309 - Part 3: Disable ThreadStackHelper on x86 linux due to a LUL crash, r=froydnj
MozReview-Commit-ID: 2kBBFftnJEd
2017-07-04 13:19:26 -04:00
Michael Layzell 4c2edc54a7 Bug 1365309 - Part 2: Re-enable the Background Hang Reporter on Linux, r=froydnj
MozReview-Commit-ID: EjAti9UqW7k
2017-07-04 13:19:26 -04:00
Michael Layzell 1fda892d36 Bug 1365309 - Part 1: Move LUL to a separate lock, and initialize it outside of both the profiler and BHR lock on the BHR thread, r=njn
Currently LUL is a member of CorePS, meaning that it is guarded by the PSMutex.
This mutex is grabbed by the main thread at random points during the execution
of the program. This is unfortunate, as initializing LUL can take a long
time (>1s on my local machine), and we definitely don't want to be blocking the
main thread waiting for it.

In addition, in the BHR case, we used to be grabbing LUL when we got our first
hang, while both the PSMutex and the BHR monitor were being held. This meant
that the main thread could make no progress during LUL initializaion, as the BHR
monitor is grabbed by the main thread on every spin of the event loop.

This patch moves that initialization to be behind a completely separate lock,
and makes BHR initialize it on the background thread before acquiring the BHR
lock, meaning that no locks other than the one guarding LUL should be held
during its initialization.

MozReview-Commit-ID: GwNYQaEAqJ1
2017-07-04 13:19:26 -04:00
Ehsan Akhgari ec3d589e4f Bug 1377333 - Make PLDHashNumber 64-bit on x86-64; r=froydnj 2017-07-04 11:05:21 -04:00
Carsten "Tomcat" Book 8e3fa527c9 merge mozilla-inbound to mozilla-central a=merge 2017-07-04 10:48:33 +02:00
Andrew McCreight abd2f18666 Bug 1366878 - Fix nsComponentManager::GetClassObjectByContractID logging. r=erahm
MozReview-Commit-ID: 7YMcUFK1WHC

--HG--
extra : rebase_source : 2632abf950dff1f5bdb9b4069a4a0461b7e8c387
2017-07-03 14:37:06 -07:00
Bill McCloskey 4a0cf674f2 Bug 1376985 - Label DebuggerOnGCRunnable (r=fitzgen)
MozReview-Commit-ID: DoYm2d5Gmnr
2017-07-03 16:20:00 -07:00
Bill McCloskey 224d56eb18 Bug 1377222 - Eliminate nsITimer::InitWithFuncCallback in favor of InitWithNamedFuncCallback (r=froydnj)
MozReview-Commit-ID: 9zN9aAd7daA
2017-07-03 16:19:56 -07:00
Sebastian Hengst 51f7ac9c81 Backed out changeset 3009a0b538da (bug 1377333) on suspicion of causing frequent failures in test_general.html. r=backout 2017-07-04 00:37:24 +02:00
Wes Kocher f8eb8f400a Backed out 2 changesets (bug 1377060) for build bustage a=backout
Backed out changeset c8f818803df7 (bug 1377060)
Backed out changeset bf11ec80b0fb (bug 1377060)

MozReview-Commit-ID: Hp1PtpWYOWV
2017-07-03 11:44:58 -07:00
David Anderson 52b2572051 Refactor PaintThread for async painting. (bug 1377060 part 1, r=mchang) 2017-07-03 11:20:33 -07:00
Ehsan Akhgari de718c51ec Bug 1377333 - Make PLDHashNumber 64-bit on x86-64; r=froydnj 2017-07-03 13:21:11 -04:00
Nicholas Nethercote 3e439bb4f8 Bug 1376638 - Minimize uses of prmem.h. r=glandium.
It's silly to use prmem.h within Firefox code given that in our configuration
its functions are just wrappers for malloc() et al. (Indeed, in some places we
mix PR_Malloc() with free(), or malloc() with PR_Free().)

This patch removes all uses, except for the places where we need to use
PR_Free() to free something allocated by another NSPR function; in those cases
I've added a comment explaining which function did the allocation.

--HG--
extra : rebase_source : 0f781bca68b5bf3c4c191e09e277dfc8becffa09
2017-06-30 19:05:41 -07:00
Phil Ringnalda 915412e692 Merge m-i to m-c, a=merge
MozReview-Commit-ID: HINQtggBLDr
2017-07-01 17:36:09 -07:00
Olli Pettay 15af1ecf7d Bug 1376614 - Pass budget to forgetSkippable and return early when budget has been used, r=mccr8 2017-06-30 13:44:59 +03:00
Andreas Farre 6fd53fe558 Bug 1372856 - Implement GetName for IdleRunnableWrapper. r=froydnj 2017-06-29 23:55:56 +02:00
Boris Zbarsky 239e1057ca Bug 1376954 part 1. Ensure that we don't try to nursery-allocate non-wrappercached DOM objects. r=smaug 2017-06-30 10:15:51 -07:00
Carsten "Tomcat" Book 7918eeee02 merge mozilla-inbound to mozilla-central a=merge 2017-06-28 13:23:29 +02:00
Mats Palmgren 465885031b Bug 1376127 - Use LookupForAdd instead of Get+Put in CycleCollectedJSRuntime::DeferredFinalize to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: 1lEnh9yTQUH
2017-06-28 01:03:18 +02:00
Mats Palmgren 250c9d87b0 Bug 1376126 - Use Lookup() entry instead of Get+Remove in CycleCollectedJSRuntime::RemoveJSHolder to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: F2dJbf9r44b
2017-06-28 01:03:17 +02:00
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