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

18719 Коммитов

Автор SHA1 Сообщение Дата
Gabriele Svelto 3521fc20c7 Bug 1502284 - Cleanup of the observer service code r=erahm
This refactors the observer service code to improve readability, uses MOZ_TRY
and other checking macros wherever possible to simplify error handling and
replaces the ObserverRef class with the more generic nsMaybeWeakPtr class.
This cuts away some code and halves the amount of memory needed to store an
event listener. The external behavior is almost unchanged save for some error
codes which are now more specific.

Differential Revision: https://phabricator.services.mozilla.com/D11646

--HG--
extra : source : 10d910aa9f31435116a718bafe8a2b71c61fe23d
2018-11-12 11:04:17 +01:00
Razvan Maries 208d16134b Merge mozilla-inbound to mozilla-central a=merge 2018-11-20 07:03:17 +02:00
Boris Zbarsky 64ae41821b Bug 1507540 part 6. Make nsIVariant's "type" a notxpcom attribute. r=froydnj 2018-11-19 20:20:05 -05:00
Adam Gashlin a5d979cbf9 Bug 1486637: Impersonate user when creating files in user-controlled directories r=rstrong,mhowell
Get an impersonation token for the user who started the maintenance service, use that when creating or moving files in user-controlled directories (currently only update.status). This token is passed along to the updater where it is used the same way (update.status, update log, and elevated lock file).

The workings of getting the token are in usertoken.cpp

Differential Revision: https://phabricator.services.mozilla.com/D7840

--HG--
extra : moz-landing-system : lando
2018-11-19 18:45:52 +00:00
Ted Campbell a75a26eb42 Bug 1508180 - Use uppercase high-order macro names in xptinfo. r=nika
This makes clang-format stop mangling the macros.

Differential Revision: https://phabricator.services.mozilla.com/D12234

--HG--
extra : moz-landing-system : lando
2018-11-19 17:31:14 +00:00
Andreea Pavel 72b0594cb8 Merge mozilla-inbound to mozilla-central. a=merge 2018-11-17 13:27:24 +02:00
Nika Layzell 589d2a7b6f Bug 1477432 - Part 10: Stop using nsIJSID in nsIArray for optional IID parameters, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D9732
2018-11-16 17:27:46 -05:00
Nika Layzell d2f648498e Bug 1477432 - Part 8: Remove test-only Components.classesById and Components.interfacesById, r=mccr8
These two interfaces are effectively never used, so to avoid needing to support
ClassID2JSValue with the new implementation, I remove them entirely.

Differential Revision: https://phabricator.services.mozilla.com/D2285
2018-11-16 17:27:42 -05:00
Alex Gaynor c545e40742 Bug 1507833 - fixed an unused #[macro_use] warning in our rust code; r=nika
Differential Revision: https://phabricator.services.mozilla.com/D12159

--HG--
extra : moz-landing-system : lando
2018-11-16 19:27:54 +00:00
Gurzau Raul 0e822b012b Merge inbound to mozilla-central. a=merge 2018-11-16 19:08:39 +02:00
Gabriele Svelto 86d8798959 Bug 1502284 - Extend nsMaybeWeakPtr and make expose it to the rest of the code r=erahm
This adds a way to detect if an instance is holding a weak reference or a
strong one, makes non-critical failures less chatty and adds separate methods
for adding unique and non-unique instances to an array.

Differential Revision: https://phabricator.services.mozilla.com/D11645

--HG--
rename : toolkit/components/places/nsMaybeWeakPtr.h => xpcom/base/nsMaybeWeakPtr.h
extra : moz-landing-system : lando
2018-11-16 09:39:36 +00:00
Cameron McCormack 192bc50b77 Bug 1507687 - Add static atoms for strings in UA style sheets r=njn
Differential Revision: https://phabricator.services.mozilla.com/D12092

--HG--
extra : moz-landing-system : lando
2018-11-16 06:37:41 +00:00
Cameron McCormack 62dd9713e0 Bug 1507656 - Adjust nsGkAtoms.h comments for ASCII lowercase flag r=njn
Differential Revision: https://phabricator.services.mozilla.com/D12078

--HG--
extra : moz-landing-system : lando
2018-11-16 02:21:21 +00:00
Jean-Yves Avenard 6561f5d257 Bug 1507093 - P1. Ensure we never leak OwnerType object. r=gerald
Potentially, if the watcher notification task failed to dispatch, we would have a cycle left between the WatchManager and the OwnerType

Differential Revision: https://phabricator.services.mozilla.com/D11857

--HG--
extra : moz-landing-system : lando
2018-11-15 12:47:59 +00:00
arthur.iakab c0b26c4076 Merge inbound to mozilla-central a=merge 2018-11-15 11:54:15 +02:00
Boris Zbarsky ce1e741264 Bug 662341. Add support for [notxpcom] annotations on xpidl attributes. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D11796

--HG--
extra : moz-landing-system : lando
2018-11-15 05:07:20 +00:00
Andreea Pavel b9b20a60f7 Backed out changeset 5beaad8a185b (bug 662341) for linting failure on a CLOSED TREE 2018-11-15 06:49:53 +02:00
Boris Zbarsky 1a4cbc3c61 Bug 662341. Add support for [notxpcom] annotations on xpidl attributes. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D11796

--HG--
extra : moz-landing-system : lando
2018-11-15 04:13:36 +00:00
Blake Kaplan 6206719b87 Bug 1507002 - Use the name of the service r=nika
Differential Revision: https://phabricator.services.mozilla.com/D11829

--HG--
extra : moz-landing-system : lando
2018-11-14 23:54:36 +00:00
Michael Froman 2e78f7f1a1 Bug 1471535 - pt12 - Hook up RDD process and Remote decoding. r=jya,spohl
Depends on D8493

Differential Revision: https://phabricator.services.mozilla.com/D8494

--HG--
extra : moz-landing-system : lando
2018-11-14 18:07:28 +00:00
Michael Froman ec52863ae2 Bug 1471535 - pt10 - Handle memory reporting for RDD. r=jya,erahm
Depends on D8491

Differential Revision: https://phabricator.services.mozilla.com/D8492

--HG--
extra : moz-landing-system : lando
2018-11-14 18:06:52 +00:00
Michael Froman eb980fd0f3 Bug 1471535 - pt6 - Add GeckoProcessType_RDD. r=jya
Depends on D8487

Differential Revision: https://phabricator.services.mozilla.com/D8488

--HG--
extra : moz-landing-system : lando
2018-11-14 18:05:53 +00:00
Coroiu Cristina d850d799a0 Merge inbound to mozilla-central a=merge 2018-11-14 11:51:31 +02:00
Brian Grinstead 35b0511c9a Bug 1425874 - Implement HTMLMarqueeElement r=bzbarsky
This adds a new class for the marquee tag, instead of overloading HTMLDivElement.
It removes some of the XBL that was used to expose properties to web content.

Differential Revision: https://phabricator.services.mozilla.com/D3824

--HG--
extra : moz-landing-system : lando
2018-11-14 05:29:11 +00:00
Bogdan Tara fc8134a16a Backed out 12 changesets (bug 1471535) for VideoDecoderChild failures CLOSED TREE
Backed out changeset 3d8a11458d79 (bug 1471535)
Backed out changeset 2176010bc1fe (bug 1471535)
Backed out changeset dfb4d3462b22 (bug 1471535)
Backed out changeset ea6b73ded74d (bug 1471535)
Backed out changeset 404d760a9e82 (bug 1471535)
Backed out changeset 28ae4b6fab68 (bug 1471535)
Backed out changeset af91e1f04c2d (bug 1471535)
Backed out changeset d39fef4334b3 (bug 1471535)
Backed out changeset a038821cd8ae (bug 1471535)
Backed out changeset 5dcc74a938c6 (bug 1471535)
Backed out changeset 53aff7e699b4 (bug 1471535)
Backed out changeset f3f6abc052f0 (bug 1471535)

--HG--
rename : dom/media/ipc/GpuDecoderModule.cpp => dom/media/ipc/RemoteVideoDecoder.cpp
rename : dom/media/ipc/GpuDecoderModule.h => dom/media/ipc/RemoteVideoDecoder.h
2018-11-13 23:31:56 +02:00
Yaron Tausky 4ca3f2f37b Bug 1506868: Replace calls to std::atomic_thread_fence in TSan mode r=froydnj
TSan doesn't support std::atomic_thread_fence, so in order to avoid noisy
output, we can replace the fence with an atomic load when building with
-fsanitize=thread. This is a better alternative than error message
suppression since it's closer to the relevant code and thus much likelier
to survive changes to it.

Differential Revision: https://phabricator.services.mozilla.com/D11803

--HG--
extra : moz-landing-system : lando
2018-11-13 21:13:06 +00:00
Yaron Tausky 4db19652d1 Bug 1504638 - Put some of WorkerPrivate's members behind thread access guards r=asuth,baku,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D10368

--HG--
extra : moz-landing-system : lando
2018-11-13 20:22:40 +00:00
Michael Froman 563ff5b11d Bug 1471535 - pt12 - Hook up RDD process and Remote decoding. r=jya,spohl
Depends on D8493

Differential Revision: https://phabricator.services.mozilla.com/D8494

--HG--
extra : moz-landing-system : lando
2018-11-13 17:36:47 +00:00
Michael Froman b0b3a51bf4 Bug 1471535 - pt10 - Handle memory reporting for RDD. r=jya,erahm
Depends on D8491

Differential Revision: https://phabricator.services.mozilla.com/D8492

--HG--
extra : moz-landing-system : lando
2018-11-13 17:36:10 +00:00
Michael Froman f862c70f8d Bug 1471535 - pt6 - Add GeckoProcessType_RDD. r=jya
Depends on D8487

Differential Revision: https://phabricator.services.mozilla.com/D8488

--HG--
extra : moz-landing-system : lando
2018-11-13 17:35:21 +00:00
Sylvestre Ledru 2b4847d320 Bug 1506538 - Remove +x permissions on C++ source files r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D11609

--HG--
extra : moz-landing-system : lando
2018-11-13 15:32:08 +00:00
Emilio Cobos Álvarez 6ca25ecbe6 Bug 1499170 - Add an atom bit to know whether we're ascii lowercase. r=njn
And thus massively speed up ascii-case-insensitive atom comparisons when both
atoms are lowercase (which is the common case by far).

This removes almost all the slow selector-matching in this page, and it seems
an easier fix than storing the lowercased version of all class-names in quirks
mode in elements and selectors...

Differential Revision: https://phabricator.services.mozilla.com/D10945

--HG--
extra : moz-landing-system : lando
2018-11-13 12:47:40 +00:00
Jean-Yves Avenard 62bd78954f Bug 1505910 - P3. Remove now unused AsTaskQueue(). r=gerald
Depends on D11492

Differential Revision: https://phabricator.services.mozilla.com/D11493

--HG--
extra : moz-landing-system : lando
2018-11-09 21:38:38 +00:00
Jean-Yves Avenard 6ba9a04554 Bug 1505910 - P2. Remove use of AsTaskQueue(). r=cpearce
Make IsCurrentThreadIn() const.

Depends on D11491

Differential Revision: https://phabricator.services.mozilla.com/D11492

--HG--
extra : moz-landing-system : lando
2018-11-12 01:09:03 +00:00
Razvan Maries f502ea6ce1 Merge mozilla-central to mozilla-inbound. a=merge 2018-11-10 02:24:04 +02:00
Jean-Yves Avenard 31ed9de297 Bug 1504643 - Enforce template-parameter classes restrictions in MozPromise. r=gerald
Make thorough use of move semantic for MozPromise using nsTArray

Differential Revision: https://phabricator.services.mozilla.com/D11346

--HG--
extra : moz-landing-system : lando
2018-11-09 15:45:31 +00:00
Sylvestre Ledru 088cb71b59 Bug 1505943 - Add clang-format off to keep the line the same way r=andi
Avoid lint cpp-virtual-final false positive

Differential Revision: https://phabricator.services.mozilla.com/D11476

--HG--
extra : moz-landing-system : lando
2018-11-09 15:09:58 +00:00
Eric Rahm a1f2e901e5 Bug 1504356 - Lock ThreadListMutex before accessing thread list. r=kmag
--HG--
extra : rebase_source : 728653b7568e8a602616522f38f1b6d68290fb55
2018-11-13 10:48:38 -08:00
Yoshi Huang f2e1d9efb3 Bug 1478533 - Add a static_assert for WeakMap. r=jonco, mccr8
If an object is used as a WeakMap key, its TraceKind should be added
into CC graph, so adding a static_assert to make sure this.
2018-11-16 10:58:34 +01:00
Razvan Maries 3b217cc771 Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-11-20 00:36:35 +02:00
Ciure Andrei 2b079b82ee Backed out 2 changesets (bug 1506324) for bustages error: redefinition of 'DefaultGlobalClassOps' CLOSED TREE
Backed out changeset 412920e602fa (bug 1506324)
Backed out changeset f00f5277735f (bug 1506324)
2018-11-19 23:07:34 +02:00
Philip Chimento 31c3522845 Bug 1506324 - Use DefaultGlobalClassOps in existing code. r=jorendorff
Summary: Depends on D11570

Reviewers: tcampbell, jorendorff

Reviewed By: tcampbell, jorendorff

Subscribers: jandem

Bug #: 1506324

Differential Revision: https://phabricator.services.mozilla.com/D11571
2018-11-19 09:05:07 -05:00
Nathan Froyd 1ae4750ecb Bug 1506730 - remove PLDHashTable::Iterator::mStart; r=njn
We only use its value in one place, and said value is easily computable
from readily available information.  This change makes iterators
slightly smaller.
2018-11-19 09:54:04 -05:00
Razvan Maries 4d174cdd7d Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-11-15 00:37:56 +02:00
Andrea Marchesini 33c61a5c80 Bug 1492036 - Reporting API - part 6 - FeaturePolicy, r=smaug 2018-11-14 20:02:33 +01:00
Andrea Marchesini db43f2464c Bug 1492036 - Reporting API - part 3 - Deprecate reports, r=smaug 2018-11-14 20:02:33 +01:00
Dorel Luca 17253c6f93 Merge mozilla-central to mozilla-inbound 2018-11-09 19:41:24 +02:00
Emilio Cobos Álvarez 03ce7b0699 Bug 1392185 - Remove dynamic HTML5 atoms. r=njn,hsivonen
This is a rebase + manual refcounting on some places, + cleanup of the original
patch in the bug.

Co-authored-by: Nicholas Nethercote <nnethercote@mozilla.com>

Differential Revision: https://phabricator.services.mozilla.com/D11035
2018-11-09 14:45:30 +01:00
Gurzau Raul ff7bbb9936 Merge mozilla-central to inbound. a=merge CLOSED TREE
--HG--
rename : dom/media/ipc/RemoteVideoDecoder.cpp => dom/media/ipc/GpuDecoderModule.cpp
rename : dom/media/ipc/RemoteVideoDecoder.h => dom/media/ipc/GpuDecoderModule.h
extra : rebase_source : 0503e2d45fffafb1e8dd1ddcd2115af2778a5c66
2018-11-09 07:46:56 +02:00
Ting-Yu Lin a1e36d1d46 Bug 1421105 Part 2 - Implement column-span for block and inline frames. r=bzbarsky,dbaron
Other frames calling InitAndWrapInColumnSetFrameIfNeeded() needs to be
modified to support column-span (bug 1489295).

Depends on D5208

Differential Revision: https://phabricator.services.mozilla.com/D5209

--HG--
extra : moz-landing-system : lando
2018-10-30 05:41:30 +00:00
Kyle Machulis b1d077a87a Bug 1505891 - Allow XPIDL CEnums to be infallible; r=froydnj
They're just integers, so there's no reason they need to be fallible
since they're basically a built-in anyways.

Differential Revision: https://phabricator.services.mozilla.com/D11363

--HG--
extra : moz-landing-system : lando
2018-11-08 20:46:27 +00:00
Csoregi Natalia 6e0e603f48 Merge inbound to mozilla-central. a=merge 2018-11-07 11:52:57 +02:00
Brendan Dahl 9058324771 Bug 1490464 - Fix XUL attribute persistence for browser.xhtml. r=smaug
Move XUL persistence handling into it's own class and make it a separate
nsIDocumentObserver so it can also be used in non-XUL documents.
To avoid adding persistence to all non-XUL documents, a document must add
the "mozpersist" attribute to the root element if it wants enable the
feature.

Differential Revision: https://phabricator.services.mozilla.com/D6802

--HG--
extra : moz-landing-system : lando
2018-11-06 21:45:20 +00:00
Ehsan Akhgari 1cff159f84 Bug 1504194 - Part 2: Grant access to trackers across the same eTLD+1 r=baku
Depends on D10788

Differential Revision: https://phabricator.services.mozilla.com/D10789

--HG--
extra : moz-landing-system : lando
2018-11-06 07:39:42 +00:00
Gurzau Raul 1da9ef02c4 Merge inbound to mozilla-central. a=merge
--HG--
rename : testing/web-platform/tests/content-security-policy/navigate-to/form-action/form-action-blocks-navigate-to-allows.html => testing/web-platform/tests/content-security-policy/navigate-to/form-action/form-action-blocks-navigate-to-allows.sub.html
rename : testing/web-platform/tests/content-security-policy/navigate-to/spv-only-sent-to-initiator.html => testing/web-platform/tests/content-security-policy/navigate-to/spv-only-sent-to-initiator.sub.html
2018-11-06 11:57:49 +02:00
Kyle Machulis cd6f797161 Bug 1498059 - Add CEnum types to XPIDL; r=nika,froydnj
Add CEnum types to XPIDL, allowing for typed enums in C++ instead of
using uintXX_t types. Javascript will still reflect CEnums as
interface level consts.

Depends on D8593

Differential Revision: https://phabricator.services.mozilla.com/D8594

--HG--
extra : moz-landing-system : lando
2018-11-06 00:05:37 +00:00
Kyle Machulis 911d1c3784 Bug 1498059 - Allow 8-bit unsigned consts in XPIDL; , r=nika,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D8593

--HG--
extra : moz-landing-system : lando
2018-11-06 00:05:35 +00:00
Narcis Beleuzu 9b3f73e696 Merge mozilla-central to inbound. CLOSED TREE 2018-11-05 23:54:03 +02:00
Jean-Yves Avenard 91dbdb0a68 Bug 1504531 - P2. Add MozPromiseHolder::ResolveOrReject methods. r=gerald
Depends on D10833

Differential Revision: https://phabricator.services.mozilla.com/D10834

--HG--
extra : moz-landing-system : lando
2018-11-04 22:36:43 +00:00
Jean-Yves Avenard 6f99745b62 Bug 1504531 - P1. Use forward references in MozPromiseHolder. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D10833

--HG--
extra : moz-landing-system : lando
2018-11-05 14:26:23 +00:00
Emilio Cobos Álvarez bc8766b7fc Bug 1462233 - Implement the env() function with hardcoded zeros for safe-area-inset. r=heycam,firefox-style-system-reviewers
Intent to Implement and Ship: https://groups.google.com/d/msg/mozilla.dev.platform/EVKyR1B87T0/_l-_qK8SAAAJ

Differential Revision: https://phabricator.services.mozilla.com/D9609

--HG--
extra : moz-landing-system : lando
2018-11-05 10:39:46 +00:00
Ciure Andrei 46f758b8b5 Backed out changeset cb84a3ed7bdd (bug 1504557) for nsErrorService leakcheck failures CLOSED TREE 2018-11-05 05:17:40 +02:00
Ehsan Akhgari e95c3cca7d Bug 1504557 - Remove the XPCOM registration for nsErrorService r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D10848

--HG--
extra : moz-landing-system : lando
2018-11-05 00:43:41 +00:00
Ehsan Akhgari 3f93a1ac85 Bug 1504558 - Mark nsIErrorService an non-scriptable r=froydnj
There are no scriptable consumers of this interface.

Differential Revision: https://phabricator.services.mozilla.com/D10849

--HG--
extra : moz-landing-system : lando
2018-11-05 00:45:10 +00:00
shindli 7c0a5e2aef Merge inbound to mozilla-central. a=merge 2018-11-03 11:40:50 +02:00
Gerald Squelart 1d2a9c227e Bug 1503468 - Add more AUTO_PROFILER_THREAD_SLEEP's - r=mstange
These are around wait functions that already had an IDLE marker.

Differential Revision: https://phabricator.services.mozilla.com/D10671

--HG--
extra : moz-landing-system : lando
2018-11-02 16:26:50 +00:00
Valentin Gosu 84b31379ce Bug 1503725 - Do not deallocate nsThreadShutdownContext when leaking thread. r=erahm
Sometimes when we call ShutdownWithTimeout on a thread pool, the unresponsive
thread that we leak will actually complete before the main thread is done.
In that case, the thread will dereference the thread shutdown context, so
we must intentionally leak it too.

Differential Revision: https://phabricator.services.mozilla.com/D10645
2018-11-02 17:38:37 -04:00
Brian Hackett d783f332ba Bug 1504830 - Don't collect snow white objects when recording/replaying, r=mccr8.
--HG--
extra : rebase_source : 7bd6ab505cf3537aa254d69ada09eebad97b1834
2018-11-05 10:54:38 -10:00
Gabriele Svelto 266ef73c96 Bug 1503207 - Remove nsWeakPtr.h and cleanup all files including weak reference-related headers r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D10251

--HG--
extra : moz-landing-system : lando
2018-10-31 20:39:03 +00:00
arno renevier 346fad4655 Bug 497136 - Replace NS_ERROR_SERVICE_NOT_FOUND with NS_ERROR_SERVICE_NOT_AVAILABLE. r=benjamin sr=dveditz
--HG--
extra : source : 532102f7d61ac5ca9a48c4e2c7257b3162655b50
2018-10-31 19:56:24 +09:00
Cosmin Sabou f341826914 Merge mozilla-central to mozilla-inbound. a=merge 2018-11-05 18:20:54 +02:00
Ehsan Akhgari 7e258df307 Bug 1504557 - Remove the XPCOM registration for nsErrorService; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D10848
2018-11-05 09:44:58 -05:00
Daosheng Mu e9931800c1 Bug 1498625 - Part 2: Switch VR process to TYPE_MOZILLA_CHILD message loop type. r=froydnj,handyman
Differential Revision: https://phabricator.services.mozilla.com/D10643

--HG--
extra : moz-landing-system : lando
2018-11-05 21:28:38 +00:00
Kirk Steuber 64e3703341 Bug 1501491 - Fix the Firefox build flag: --disable-content-sandbox r=bobowen,handyman
Differential Revision: https://phabricator.services.mozilla.com/D9811

--HG--
extra : moz-landing-system : lando
2018-10-30 11:44:22 +00:00
Myk Melez 239f128d8d Bug 1497356 - make NsresultExt.to_result() return Result<(), nsresult> r=froydnj
NsresultExt.to_result() is called by Rust code, so it would be more idiomatic for it to return Result<(), nsresult>, i.e. to return Ok(()) when the nsresult is NS_OK.  This change makes it do so.

MozReview-Commit-ID: EaMEKfonHhC

Differential Revision: https://phabricator.services.mozilla.com/D10127

--HG--
extra : moz-landing-system : lando
2018-10-29 22:35:23 +00:00
Myk Melez 9b692b9cbd Bug 1503031 - use ::nserror::nsresult everywhere in IDL-generated Rust files r=froydnj
After bug 1496622, the IDL parser converts some references to `nsresult` in IDL files to `::nserror::nsresult` in IDL-generated Rust files.  But it doesn't convert others.  It should convert them all consistently, and this patch makes it do so by adding conversion of the return type of attribute getters/setters and references generated by the IDL parser's Typedef class.

MozReview-Commit-ID: 838K8XGjvTx

Differential Revision: https://phabricator.services.mozilla.com/D10121

--HG--
extra : moz-landing-system : lando
2018-10-29 21:23:21 +00:00
Brian Hackett bae5179cfb Bug 1502207 Part 2 - Fix useUse new atomic access API in Gecko, r=froydnj.
--HG--
extra : rebase_source : 2b9b5bb77fb53cd9f028912b4ba54136c9066447
2018-10-25 11:42:18 -10:00
Csoregi Natalia a21ac3d8e5 Merge inbound to mozilla-central. a=merge 2018-10-27 12:48:40 +03:00
Cosmin Sabou 125a3ce9d8 Merge mozilla-central to autoland. a=merge
--HG--
extra : rebase_source : 24058e51e8b2f1c418e99b65a7ffb81209700389
2018-10-27 01:50:33 +03:00
Valentin Gosu 412446f4bc Bug 1500861 - Add shutdownWithTimeout method to nsIThreadPool r=froydnj,erahm
This method is necessary because some threads might be stuck making blocking
calls. This means the thread is not processing any events, and we're unable
to safely terminate it. Our solution here is to leak the stuck threads
instead of waiting for them and potentially causing a shutdown hang.

Differential Revision: https://phabricator.services.mozilla.com/D9601

--HG--
extra : moz-landing-system : lando
2018-10-26 18:46:00 +00:00
Eric Rahm f5ec738046 Bug 1500523 - Increase DMD timeout. r=njn
This bumps the timeout when waiting for reports to 180 seconds which seems to
be long enough for MacOS in automation.

--HG--
extra : rebase_source : 6eb396e53bd37f6640b7c5402fb997c73af40d99
2018-10-22 14:05:47 -07:00
Nicholas Hurley 2319ff8d81 Bug 1050329 - part 2 - Add error page for h2 goaway. r=dragana,bzbarsky
This is kind of like the previous patch (where we had a not-very-friendly user experience shutting down misbehaving h2 sessions), but in this case the server has proven to us that it can speak a minimum of h2, so we don't want to just fallback. Instead, when we send a GOAWAY frame because we have detected some error on the part of the server, if it's a top-level page load, we'll show an error page explaining that the server spoke bad http/2, and the site admin(s) need to be contacted. We already did this for INADEQUATE_SECURITY (which is its own special case still), but that didn't cover all the cases.

Differential Revision: https://phabricator.services.mozilla.com/D8436

--HG--
extra : moz-landing-system : lando
2018-10-25 20:46:46 +00:00
Adrian Wielgosik d4785563da Bug 1480245, part 4 - Remove always-true nsXPTInterfaceInfo::IsScriptable(). r=nika
Differential Revision: https://phabricator.services.mozilla.com/D9646

--HG--
extra : moz-landing-system : lando
2018-10-25 09:55:05 +00:00
Adrian Wielgosik 3aae9fcc99 Bug 1480245, part 3 - Remove always-true nsXPTInterfaceInfo::EnsureResolved(). r=nika
Differential Revision: https://phabricator.services.mozilla.com/D9645

--HG--
extra : moz-landing-system : lando
2018-10-24 17:39:47 +00:00
Adrian Wielgosik e6326985f3 Bug 1480245, part 1 - Remove compatibility methods from nsXPTInterfaceInfo. r=nika
I left GetMethodInfo, GetConstant as they are still useful as separate methods.

Differential Revision: https://phabricator.services.mozilla.com/D9638

--HG--
extra : moz-landing-system : lando
2018-10-25 09:56:26 +00:00
Nika Layzell 5b24f801f7 Bug 1500927 - Add copy-free jsstring support to perfecthash.py, r=bzbarsky
This is needed for bug 1500926. It takes the approach of taking a JSFlatString
and using AutoAssertCannotGC to read the memory directly from the JS heap.
This lets us avoid re-encoding strings when performing lookups, which can be
advantageous.

Only ASCII strings are supported by this handler, and wide strings are hashed
as though they contain only values under 0x7f. This is OK as invalid keys to
perfecthash may return any hashtable entry.

Differential Revision: https://phabricator.services.mozilla.com/D9405
2018-10-24 20:11:01 -04:00
Ryan Hunt 1601a8bb80 Bug 1453425 - Add relative scroll offset updates using nsGkAtoms::relative. r=botond
This commit adds a scroll origin, nsGkAtoms::relative, which can be used to
mark main thread scrolling that can be combined with a concurrent APZ scroll.

The behavior of this is controlled by a pref, apz.relative-update. This pref
is initially activated and is intended as an aid to narrowing down causes
of regressions for users in bug reports.

Relative scroll updates work by tracking the last sent or accepted APZ
scroll offset. This is sent along with every FrameMetrics. Additionally,
a flag is added to FrameMetrics, mIsRelative, indicating whether the
scroll offset can be combined with a potential APZ scroll. When this
flag is set, AsyncPanZoomController will apply the delta between the sent
base scroll offset, and sent new scroll offset.

This flag is controlled by the last scroll origin on nsGfxScrollFrame. The
new origin, `relative`, is marked as being able to clobber APZ updates,
but can only be set if all scrolls since the last repaint request or
layers transaction have been relative.

Differential Revision: https://phabricator.services.mozilla.com/D8234

--HG--
extra : rebase_source : 51351a84c9cda228a0975e22eda3fd3bd8d261c4
extra : histedit_source : 4b564c19b16fe2bd26adc671b62b7cb6106e8163
2018-10-09 23:24:28 -05:00
Andrew McCreight 9978e851df Bug 1492584, part 3 - Remove JS component loader registration. r=kmag
After the previous patches, we no longer rely on the component manager
to incidentally start up XPConnect when we load the JS loader service
or to hold the JS component loader alive, so the do_GetService() call
for the JS loader in XPCOMInit.cpp can be removed. After that is done,
the JS loader is no longer used as an XPCOM component, so all of the
boilerplate for that can be removed.

Depends on D8757

Differential Revision: https://phabricator.services.mozilla.com/D8758

--HG--
extra : moz-landing-system : lando
2018-10-23 23:20:38 +00:00
Andrew McCreight 681cefeb09 Bug 1492584, part 1 - Eagerly initialize nsLayoutModule in the component manager. r=froydnj
nsLayoutModule must be initialized in order to call into JS, but I
don't want to have to rely on calling a service in that
module. Instead, always initialize the module very early in component
manager initialization. This also makes initialization more
consistent, so things like errors in manifests won't affect when it
happens, which can result in different behavior in different builds.

I also made nsLayoutModule initialization infallible, because I can't
imagine that we can do much that is useful without it.

Another change I made is that gInitialized is set to true even in a
GPU process. This simplifies checking whether initialization has
happened already when we start up the layout module.

Differential Revision: https://phabricator.services.mozilla.com/D9583

--HG--
extra : moz-landing-system : lando
2018-10-24 16:10:29 +00:00
Noemi Erli 06a8cd8e3c Backed out changeset bee1c344cb47 (bug 1491909) for failures in browser/components/extensions/test/xpcshell/test_ext_geckoProfiler_control.js 2018-10-24 04:23:13 +03:00
Denis Palmeiro fc930ad16f Bug 1491909 - Add an AllocPolicy to mozilla::JSONWriter r=jwalden,mstange
JSONWriter currently calls new and delete indirectly through mozilla::MakeUnique to allocate a buffer.  Becuase of this, the methods of this class cannot be invoked within Spidermonkey due to https://searchfox.org/mozilla-central/source/config/check_vanilla_allocations.py#6-14.  Therefore, JSONWriter needs an AllocPolicy template parameter so that the allocation and deallocation routines can be changed to match the JS AllocPolicy when invoked within SpiderMonkey.

Differential Revision: https://phabricator.services.mozilla.com/D7279

--HG--
extra : moz-landing-system : lando
2018-10-23 20:46:31 +00:00
Kirk Steuber 19c8368ea5 Bug 1458314 - Move the update directory to an installation specific location r=rstrong
This change applies to Windows only.
Firefox will need to migrate the directory from the old location to the new location. This will be done only once by setting the pref `app.update.migrated.updateDir2.<install path hash>` to `true` once migration has completed.

Note: The pref name app.update.migrated.updateDir has already been used, thus the '2' suffix. It can be found in ESR24.

This also removes the old handling fallback for generating the update directory path. Since xulrunner is no longer supported, this should no longer be needed. If neither the vendor nor app name are defined, it falls back to the literal string "Mozilla".

The code to generate the update directory path and the installation hash have been moved to the updatecommon library. This will allow those functions to be used in Firefox, the Mozilla Maintenance Service, the Mozilla Maintenance Service Installer, and TestAUSHelper.

Additionally, the function that generates the update directory path now has extra functionality. It creates the update directory, sets the permissions on it and, optionally, recursively sets the permissions on everything within.

This patch adds functionality that allows Firefox to set permissions on the new update directory on write failure. It attempts to set the permissions itself and, if that fails and the maintenance service is enabled, it calls into the maintenance service to try from there. If a write fails and the permissions cannot be fixed, the user is prompted to reinstall.

Differential Revision: https://phabricator.services.mozilla.com/D4249

--HG--
rename : toolkit/mozapps/update/updater/win_dirent.cpp => toolkit/mozapps/update/common/win_dirent.cpp
rename : toolkit/mozapps/update/tests/unit_aus_update/cleanupSuccessLogMove.js => toolkit/mozapps/update/tests/unit_aus_update/updateDirectoryMigrate.js
extra : moz-landing-system : lando
2018-10-23 21:41:04 +00:00
Jim Blandy a78e7a516e Bug 1499534: Add Pause, Resume, and IsPaused methods to ThrottledEventQueue. r=froydnj
Depends on D8913

Differential Revision: https://phabricator.services.mozilla.com/D8914

--HG--
extra : moz-landing-system : lando
2018-10-23 06:21:10 +00:00
Andrew McCreight 0ee66a7f4f Bug 1497707, part 5 - Inline mozilla::ModuleLoader into mozJSComponentLoader. r=froydnj
Now that the XPCOM component loader infrastructure has stopped
pretending to support other file extensions, this intermediate
interface is no longer needed.

Depends on D8171

Differential Revision: https://phabricator.services.mozilla.com/D8172

--HG--
extra : moz-landing-system : lando
2018-10-23 00:46:49 +00:00
Andrew McCreight f7cab62df4 Bug 1497707, part 4 - Only support loading JS files in the component manager. r=froydnj
JS is the only file extension actually supported, and there are a few
layers of cruft that can be eliminated if we specialize it.

This eliminates one XPCOM registration of the JS component loader.

Depends on D8170

Differential Revision: https://phabricator.services.mozilla.com/D8171

--HG--
extra : moz-landing-system : lando
2018-10-23 00:47:38 +00:00
Andrew McCreight 678b7ca2b3 Bug 1497707, part 3 - Remove various unused things from nsComponentManager. r=froydnj
Depends on D8169

Differential Revision: https://phabricator.services.mozilla.com/D8170

--HG--
extra : moz-landing-system : lando
2018-10-23 00:47:31 +00:00
Andrew McCreight 5c342e70f3 Bug 1497707, part 2 - The second argument to nsComponentManagerImpl::RegisterModule is always null. r=froydnj
This allows some code to be deleted, including a KnownModule ctor.

Depends on D8168

Differential Revision: https://phabricator.services.mozilla.com/D8169

--HG--
extra : moz-landing-system : lando
2018-10-23 00:47:24 +00:00
Sebastian Hengst 1ad50182a7 merge mozilla-central to autoland
--HG--
rename : third_party/rust/nom/.cargo-checksum.json => third_party/rust/nom-3.2.1/.cargo-checksum.json
rename : third_party/rust/nom/CHANGELOG.md => third_party/rust/nom-3.2.1/CHANGELOG.md
rename : third_party/rust/nom/Cargo.toml => third_party/rust/nom-3.2.1/Cargo.toml
rename : third_party/rust/nom/src/bits.rs => third_party/rust/nom-3.2.1/src/bits.rs
rename : third_party/rust/nom/src/branch.rs => third_party/rust/nom-3.2.1/src/branch.rs
rename : third_party/rust/nom/src/bytes.rs => third_party/rust/nom-3.2.1/src/bytes.rs
rename : third_party/rust/nom/src/character.rs => third_party/rust/nom-3.2.1/src/character.rs
rename : third_party/rust/nom/src/internal.rs => third_party/rust/nom-3.2.1/src/internal.rs
rename : third_party/rust/nom/src/lib.rs => third_party/rust/nom-3.2.1/src/lib.rs
rename : third_party/rust/nom/src/macros.rs => third_party/rust/nom-3.2.1/src/macros.rs
rename : third_party/rust/nom/src/methods.rs => third_party/rust/nom-3.2.1/src/methods.rs
rename : third_party/rust/nom/src/multi.rs => third_party/rust/nom-3.2.1/src/multi.rs
rename : third_party/rust/nom/src/nom.rs => third_party/rust/nom-3.2.1/src/nom.rs
rename : third_party/rust/nom/src/regexp.rs => third_party/rust/nom-3.2.1/src/regexp.rs
rename : third_party/rust/nom/src/sequence.rs => third_party/rust/nom-3.2.1/src/sequence.rs
rename : third_party/rust/nom/src/simple_errors.rs => third_party/rust/nom-3.2.1/src/simple_errors.rs
rename : third_party/rust/nom/src/str.rs => third_party/rust/nom-3.2.1/src/str.rs
rename : third_party/rust/nom/src/stream.rs => third_party/rust/nom-3.2.1/src/stream.rs
rename : third_party/rust/nom/src/traits.rs => third_party/rust/nom-3.2.1/src/traits.rs
rename : third_party/rust/nom/src/util.rs => third_party/rust/nom-3.2.1/src/util.rs
rename : third_party/rust/nom/src/verbose_errors.rs => third_party/rust/nom-3.2.1/src/verbose_errors.rs
rename : third_party/rust/nom/src/whitespace.rs => third_party/rust/nom-3.2.1/src/whitespace.rs
rename : third_party/rust/nom/tests/arithmetic.rs => third_party/rust/nom-3.2.1/tests/arithmetic.rs
rename : third_party/rust/nom/tests/arithmetic_ast.rs => third_party/rust/nom-3.2.1/tests/arithmetic_ast.rs
rename : third_party/rust/nom/tests/blockbuf-arithmetic.rs => third_party/rust/nom-3.2.1/tests/blockbuf-arithmetic.rs
rename : third_party/rust/nom/tests/cross_function_backtracking.rs => third_party/rust/nom-3.2.1/tests/cross_function_backtracking.rs
rename : third_party/rust/nom/tests/float.rs => third_party/rust/nom-3.2.1/tests/float.rs
rename : third_party/rust/nom/tests/ini.rs => third_party/rust/nom-3.2.1/tests/ini.rs
rename : third_party/rust/nom/tests/ini_str.rs => third_party/rust/nom-3.2.1/tests/ini_str.rs
rename : third_party/rust/nom/tests/issues.rs => third_party/rust/nom-3.2.1/tests/issues.rs
rename : third_party/rust/nom/tests/json.rs => third_party/rust/nom-3.2.1/tests/json.rs
rename : third_party/rust/nom/tests/mp4.rs => third_party/rust/nom-3.2.1/tests/mp4.rs
rename : third_party/rust/nom/tests/multiline.rs => third_party/rust/nom-3.2.1/tests/multiline.rs
rename : third_party/rust/nom/tests/named_args.rs => third_party/rust/nom-3.2.1/tests/named_args.rs
rename : third_party/rust/nom/tests/omnom.rs => third_party/rust/nom-3.2.1/tests/omnom.rs
rename : third_party/rust/nom/tests/overflow.rs => third_party/rust/nom-3.2.1/tests/overflow.rs
rename : third_party/rust/nom/tests/reborrow_fold.rs => third_party/rust/nom-3.2.1/tests/reborrow_fold.rs
rename : third_party/rust/nom/tests/test1.rs => third_party/rust/nom-3.2.1/tests/test1.rs
extra : rebase_source : 6c5b45c092fd51bf1b3ce15960416fb59311d152
2018-10-22 20:34:24 +03:00
Sebastian Hengst 602fbb8422 merge mozilla-inbound to mozilla-central. a=merge 2018-10-22 20:26:16 +03:00
ffxbld 2bf422025a Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2018-10-22 08:50:03 -07:00
Nathan Froyd 6ac1ba1c91 Bug 1499723 - make IdleRunnableWrapper final; r=farre 2018-10-22 09:44:50 -04:00
Nathan Froyd d81ba0426a Bug 1499725 - make IdleTaskRunner timers more efficient; r=farre
Instead of creating a timer and then setting the timer's target, we can
determine the timer's target and pass it in directly when the timer is
created.  This reordering of steps is slightly more efficient, since
SetTarget() is both a virtual call and requires locking, both of which
can be skipped if we know the target at timer creation time.  If we're
reusing the timer, we also don't need to repeatedly set the timer's
target: we can set the target once at timer creation, and then be done.

We can do this safely here because mTaskCategory doesn't change
throughout the life of the IdleTaskRunner; we make mTaskCategory `const`
to make this more explicit to the reader.
2018-10-22 09:44:50 -04:00
Gurzau Raul 8e9ffaaf06 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-10-20 01:09:52 +03:00
Ehsan Akhgari 09cad95c1d Bug 1499918 - Strip URLs reported to the console by the anti-tracking module of any username/password r=baku
Differential Revision: https://phabricator.services.mozilla.com/D9055

--HG--
extra : moz-landing-system : lando
2018-10-19 21:47:43 +00:00
Andrea Marchesini 2ed3dd4f7d Bug 1500370 - MemoryBlobImpl and TestNonBlockingAsyncInputStream must expose nsITellableInterface, r=mayhemer 2018-10-19 15:31:36 +02:00
Karl Tomlinson 97f2efff13 Bug 1499212 align Replace/Insert/AppendLiteral parameter restrictions with those of AssignLiteral r=dbaron
There is no advantage in making these methods more restrictive on their
parameters than AssignLiteral.

The current implementation of the AppendLiteral overloads for equivalent
char_types is more permissive than AssignLiteral, but comments in the
implementation mention the possible optimization used in AssignLiteral and so
are assuming a similar constant and static storage duration restriction on its
parameter.  The optimization may never be implemented, but clients that would
benefit from support for non-constant or non-static parameters are also
expected to be rare, so there is little value in ruling out the optimization
at this stage.

ReplaceLiteral currently uses the AssignLiteral optimization.

Differential Revision: https://phabricator.services.mozilla.com/D8777

--HG--
extra : moz-landing-system : lando
2018-10-19 01:07:41 +00:00
Karl Tomlinson 539768fc12 Bug 1499212 - document that Literal parameters must have a null terminator r=dbaron
A character array initialized with a list of character literals will not
necessarily have a trailing null-terminator required for AssignLiteral or
trimmed in EqualsLiteral.

Depends on D8775

Differential Revision: https://phabricator.services.mozilla.com/D8951

--HG--
extra : moz-landing-system : lando
2018-10-19 01:26:21 +00:00
Karl Tomlinson ba7a754a76 Bug 1499212 adjust Literal method doc so as not to imply that |this| must be a literal string r=dbaron
Depends on D8774

Differential Revision: https://phabricator.services.mozilla.com/D8775

--HG--
extra : moz-landing-system : lando
2018-10-19 01:07:10 +00:00
Karl Tomlinson aa77ee3384 Bug 1499212 - document reasons for restrictions on EqualsLiteral parameter r=dbaron
"Bound" is the term used in the C++ standard to describe the number of
elements in an array.

EqualsLiteral has no opportunity to optimize for constant and static storage
duration parameters.

Depends on D8773

Differential Revision: https://phabricator.services.mozilla.com/D8774

--HG--
extra : moz-landing-system : lando
2018-10-19 00:57:49 +00:00
Karl Tomlinson a53090cdff Bug 1499212 - suggest non-ASCII Assign for non-static-const same-char_type array parameters r=dbaron
There is no advantage in AssignASCII() for char, and AssignASCII() does not
exist for char16_t array and char_type.  Similarly for ReplaceASCII and
AppendASCII.  This AssignLiteral() overload already says it is not only for
ASCII.

Depends on D8771

Differential Revision: https://phabricator.services.mozilla.com/D8773

--HG--
extra : moz-landing-system : lando
2018-10-18 21:53:33 +00:00
Jim Blandy 208e7e94c1 Bug 1499534: Add GTests for ThrottledEventQueue. r=froydnj
This was already reviewed and approved in bug 1426467.

Differential Revision: https://phabricator.services.mozilla.com/D8913

--HG--
extra : moz-landing-system : lando
2018-10-22 14:47:44 +00:00
Haik Aftandilian 851ee0f677 Bug 1431441 - Part 2 - Remove rules for APP_BINARY_PATH and APP_DIR Mac sandbox parameters r=Alex_Gaynor
Simplify the content sandbox policy by removing APP_BINARY_PATH and APP_DIR Mac sandbox parameters and their associated rules in the policy. Keep APP_PATH which is a parent directory of APP_BINARY_PATH and APP_DIR. Change APP_PATH to be the path to the parent process .app directory and make GetAppPath return this path when called from the parent or a child process.

Depends on D6717

Differential Revision: https://phabricator.services.mozilla.com/D6719

--HG--
extra : moz-landing-system : lando
2018-10-19 18:23:06 +00:00
Haik Aftandilian 6344601010 Bug 1431441 - Part 1 - Move GetAppPaths and GetDirectoryPath to nsMacUtilsImpl as static methods r=Alex_Gaynor
Differential Revision: https://phabricator.services.mozilla.com/D6717

--HG--
extra : moz-landing-system : lando
2018-10-18 20:44:47 +00:00
Karl Tomlinson 70af2a5543 Bug 1499212 Document static storage requirement for same-char_type AssignLiteral overload r=dbaron
Depends on D8770

Differential Revision: https://phabricator.services.mozilla.com/D8771

--HG--
extra : moz-landing-system : lando
2018-10-16 21:09:27 +00:00
Karl Tomlinson 99c72e1028 Bug 1499212 remove mention of character pointers in docs for Literal methods r=dbaron
Since https://hg.mozilla.org/mozilla-central/rev/9db7cf4cc385#l13.44 the type
system always excludes calls with character pointers and so there is no need
to mention this in the comment.

The comment for the 8-bit to 16-bit AssignLiteral overload is modified a
little to use "char" instead of "character" so as not to imply that anything
other than 8-bit char parameters may be provided to that overload.

The ReplaceLiteral and InsertLiteral comments are adjusted to use "character"
instead of "char" so as not to imply that the method or comment is limited to
8-bit char parameters.

Differential Revision: https://phabricator.services.mozilla.com/D8770

--HG--
extra : moz-landing-system : lando
2018-10-16 21:07:20 +00:00
Brian Hackett e1cc56fa0f Bug 1488808 Part 17 - Allow paints to happen at the normal time when recording/replaying, r=nical.
--HG--
extra : rebase_source : c9a5536a9eeff96937643fdf7bf68e56e437cef1
2018-10-17 10:16:30 -06:00
Brian Hackett c1fc84be7c Bug 1488808 Part 16 - Avoid deadlocking in a few places after diverging from the recording, r=froydnj.
--HG--
extra : rebase_source : 2327cd9632cdc9ace793f9e9fea666d95f305201
2018-10-17 10:15:41 -06:00
Mark Banner ceaeb93550 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389

--HG--
extra : moz-landing-system : lando
2018-10-19 12:55:39 +00:00
André Bargull 25471aeefb Bug 1464475: Use HandleValue for the ErrorInterceptor API. r=sfink
--HG--
extra : rebase_source : 80419328a515a921498383b126904c17287ea85c
2018-10-26 10:38:30 -07:00
Jonathan Kingston 580c9a51e4 Bug 1483458 - Change HTML parser to look at .py Atom files. r=hsivonen,heycam
--HG--
extra : amend_source : 9285251fc49d4f56b67557ef77e163d6acbc2b1e
2018-10-17 20:40:37 +01:00
Andrea Marchesini 4ebf5b4364 Bug 1496581 - Split nsISeekableStream in 2 classes: nsISeekableStream and nsITellableStream, f=mayhemer, r=froydnj
In the current code there are 3 main issues:

1. nsFileStream is not really thread-safe. There is nothing to protect the
internal members and we see crashes.

2. nsPipeInputStream doesn't implement ::Seek() method and that caused issues
in devtools when a nsHttpChannel sends POST data using a pipe. In order to fix
this, bug 1494176 added a check in nsHttpChannel: if the stream doesn't
implement ::Seek(), let's clone it. This was an hack around nsPipeInputStream,
and it's bad.

3. When nsHttpChannel sends POST data using a file stream, nsFileStream does
I/O on main-thread because of the issue 2. Plus, ::Seek() is called on the
main-thread causing issue 1.

Note that nsPipeInputStream implements only ::Tell(), of the nsISeekableStream
methods. It doesn't implement ::Seek() and it doesn't implement ::SetEOF().

With this patch I want to fix point 2 and point 3 (and consequentially issue 1
- but we need a separate fix for it - follow up). The patch does:

1. it splits nsISeekableStream in 2 interfaces: nsITellableStream and
nsISeekableStream.
2. nsPipeInputStream implements only nsITellableStream.  Doing this, we don't
need the ::Seek() check for point 2 in nsHttpChannel: a simple QI check is
enough.
3. Because we don't call ::Seek() in nsHttpChannel, nsFileStream doesn't do I/O
on the main-thread, and we don't crash doing so.
2018-10-18 13:35:35 +02:00
Nathan Froyd 6d7cf47871 Bug 1498651 - make initial timer target setting more efficient; r=erahm
The NS_NewTimer* family of functions, when using a custom event target,
currently go through a path that looks something like:

  auto timer = createTimer()
  timer->SetTarget(target);
  // call the requisite Init* function
  return timer;

This setup is inefficient, because SetTarget requires the timer mutex to
be acquired.  The mutex acquisition here is completely unnecessary,
because the timer hasn't yet been shared out to the wider world; we can
set the timer target without acquiring the mutex at all because we know
that no sharing is possible at this point.

This patch reworks things somewhat to make that possible.
2018-10-17 19:57:36 -04:00
A. Wilcox 041115caa2 Bug 1498938 - Support [implicit_jscontext] XPIDL calls on Linux/PPC64.; r=froydnj 2018-10-17 23:12:51 +00:00
Jim Blandy 21708e2918 Bug 1499462: Remove dead failure handling and comments from ThrottledEventQueue::Create. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D8890

--HG--
extra : moz-landing-system : lando
2018-10-16 21:24:48 +00:00
Andrew McCreight 2df0136940 Bug 1498404 - Fix some errors in manifests r=froydnj
In FxAccountsComponents.manifest, the previous line registers the
component CID, but only for the main process. This means we hit an
error while parsing the manifest in the child process, because the CID
is not recognized. The fix is simply to not try to use the CID to
register the contract in the child process.

As for the rest of the changes, since bug 1438688, XPT information is
compiled into the Firefox binary, so the interfaces manifest entry is
no longer needed. This patch removes instances of this line from
manifest files. This makes some manifest files empty, so the patch
also removes the now-empty files.

Differential Revision: https://phabricator.services.mozilla.com/D8751

--HG--
extra : moz-landing-system : lando
2018-10-16 13:26:23 +00:00
Henri Sivonen 074a8bb5ea Bug 1460233 - Percent-encode ampersand and colon when replacing unmappable code points in URL query state. r=valentin
Spec change: https://github.com/whatwg/url/pull/386

MozReview-Commit-ID: Fa84kCNghtU

Differential Revision: https://phabricator.services.mozilla.com/D8728

--HG--
extra : moz-landing-system : lando
2018-10-16 12:04:12 +00:00
Dimi Lee 86eec944ad Bug 1439450 - Ignore has_first_value() check in ProtocolParser. r=francois
Sometimes the protocol buffer data (RiceEncodingData) sent by Google's Safe Browsing server has the following properties:

1. |has_first_value| is false
2. |num_entries| > 0

In this case, we can still parse the data and apply partial update correctly by assuming that the first value is equal to 0.

Differential Revision: https://phabricator.services.mozilla.com/D6393

--HG--
extra : moz-landing-system : lando
2018-10-16 10:36:01 +00:00
Gurzau Raul 21b5725e3c Merge inbound to mozilla-central. a=merge 2018-10-15 01:18:18 +03:00
Mats Palmgren 6ec2ba049c Bug 1494745 part 6 - Make ns[Auto]TObserverArray methods that insert/append an Item return void since they're infallible. r=bz 2018-10-14 18:12:23 +02:00
Narcis Beleuzu a2990eb898 Backed out 7 changesets (bug 1431441) as per haik`s request.
Backed out changeset 1dfdc7ba998d (bug 1431441)
Backed out changeset fb1a4ddbf9bf (bug 1431441)
Backed out changeset b59b1651fc15 (bug 1431441)
Backed out changeset 1e2bb579b824 (bug 1431441)
Backed out changeset 2a635530dfa3 (bug 1431441)
Backed out changeset 262da0be2fed (bug 1431441)
Backed out changeset b9cfda58fed3 (bug 1431441)

--HG--
extra : rebase_source : 7baf60c49683b419c0603979b0dff3befb2fbaf0
2018-10-14 18:20:01 +03:00
Stephen A Pohl eba696a4ff Bug 1497948: Ensure that enterprise policies are converted into a correct UTF-16 string that can be parsed by JS_ParseJSON on macOS. r=mstange 2018-10-13 18:52:35 -04:00
David Parks 99e17d748f Bug 1488439: Part 1 - Replace Windows temp folder in sandboxed plugin process (r=bobowen,erahm)
The sandbox blocks GetTempFileName's prior response, causing the system to end up searching a number of (inaccessible) folders to use as a replacement for the temp folder.  This patch provides a path to a new folder on the command line for the plugin process.  This new temp folder, specific to this plugin process instance, is then communicated to the system via the TEMP/TMP environment variables.  This is similar to what is done for the content process but avoids nsDirectoryService, which doesn't exist in plugin processes.

Differential Revision: https://phabricator.services.mozilla.com/D7532

--HG--
extra : moz-landing-system : lando
2018-10-12 22:36:22 +00:00
Sylvestre Ledru dd5741407b Bug 1498586 - Add clang-format off to avoid the reformatting of the data structures r=Ehsan
Too hard/impossible for the tool to format correctly these structs

Differential Revision: https://phabricator.services.mozilla.com/D8569

--HG--
extra : moz-landing-system : lando
2018-10-12 20:48:24 +00:00
Coroiu Cristina 4224edc453 Backed out 2 changesets (bug 1488439) for build bustage at /build/src/dom/plugins/ipc/PluginProcessParent.cpp on a CLOSED TREE
Backed out changeset 74b2087ee696 (bug 1488439)
Backed out changeset 85575fc37555 (bug 1488439)
2018-10-12 21:00:41 +03:00
David Parks 1ad569c6b1 Bug 1488439: Part 1 - Replace Windows temp folder in sandboxed plugin process (r=bobowen,erahm)
The sandbox blocks GetTempFileName's prior response, causing the system to end up searching a number of (inaccessible) folders to use as a replacement for the temp folder.  This patch provides a path to a new folder on the command line for the plugin process.  This new temp folder, specific to this plugin process instance, is then communicated to the system via the TEMP/TMP environment variables.  This is similar to what is done for the content process but avoids nsDirectoryService, which doesn't exist in plugin processes.

Differential Revision: https://phabricator.services.mozilla.com/D7532

--HG--
extra : moz-landing-system : lando
2018-10-12 17:40:10 +00:00
Haik Aftandilian a710b03285 Bug 1431441 - Part 2 - Remove rules for APP_BINARY_PATH and APP_DIR Mac sandbox parameters r=Alex_Gaynor
Simplify the content sandbox policy by removing APP_BINARY_PATH and APP_DIR Mac sandbox parameters and their associated rules in the policy. Keep APP_PATH which is a parent directory of APP_BINARY_PATH and APP_DIR.

Depends on D6717

Differential Revision: https://phabricator.services.mozilla.com/D6719

--HG--
extra : moz-landing-system : lando
2018-10-11 22:42:24 +00:00
Haik Aftandilian 1e79864339 Bug 1431441 - Part 1 - Move GetAppPaths and GetDirectoryPath to nsMacUtilsImpl as static methods r=Alex_Gaynor
Differential Revision: https://phabricator.services.mozilla.com/D6717

--HG--
extra : moz-landing-system : lando
2018-10-11 22:40:16 +00:00
Randell Jesup 12d6bb7b1c Bug 1299118: Implement Long Tasks API internals (not DOM access to it) r=froyd,mstange 2018-10-11 13:22:55 -04:00
shindli 0f211616dc Backed out 3 changesets (bug 1299118) for ES lint failures
Backed out changeset 14451eb9a2b8 (bug 1299118)
Backed out changeset e5adc30bdf7f (bug 1299118)
Backed out changeset 8f7bb583fbb5 (bug 1299118)
2018-10-11 20:47:58 +03:00
Randell Jesup 65111c20e6 Bug 1299118: Implement Long Tasks API internals (not DOM access to it) r=froyd,mstange 2018-10-11 13:22:55 -04:00
Diego Pino Garcia 94e966fca7 Bug 1357561 - ConstraintError should mention which constraint is not being satisfied. r=tt
The creation of a new index or an object store may trigger a
ConstraintError if any of those elements already exists. Unfortunately,
the information provided by the ConstraintError is not enough to
determine the conditions that triggered the error.

This patch overrides the generic ConstraintError message with more
specific information about the duplicated index or object store.
2018-10-11 13:06:11 +02:00
Nicholas Nethercote 613f5099a5 Bug 1460180 - Add a comment about RDF atoms. r=me
DONTBUILD because it's a comment-only change.

--HG--
extra : rebase_source : fc8462fdc4c7f425d7b0c3ce57d25239e6412c7d
2018-10-11 14:42:51 +11:00
Nicholas Nethercote 67bc77d4cf Bug 1497734 - Rename nsStaticAtom subclasses. r=heycam
Specifically:
- nsICSSAnonBoxPseudo --> nsCSSAnonBoxPseudoStaticAtom
- nsICSSPseudoElement --> nsCSSPseudoElementStaticAtom

The `nsI` prefix isn't necessary because these are no longer XPIDL types, and
the `StaticAtom` suffix makes their meaning clearer.

--HG--
extra : rebase_source : b68dd7c73f5036dcd6be4c3700b757441f59f9f2
2018-10-10 16:49:13 +11:00
Ehsan Akhgari 19e88f0bf4 Bug 1491403 - Part 3: Propagate the user input event handling state to the promise resolve handlers in case the promise creator requests it r=smaug,arai,baku
Depends on D7004

Differential Revision: https://phabricator.services.mozilla.com/D7005

--HG--
extra : moz-landing-system : lando
2018-10-09 21:42:22 +00:00
Ehsan Akhgari 36e567732f Bug 1491403 - Part 1: Add a promise argument to JSEnqueuePromiseJobCallback r=arai
Differential Revision: https://phabricator.services.mozilla.com/D7003

--HG--
extra : moz-landing-system : lando
2018-10-09 21:42:18 +00:00
Myk Melez 75ccec036c Bug 1496622 - convert Rust nsresult type alias to newtype w/#[repr(transparent)] r=froydnj
MozReview-Commit-ID: AkzSS587MvC

Differential Revision: https://phabricator.services.mozilla.com/D7832

--HG--
extra : moz-landing-system : lando
2018-10-09 16:02:32 +00:00
Haik Aftandilian ef8195ebcb Bug 1497408 - Make NS_MACPREFERENCESREADER_CID unique r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D8057

--HG--
extra : moz-landing-system : lando
2018-10-09 05:47:40 +00:00
Nathan Froyd 28aa04a6d1 Bug 1483699 - part 2 - make InsertSlotsAt error checking more thorough; r=mccr8
I don't know what the existing code was trying to do, but it certainly
wasn't clear, and possibly not correct.
2018-10-08 10:39:44 -04:00
Nathan Froyd 1e6d9316da Bug 1483699 - part 1 - add overflow checks for extending arrays; r=mccr8 2018-10-08 10:39:44 -04:00
Ryan Hunt 3771c1bcab Bug 1475139 part 1 - Add move assignment operator to nsTHashtable. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D6780

--HG--
extra : rebase_source : 516c2a8fb8c9c8dbb2e9927e1906b552d674977d
2018-09-24 21:23:17 -05:00
Tim Nguyen 6e26790a43 Bug 1416363 - Remove colorpicker binding and related code. r=bgrins,surkov
Depends on D7575

Differential Revision: https://phabricator.services.mozilla.com/D7576

--HG--
extra : moz-landing-system : lando
2018-10-04 01:03:19 +00:00
Andrew McCreight 045d2cf847 Bug 1493226, part 2 - Statically prevent trivial calls to do_QueryInterface that returns an nsresult r=froydnj
This is the same as the other patch, except that it is applied to the
case where the QI returns an nsresult.

In addition, I marked the WithError helper class as being stack-only.

Depends on D7553

Differential Revision: https://phabricator.services.mozilla.com/D7554

--HG--
extra : moz-landing-system : lando
2018-10-04 19:16:30 +00:00
Andrew McCreight 8ed5b13669 Bug 1493226, part 1 - Statically prevent trivial calls to do_QueryInterface r=froydnj
This patch adds a static assert to enforce that do_QueryInterface is
not used to go from a class to a base class, because that can be done
more efficiently via a static_cast. This is done by putting the type
of the source into the nsQueryInterface type. Once that is done, it is
easy to check the source and destination type. This has to be done
carefully so that in non-DEBUG builds, where NSCAP_FEATURE_USE_BASE is
defined, we don't generate any additional code.

The first step is to rename nsQueryInterface to
nsQueryInterfaceISupports. In DEBUG builds, I then add a new subtype
nsQueryInterface<T>, where T is the type of the object we are going to
QI. This class is a thin wrapper around nsQueryInterfaceISupports that
only forwards operations to the base class.

The main bit of trickery here is PointedToType<T>, which is needed to
get the type parameter for nsQueryInterface. This dereferences the
type, gets the address of it, then does RemovePointer. This is needed
because a wide variety of pointer types are passed in to
do_QueryInterface, including RefPtr<>, nsCOMPtr<>, raw pointers, and
OwningNonNull<>. PointedToType<RefPtr<T>> is equal to T,
PointedToType<T*> is equal to T, and so on.

In NSCAP_FEATURE_USE_BASE builds (opt), we only use
nsQueryInterfaceISupports, but in debug builds we use
nsQueryInterface<> where possible. The latter is also used for the
nsCOMPtr<nsISupports> overload, because we can always QI to
nsISupports, because that is sometimes used for canonicalization.

Another gross bit is that Assert_NoQueryNeeded can no longer use
nsCOMPtr<>, because it works by QIing T to T, which is banned by the
static analysis. Instead I had to reimplement it by hand.

Depends on D7527

Differential Revision: https://phabricator.services.mozilla.com/D7553

--HG--
extra : moz-landing-system : lando
2018-10-04 19:16:28 +00:00
Nicholas Nethercote 7398ecce66 Bug 1449787 - Make static atom pointers `constexpr`. r=froydnj,emilio
This saves one word per static atom, per process.

The `nsGkAtoms` change is only a small part of this commit.

In regen_atoms.py:

- There is now only one link name per platform: nsGkAtoms::sAtoms[].

- But there is a new constant per atom, giving the index into
  nsGkAtoms::sAtoms[].

- And the `atom!` macro for each atom indexes into nsGkAtoms::sAtoms[] using
  the index constant.

- A couple of `*mut` pointers are now `*const`.

Elsewhere, the `(nsStaticAtom*)` casts within the `AppendElement()` calls are
necessary to avoid link errors, presumably due to some template instantiation
wrinkle.

--HG--
extra : rebase_source : 629642e708c8bc6e27d6057beae5f35955fdd837
2018-10-04 09:16:11 +10:00
Andrea Marchesini 165f1339fd Bug 1494176 - nsHttpChannel must clone the upload stream if it doesn't implement ::Seek(), r=mayhemer 2018-10-03 22:51:55 +02:00
Tim Nguyen ffdd467173 Bug 1491688 - Introduce ::-moz-tree-row(blur) selector. r=emilio 2018-10-03 08:55:43 +02:00
Brian Hackett 579aa6d5df Bug 1503639 Part 7 - Remove instrumentation used to avoid taking locks after diverging from the recording, r=mccr8.
--HG--
extra : rebase_source : 4e08b46ebbe78ab175fd5a6b3e13da19b756f673
2018-10-31 10:23:23 -10:00
Jonathan Watt d42f097af8 Bug 1495562. Rename SVGRenderingObserverList to SVGRenderingObserverSet. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D7330

--HG--
extra : rebase_source : a8f71572d103c6ad5a84d5ad14a8d83bf2af5d5c
extra : source : ec5d3c12ad4c9b8d3c2eea2b0f71f5dc3c15f15f
2018-09-24 11:45:17 +01:00
Gurzau Raul ca3641419f Merge inbound to mozilla-central. a=merge
--HG--
rename : docshell/test/bug123696-subframe.html => docshell/test/mochitest/bug123696-subframe.html
rename : docshell/test/bug404548-subframe.html => docshell/test/mochitest/bug404548-subframe.html
rename : docshell/test/bug404548-subframe_window.html => docshell/test/mochitest/bug404548-subframe_window.html
rename : docshell/test/bug413310-post.sjs => docshell/test/mochitest/bug413310-post.sjs
rename : docshell/test/bug413310-subframe.html => docshell/test/mochitest/bug413310-subframe.html
rename : docshell/test/bug529119-window.html => docshell/test/mochitest/bug529119-window.html
rename : docshell/test/bug530396-noref.sjs => docshell/test/mochitest/bug530396-noref.sjs
rename : docshell/test/bug530396-subframe.html => docshell/test/mochitest/bug530396-subframe.html
rename : docshell/test/bug570341_recordevents.html => docshell/test/mochitest/bug570341_recordevents.html
rename : docshell/test/bug668513_redirect.html => docshell/test/mochitest/bug668513_redirect.html
rename : docshell/test/bug668513_redirect.html^headers^ => docshell/test/mochitest/bug668513_redirect.html^headers^
rename : docshell/test/bug691547_frame.html => docshell/test/mochitest/bug691547_frame.html
rename : docshell/test/dummy_page.html => docshell/test/mochitest/dummy_page.html
rename : docshell/test/file_anchor_scroll_after_document_open.html => docshell/test/mochitest/file_anchor_scroll_after_document_open.html
rename : docshell/test/file_bfcache_plus_hash_1.html => docshell/test/mochitest/file_bfcache_plus_hash_1.html
rename : docshell/test/file_bfcache_plus_hash_2.html => docshell/test/mochitest/file_bfcache_plus_hash_2.html
rename : docshell/test/file_bug1121701_1.html => docshell/test/mochitest/file_bug1121701_1.html
rename : docshell/test/file_bug1121701_2.html => docshell/test/mochitest/file_bug1121701_2.html
rename : docshell/test/file_bug1151421.html => docshell/test/mochitest/file_bug1151421.html
rename : docshell/test/file_bug1186774.html => docshell/test/mochitest/file_bug1186774.html
rename : docshell/test/file_bug1450164.html => docshell/test/mochitest/file_bug1450164.html
rename : docshell/test/file_bug385434_1.html => docshell/test/mochitest/file_bug385434_1.html
rename : docshell/test/file_bug385434_2.html => docshell/test/mochitest/file_bug385434_2.html
rename : docshell/test/file_bug385434_3.html => docshell/test/mochitest/file_bug385434_3.html
rename : docshell/test/file_bug475636.sjs => docshell/test/mochitest/file_bug475636.sjs
rename : docshell/test/file_bug509055.html => docshell/test/mochitest/file_bug509055.html
rename : docshell/test/file_bug511449.html => docshell/test/mochitest/file_bug511449.html
rename : docshell/test/file_bug540462.html => docshell/test/mochitest/file_bug540462.html
rename : docshell/test/file_bug580069_1.html => docshell/test/mochitest/file_bug580069_1.html
rename : docshell/test/file_bug580069_2.sjs => docshell/test/mochitest/file_bug580069_2.sjs
rename : docshell/test/file_bug590573_1.html => docshell/test/mochitest/file_bug590573_1.html
rename : docshell/test/file_bug590573_2.html => docshell/test/mochitest/file_bug590573_2.html
rename : docshell/test/file_bug598895_1.html => docshell/test/mochitest/file_bug598895_1.html
rename : docshell/test/file_bug598895_2.html => docshell/test/mochitest/file_bug598895_2.html
rename : docshell/test/file_bug634834.html => docshell/test/mochitest/file_bug634834.html
rename : docshell/test/file_bug598895_1.html => docshell/test/mochitest/file_bug637644_1.html
rename : docshell/test/file_bug598895_2.html => docshell/test/mochitest/file_bug637644_2.html
rename : docshell/test/file_bug640387.html => docshell/test/mochitest/file_bug640387.html
rename : docshell/test/file_bug653741.html => docshell/test/mochitest/file_bug653741.html
rename : docshell/test/file_bug660404 => docshell/test/mochitest/file_bug660404
rename : docshell/test/file_bug660404-1.html => docshell/test/mochitest/file_bug660404-1.html
rename : docshell/test/file_bug660404^headers^ => docshell/test/mochitest/file_bug660404^headers^
rename : docshell/test/file_bug653741.html => docshell/test/mochitest/file_bug662170.html
rename : docshell/test/file_bug668513.html => docshell/test/mochitest/file_bug668513.html
rename : docshell/test/file_bug669671.sjs => docshell/test/mochitest/file_bug669671.sjs
rename : docshell/test/file_bug675587.html => docshell/test/mochitest/file_bug675587.html
rename : docshell/test/file_bug680257.html => docshell/test/mochitest/file_bug680257.html
rename : docshell/test/file_bug703855.html => docshell/test/mochitest/file_bug703855.html
rename : docshell/test/file_bug728939.html => docshell/test/mochitest/file_bug728939.html
rename : docshell/test/file_close_onpagehide1.html => docshell/test/mochitest/file_close_onpagehide1.html
rename : docshell/test/file_close_onpagehide2.html => docshell/test/mochitest/file_close_onpagehide2.html
rename : docshell/test/file_framedhistoryframes.html => docshell/test/mochitest/file_framedhistoryframes.html
rename : docshell/test/file_pushState_after_document_open.html => docshell/test/mochitest/file_pushState_after_document_open.html
rename : docshell/test/historyframes.html => docshell/test/mochitest/historyframes.html
rename : docshell/test/mochitest.ini => docshell/test/mochitest/mochitest.ini
rename : docshell/test/start_historyframe.html => docshell/test/mochitest/start_historyframe.html
rename : docshell/test/test_anchor_scroll_after_document_open.html => docshell/test/mochitest/test_anchor_scroll_after_document_open.html
rename : docshell/test/test_bfcache_plus_hash.html => docshell/test/mochitest/test_bfcache_plus_hash.html
rename : docshell/test/test_bug1045096.html => docshell/test/mochitest/test_bug1045096.html
rename : docshell/test/test_bug1121701.html => docshell/test/mochitest/test_bug1121701.html
rename : docshell/test/test_bug1151421.html => docshell/test/mochitest/test_bug1151421.html
rename : docshell/test/test_bug1186774.html => docshell/test/mochitest/test_bug1186774.html
rename : docshell/test/test_bug123696.html => docshell/test/mochitest/test_bug123696.html
rename : docshell/test/test_bug1450164.html => docshell/test/mochitest/test_bug1450164.html
rename : docshell/test/test_bug384014.html => docshell/test/mochitest/test_bug384014.html
rename : docshell/test/test_bug385434.html => docshell/test/mochitest/test_bug385434.html
rename : docshell/test/test_bug387979.html => docshell/test/mochitest/test_bug387979.html
rename : docshell/test/test_bug402210.html => docshell/test/mochitest/test_bug402210.html
rename : docshell/test/test_bug404548.html => docshell/test/mochitest/test_bug404548.html
rename : docshell/test/test_bug413310.html => docshell/test/mochitest/test_bug413310.html
rename : docshell/test/test_bug475636.html => docshell/test/mochitest/test_bug475636.html
rename : docshell/test/test_bug509055.html => docshell/test/mochitest/test_bug509055.html
rename : docshell/test/test_bug511449.html => docshell/test/mochitest/test_bug511449.html
rename : docshell/test/test_bug529119-1.html => docshell/test/mochitest/test_bug529119-1.html
rename : docshell/test/test_bug529119-2.html => docshell/test/mochitest/test_bug529119-2.html
rename : docshell/test/test_bug530396.html => docshell/test/mochitest/test_bug530396.html
rename : docshell/test/test_bug540462.html => docshell/test/mochitest/test_bug540462.html
rename : docshell/test/test_bug551225.html => docshell/test/mochitest/test_bug551225.html
rename : docshell/test/test_bug570341.html => docshell/test/mochitest/test_bug570341.html
rename : docshell/test/test_bug580069.html => docshell/test/mochitest/test_bug580069.html
rename : docshell/test/test_bug590573.html => docshell/test/mochitest/test_bug590573.html
rename : docshell/test/test_bug598895.html => docshell/test/mochitest/test_bug598895.html
rename : docshell/test/test_bug634834.html => docshell/test/mochitest/test_bug634834.html
rename : docshell/test/test_bug637644.html => docshell/test/mochitest/test_bug637644.html
rename : docshell/test/test_bug640387_1.html => docshell/test/mochitest/test_bug640387_1.html
rename : docshell/test/test_bug640387_2.html => docshell/test/mochitest/test_bug640387_2.html
rename : docshell/test/test_bug653741.html => docshell/test/mochitest/test_bug653741.html
rename : docshell/test/test_bug660404.html => docshell/test/mochitest/test_bug660404.html
rename : docshell/test/test_bug662170.html => docshell/test/mochitest/test_bug662170.html
rename : docshell/test/test_bug668513.html => docshell/test/mochitest/test_bug668513.html
rename : docshell/test/test_bug669671.html => docshell/test/mochitest/test_bug669671.html
rename : docshell/test/test_bug675587.html => docshell/test/mochitest/test_bug675587.html
rename : docshell/test/test_bug680257.html => docshell/test/mochitest/test_bug680257.html
rename : docshell/test/test_bug691547.html => docshell/test/mochitest/test_bug691547.html
rename : docshell/test/test_bug694612.html => docshell/test/mochitest/test_bug694612.html
rename : docshell/test/test_bug703855.html => docshell/test/mochitest/test_bug703855.html
rename : docshell/test/test_bug728939.html => docshell/test/mochitest/test_bug728939.html
rename : docshell/test/test_bug797909.html => docshell/test/mochitest/test_bug797909.html
rename : docshell/test/test_close_onpagehide_by_history_back.html => docshell/test/mochitest/test_close_onpagehide_by_history_back.html
rename : docshell/test/test_close_onpagehide_by_window_close.html => docshell/test/mochitest/test_close_onpagehide_by_window_close.html
rename : docshell/test/test_forceinheritprincipal_overrule_owner.html => docshell/test/mochitest/test_forceinheritprincipal_overrule_owner.html
rename : docshell/test/test_framedhistoryframes.html => docshell/test/mochitest/test_framedhistoryframes.html
rename : docshell/test/test_pushState_after_document_open.html => docshell/test/mochitest/test_pushState_after_document_open.html
rename : docshell/test/test_triggeringprincipal_location_seturi.html => docshell/test/mochitest/test_triggeringprincipal_location_seturi.html
rename : docshell/test/test_windowedhistoryframes.html => docshell/test/mochitest/test_windowedhistoryframes.html
rename : docshell/test/url1_historyframe.html => docshell/test/mochitest/url1_historyframe.html
rename : docshell/test/url2_historyframe.html => docshell/test/mochitest/url2_historyframe.html
rename : third_party/rust/syn/src/parsers.rs => third_party/rust/syn-0.14.6/src/parsers.rs
rename : third_party/rust/syn/src/verbatim.rs => third_party/rust/syn-0.14.6/src/verbatim.rs
rename : third_party/rust/uuid/.travis.yml => third_party/rust/uuid-0.5.1/.travis.yml
rename : third_party/rust/uuid/src/rustc_serialize.rs => third_party/rust/uuid-0.5.1/src/rustc_serialize.rs
rename : third_party/rust/uuid/src/serde.rs => third_party/rust/uuid-0.5.1/src/serde.rs
2018-10-02 19:03:40 +03:00
Andrew McCreight 837f0af066 Bug 1493737 - Fix many trivial calls to do_QueryInterface r=smaug
If class A is derived from class B, then an instance of class A can be
converted to B via a static cast, so a slower QI is not needed.

Differential Revision: https://phabricator.services.mozilla.com/D6861

--HG--
extra : moz-landing-system : lando
2018-10-01 21:38:01 +00:00
Brindusan Cristian fc5031a446 Merge inbound to mozilla-central. a=merge 2018-10-02 07:01:43 +03:00
Andrew McCreight 3a3b45aaa6 Bug 1494765 - Allow assignment from an nsCOMPtr of a related type r=froydnj
This adds support for conversion from nsCOMPtr<A> to nsCOMPtr<B> when
A is a subclass of B. There's no reason to not allow this, and RefPtr
already supports this.

Differential Revision: https://phabricator.services.mozilla.com/D7226

--HG--
extra : moz-landing-system : lando
2018-10-02 00:54:16 +00:00
Narcis Beleuzu 9bf578bdbd Backed out changeset cb01170872de (bug 1494765) for bustages on nsCOMPtr.h. CLOSED TREE 2018-10-02 00:37:46 +03:00
Andrew McCreight 1f66326aad Bug 1494765 - Allow assignment from an nsCOMPtr of a related type r=froydnj
This adds support for conversion from nsCOMPtr<A> to nsCOMPtr<B> when
A is a subclass of B. There's no reason to not allow this, and RefPtr
already supports this.

Differential Revision: https://phabricator.services.mozilla.com/D7226

--HG--
extra : moz-landing-system : lando
2018-10-01 20:50:32 +00:00
Narcis Beleuzu 010feac062 Backed out 2 changesets (bug 1495562, bug 1495554) for crashes on [@ CrashReporter::TerminateHandler()] . CLOSED TREE
Backed out changeset ec5d3c12ad4c (bug 1495562)
Backed out changeset 28792d9adea2 (bug 1495554)
2018-10-02 02:58:09 +03:00
Jonathan Watt 219a2f9e91 Bug 1495562. Rename SVGRenderingObserverList to SVGRenderingObserverSet. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D7330

--HG--
extra : rebase_source : 6c843092611056972c991175fa18f37cfad57402
2018-09-24 11:45:17 +01:00
Jonathan Kew 75159145f4 Bug 1495306 - When InitOtherFamilyNames is called during stylo traversal, ensure it posts its runnable back to the main thread. r=kmag 2018-10-01 23:38:55 +02:00
Andrea Marchesini 4be054a731 Bug 1390801 - FeaturePolicy - part 2 - WebIDL + DOM integration, r=ckerschb 2018-10-01 08:09:44 +02:00
Gabriele Svelto 7089fe7369 Bug 1493955 - Store floating-point preferences in a locale-independent way r=njn
Differential Revision: https://phabricator.services.mozilla.com/D6796

--HG--
extra : moz-landing-system : lando
2018-09-28 20:54:09 +00:00
Ciure Andrei 819cd31a93 Merge inbound to mozilla-central. a=merge 2018-09-28 11:53:32 +03:00
Stephen A Pohl f115950b8e Bug 1445943: Add Enterprise Policy support for macOS. r=mstange,felipe,glandium 2018-09-27 23:08:07 -04:00
Coroiu Cristina 0ae7e1ad7b Merge inbound to mozilla-central a=merge 2018-09-28 07:33:05 +03:00
Bogdan Tara 8449b1c489 Backed out changeset ba1fef7b14eb (bug 1493955) for GTest failures CLOSED TREE 2018-09-28 02:42:20 +03:00
Coroiu Cristina 8f256026f1 Merge mozilla-central to autoland a=merge ona CLOSED TREE 2018-09-28 00:41:04 +03:00
Coroiu Cristina 71988c7b7e Merge inbound to mozilla-central a=merge 2018-09-28 00:36:46 +03:00
Andrew McCreight 5a1eb609f9 Bug 1493276 - Statically prevent CallQueryInterface to a base class r=froydnj
If a class A is derived from a class B, then an instance of A can be
converted to an instance of class B via a static cast, so QI is not
needed. QIs are slower than static casts.

TestCallTemplates seems to be testing that CallQueryInterface compiles
even if the first argument's class is only ambiguously castable to
nsISupports, so I changed the second argument to be a class unrelated
to the concrete class.

I also removed some useless null checks on the return value of new.

Differential Revision: https://phabricator.services.mozilla.com/D6838

--HG--
extra : moz-landing-system : lando
2018-09-27 14:59:55 +00:00
Nicholas Nethercote 58812c5536 Bug 1494515 - Remove an unused argument from nsStaticAtom's constructor. r=froydnj
Presumably the commit that introduced `aStringOffset` could have removed this,
but overlooked it.

--HG--
extra : rebase_source : 176f14ce01c18ed4c83892d2b7a9e7a54fb5c836
2018-09-27 16:14:05 +10:00
Nicholas Nethercote e35d805828 Bug 1494515 - Clean up static atom registration. r=froydnj
Static atom registration is a bit of a mess. NS_InitAtomTable() calls
nsGkAtoms::RegisterStaticAtoms(), which calls NS_RegisterStaticAtoms(); i.e. we
go from nsAtomTable.cpp to nsGkAtoms.cpp and back.

(And NS_RegisterStaticAtoms() is declared in a .cpp file, not a .h file!)

This commit makes NS_InitAtomTable() a friend of nsGkAtoms, so NS_InitAtomTable
can see nsGkAtoms's atoms array directly, thus removing the need for
NS_RegisterAtomTable() and nsGkAtoms::RegisterStaticAtoms().

This commit also removes an out-of-date part of a comment from XPCOMInit.cpp.

--HG--
extra : rebase_source : 7e1f9aa0a9f7cb5088159fe4c953948b931f6d68
2018-09-27 16:13:41 +10:00
Nicholas Nethercote dd61fd6ccf Bug 1494515 - Rework the comments about static atoms. r=froydnj
nsGkAtoms.h has a big comment explaining how static atom definitions get
expanded by macros. This comment was very useful when there were multiple
sources of static atoms and their definitions used macros a lot. But bug
1482782 combined all the static atom sources into nsGkAtoms and removed a lot
of macro use. So now the comment is now something of a hindrance, duplicating
quite a bit of the code (and not entirely accurately).

This commit removes the big comment, and moves the still-useful parts inline
with the code. This makes things much easier to follow.

This commit also reformats some of the remaining macros so they are easier to
read.

--HG--
extra : rebase_source : 4377be2fa0edc4ea1f592985ded89acbb76fb104
2018-09-27 16:13:14 +10:00
Kris Maglione 81cc9843d0 Bug 1479035: Follow-up: Fix invarient which is no longer true. r=me 2018-09-26 22:08:43 -07:00
Gabriele Svelto 4d700e555a Bug 1493955 - Store floating-point preferences in a locale-independent way r=njn
Differential Revision: https://phabricator.services.mozilla.com/D6796

--HG--
extra : moz-landing-system : lando
2018-09-27 20:41:39 +00:00
Andrew McCreight 877213ca74 Bug 1493791 - Fix trivial calls to do_QueryInterface in XPCOM unit tests r=froydnj
In TestEventTargetQI.cpp, nsIThreadPool is a subclass of
nsIEventTarget, so we cannot QI from the former to the latter once
trivial QIs are banned. However, we still want to check if a QI to
nsIEventTarget does something, so I added an intermediate cast up to
nsISupports, and then QI from there. I wrapped that all up in a
templated function, because the code is a bit ugly, and used it
everywhere for uniformity, even though it is not always needed.

I fixed TestCOMPtr.cpp in the same way, by casting up to nsISupports.

Differential Revision: https://phabricator.services.mozilla.com/D6855

--HG--
extra : moz-landing-system : lando
2018-09-27 18:41:42 +00:00
Kris Maglione 763d15b1fe Bug 1494513: Only allow calling Shutdown() from an XPCOM thread. r=erahm
This doesn't fix the problem, but at least moves the resulting assertion
closer to the problematic caller, and makes it easier to diagnose.

Differential Revision: https://phabricator.services.mozilla.com/D7042

--HG--
extra : rebase_source : 4a016d1dce77a269b886467c9343dab125079a8f
extra : amend_source : 4e9133e70932f382e0b5df9e487978b95d05781b
2018-09-26 21:59:55 -07:00
Nathan Froyd 3445a4da75 Bug 1494511 - export aarch64 windows xptcstubs from their source file; r=dmajor
DONTBUILD because NPTOB.
2018-09-27 11:17:21 -04:00
Kris Maglione bf2e2a90f0 Bug 1479035: Part 2 - Get rid of PRThread to nsThread map. r=erahm
These maps hold strong references which complicate nsThread lifetime handling
considerably, and only have a couple of fringe uses. We have a linked list of
active threads that the thread manager can use for its internal enumeration
purposes, and the external uses are easily done away with, so there doesn't
seem to be much reason to keep the map around.

MozReview-Commit-ID: x7dsj6C4x8

--HG--
extra : source : 5f870621361012ba459943212d8c68a9ff81cb16
extra : intermediate-source : 89a0c0874d400dd324df6fc3627c0c47d130df19
extra : histedit_source : bbd7900e3d754bde925a411c10aa30a1d6e22edd
2018-07-27 15:26:08 -07:00
Kris Maglione 74481e8af4 Bug 1479035: Part 1 - Don't create event queues for stub nsThread wrappers. r=froydnj
Most of the times when we automatically create nsThread wrappers for threads
that don't already have them, we don't actually need the event targets, since
those threads don't run XPCOM event loops. Aside from wasting memory, actually
creating these event loops can lead to leaks if a thread tries to dispatch a
runnable to the queue which creates a reference cycle with the thread.

Not creating the event queues for threads that don't actually need them helps
avoid those foot guns, and also makes it easier to figure out which treads
actually run XPCOM event loops.

MozReview-Commit-ID: Arck4VQqdne

--HG--
extra : source : a03a61d6d724503c3b7c5e31fe32ced1f5d1c219
extra : intermediate-source : 5152af6ab3e399216ef6db8f060c257b2ffbd330
extra : histedit_source : ef06000344416e0919f536d5720fa979d2d29c66%2C4671676b613dc3e3ec762edf5d72a2ffbe6fca3f
2018-07-27 15:13:12 -07:00
Narcis Beleuzu 72f96acd7b Backed out 2 changesets (bug 1479035) for assertion failure: mEvents. CLOSED TREE
Backed out changeset 89a0c0874d40 (bug 1479035)
Backed out changeset 5152af6ab3e3 (bug 1479035)
2018-09-26 23:40:13 +03:00
Kris Maglione d12c05e8f8 Bug 1479035: Part 2 - Get rid of PRThread to nsThread map. r=erahm
These maps hold strong references which complicate nsThread lifetime handling
considerably, and only have a couple of fringe uses. We have a linked list of
active threads that the thread manager can use for its internal enumeration
purposes, and the external uses are easily done away with, so there doesn't
seem to be much reason to keep the map around.

MozReview-Commit-ID: x7dsj6C4x8

--HG--
extra : rebase_source : 897e2d32d1dfee24d51459065925fb9b41fa543a
extra : source : 5f870621361012ba459943212d8c68a9ff81cb16
2018-07-27 15:26:08 -07:00
Kris Maglione 81eb50cf31 Bug 1479035: Part 1 - Don't create event queues for stub nsThread wrappers. r=froydnj
Most of the times when we automatically create nsThread wrappers for threads
that don't already have them, we don't actually need the event targets, since
those threads don't run XPCOM event loops. Aside from wasting memory, actually
creating these event loops can lead to leaks if a thread tries to dispatch a
runnable to the queue which creates a reference cycle with the thread.

Not creating the event queues for threads that don't actually need them helps
avoid those foot guns, and also makes it easier to figure out which treads
actually run XPCOM event loops.

MozReview-Commit-ID: Arck4VQqdne

--HG--
extra : rebase_source : fcf8fa50e748c4b54c3bb1997575d9ffd4cbaae1
extra : source : a03a61d6d724503c3b7c5e31fe32ced1f5d1c219
2018-07-27 15:13:12 -07:00
Jon Coppeard a9899af8b1 Bug 1490009 - Clear CallbackObject fields after use for promise job to avoid tenuring objects unnecessarily r=bz 2018-09-20 13:28:59 +01:00
Brindusan Cristian 6d457f4a36 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-10-02 07:05:47 +03:00
Nicholas Nethercote c039cd96a7 Bug 1489047 - Remove support for DOMString from the XPIDL compiler. r=nika
--HG--
extra : rebase_source : 933e39a1cd73f17accf7608e0c1a6bffa4835107
2018-09-11 15:14:28 +10:00
Nicholas Nethercote 0979695a1a Bug 1489047 - Remove C++ support for, and testing of, the XPIDL DOMString type. r=nika
--HG--
extra : rebase_source : 21df3192cfff8f9d9254306a5be4f8ad84397eb7
2018-09-06 18:03:18 +10:00
Nicholas Nethercote 8478f8d66e Bug 1489047 - Change almost all DOMString occurrences in XPIDL files to AString. r=nika
Because they have almost identical semantics.

--HG--
extra : rebase_source : ea9074bcac2a1d190b88a5d1afc15997593659b7
2018-09-06 18:02:43 +10:00
Noemi Erli 36cc0e5fa7 Backed out 2 changesets (bug 1479035) for build bustages bustages netwerk/cache2/target on CLOSED TREE
Backed out changeset 5f8706213610 (bug 1479035)
Backed out changeset a03a61d6d724 (bug 1479035)
2018-09-26 08:54:03 +03:00
Kris Maglione 0116c49d5b Bug 1479035: Part 2 - Get rid of PRThread to nsThread map. r=erahm
These maps hold strong references which complicate nsThread lifetime handling
considerably, and only have a couple of fringe uses. We have a linked list of
active threads that the thread manager can use for its internal enumeration
purposes, and the external uses are easily done away with, so there doesn't
seem to be much reason to keep the map around.

MozReview-Commit-ID: x7dsj6C4x8

--HG--
extra : rebase_source : 88c56fa4f5da97f33ade08d892c3d8c42666307e
2018-07-27 15:26:08 -07:00
Kris Maglione a6edc4f204 Bug 1479035: Part 1 - Don't create event queues for stub nsThread wrappers. r=froydnj
Most of the times when we automatically create nsThread wrappers for threads
that don't already have them, we don't actually need the event targets, since
those threads don't run XPCOM event loops. Aside from wasting memory, actually
creating these event loops can lead to leaks if a thread tries to dispatch a
runnable to the queue which creates a reference cycle with the thread.

Not creating the event queues for threads that don't actually need them helps
avoid those foot guns, and also makes it easier to figure out which treads
actually run XPCOM event loops.

MozReview-Commit-ID: Arck4VQqdne

--HG--
extra : rebase_source : 02c5572b92ee48c11697d90941336e10c03d49cf
2018-07-27 15:13:12 -07:00
Martin Stransky 89822d9f40 Bug 1493145 - [CSD] Enable round corners by default by -moz-gtk-csd-transparent-background media query, r=dao
Replace mozilla.widget.use-argb-visuals pref by -moz-gtk-csd-transparent-background media query at browser.css
to draw transparent background. The media query is set by toolkit code and enabled when compatible
window manager is detected.

Differential Revision: https://phabricator.services.mozilla.com/D6658

--HG--
extra : moz-landing-system : lando
2018-09-25 11:53:04 +00:00
Henri Sivonen 33a649ee4c Bug 1484938 - Make XPCOM string appends and copying assignments write the terminator after writing content. r=froydnj
MozReview-Commit-ID: DOmAitH5YDh

Differential Revision: https://phabricator.services.mozilla.com/D4850

--HG--
extra : moz-landing-system : lando
2018-09-24 14:23:35 +00:00
Brendan Dahl 3b90617635 Bug 1493210 - Remove XUL forward references. r=bzbarsky
These are no longer needed after the removal of overlays.

Differential Revision: https://phabricator.services.mozilla.com/D6511

--HG--
extra : moz-landing-system : lando
2018-09-24 16:43:42 +00:00