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

18719 Коммитов

Автор SHA1 Сообщение Дата
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
shindli 87009004b2 Backed out changeset 58f0722012cd (bug 1475415) for force-cargo-library-build bustages CLOSED TREE 2018-09-24 19:37:49 +03:00
Tristan Bourvon 4db0a2f5a0 Bug 1475415 - Add first version of IPDL-JS API r=mrbkap,mccr8
Add the first version of the IPDL-JS API, which allow chrome JS to load IPDL files and use them to communicate accross Content processes.
See IPDLProtocol.h for more information regarding how to use the API.

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

--HG--
rename : ipc/moz.build => ipc/ipdl_new/moz.build
extra : moz-landing-system : lando
2018-09-24 14:13:20 +00:00
Henri Sivonen 60d77138d5 Bug 1489979 - Avoid UB in IsDependentOn(). r=froydnj
MozReview-Commit-ID: C6ehO1TG5YO

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

--HG--
extra : moz-landing-system : lando
2018-09-24 07:04:57 +00:00
Ryan VanderMeulen 84601ca6bf Backed out changeset c173cb530f63 (bug 1490009) for violating invariants. 2018-09-21 15:08:40 -04:00
Christian Holler 406f76670f Bug 1492929 - Disable ChaosMode sleep delay on Windows. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D6449

--HG--
extra : moz-landing-system : lando
2018-09-21 12:38:43 +00:00
Nathan Froyd e7b3b3140d Bug 1415980 - make hash keys movable and not copyable; r=erahm
Everything that goes in a PLDHashtable (and its derivatives, like
nsTHashtable) needs to inherit from PLDHashEntryHdr. But through a lack
of enforcement, copy constructors for these derived classes didn't
explicitly invoke the copy constructor for PLDHashEntryHdr (and the
compiler didn't invoke the copy constructor for us). Instead,
PLDHashTable explicitly copied around the bits that the copy constructor
would have.

The current setup has two problems:

1) Derived classes should be using move construction, not copy
   construction, since anything that's shuffling hash table keys/entries
   around will be using move construction.

2) Derived classes should take responsibility for transferring bits of
   superclass state around, and not rely on something else to handle that.

The second point is not a huge problem for PLDHashTable (PLDHashTable
only has to copy PLDHashEntryHdr's bits in a single place), but future
hash table implementations that might move entries around more
aggressively would have to insert compensation code all over the
place. Additionally, if moving entries is implemented via memcpy (which
is quite common), PLDHashTable copying around bits *again* is
inefficient.

Let's fix all these problems in one go, by:

1) Explicitly declaring the set of constructors that PLDHashEntryHdr
   implements (and does not implement). In particular, the copy
   constructor is deleted, so any derived classes that attempt to make
   themselves copyable will be detected at compile time: the compiler
   will complain that the superclass type is not copyable.

This change on its own will result in many compiler errors, so...

2) Change any derived classes to implement move constructors instead of
   copy constructors. Note that some of these move constructors are,
   strictly speaking, unnecessary, since the relevant classes are moved
   via memcpy in nsTHashtable and its derivatives.
2018-09-20 11:20:36 -04:00
Jon Coppeard 27f15e7950 Bug 1490009 - Clear CallbackObject fields after use for promise job to avoid tenuring objects unnecessarily r=mccr8 2018-09-20 13:28:59 +01:00
Kris Maglione c7df4b83d7 Bug 1486147: Follow-up: Fix missing QueryInterface entries. r=bustage
--HG--
extra : rebase_source : 4ab19b5145117f9c9aef87d8d59ad7ff923e299d
2018-09-19 17:34:10 -07:00
Kris Maglione 1c20e8cbbb Bug 1486147: Part 2 - Update JS string enumerator callers to use JS iteration. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D4270

--HG--
extra : rebase_source : 2adadcc8e51a7bce1da02f4bee1333b77bfa9944
extra : histedit_source : 9df920fd186f8c96a5d8b9cbff53ea9529f26ee0
2018-08-24 16:22:40 -07:00
Kris Maglione 31cf107646 Bug 1486147: Part 1 - Add JS iterator support to nsIStringEnumerator. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D4269

--HG--
extra : rebase_source : 5fe9d4c7717d65e1bc8d45bdd89bcc5384c6d0ee
extra : histedit_source : e8f5606a192f13524996faf2e179d2c2e58c933f%2C725c8f145a1f4d34f84e6818b61ec5b955862e70
2018-08-24 16:21:33 -07:00
Eric Rahm 513dbaad87 Bug 1492272 - Get rid of Begin/EndWriting(iterator&) string functions. r=froydnj
This removes the rarely used and somewhat odd
`iterator& BeginWriting/EndWriting(iterator&)` functions that take an iterator
as an in/out param and then return it.

--HG--
extra : rebase_source : 92066f996595e9b7df9642813c08592cee47c630
2018-09-18 13:35:09 -07:00
Eric Rahm 2fb6934934 Bug 1492204 - Part 3: Remove references to char_iterator. r=froydnj
We can just use 'iterator' now that nsWritingIterator is gone.

--HG--
extra : rebase_source : 3f6fbafc9b57ce89afba581b224b3dc2295fa614
2018-09-18 12:05:23 -07:00
Eric Rahm 518cca9a75 Bug 1492204 - Part 2: Remove nsWritingIterator. r=froydnj
It's deprecated and no longer used.

--HG--
extra : rebase_source : 3469b29b178a4b42b2e29dc6736484e3c38c787d
2018-09-18 09:46:08 -07:00
Eric Rahm 0c061732bd Bug 1492204 - Part 1: Stop using deprecated string writing iterators. r=froydnj
This switches over the few remaining usages of the deprecated
BeginWriting/EndWriting(iterator&) functions to the more standard
BeginWriting/EndWriting() functions.

--HG--
extra : rebase_source : 3c54621d4921eb45157ec4edce0b693bdd7f02d5
2018-09-18 09:44:57 -07:00
Narcis Beleuzu 61b03524fb Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-09-19 19:45:46 +03:00
Nathan Froyd bc5c879186 Bug 1486400 - add task dispatch/run delays for ChaosMode; r=jesup 2018-09-19 12:02:09 -04:00
Marcos Cáceres f616da00ba Bug 1472026 - Implement PaymentResponse.prototype.onpayerdetailchange. r=edenchuang,baku
Implement PaymentResponse.prototype.onpayerdetailchange, per spec.

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

--HG--
extra : moz-landing-system : lando
2018-09-19 11:23:33 +00:00
shindli 70bf79757d Backed out changeset 376c2bf5bcbf (bug 1472026) for PaymentRequest failures in dom/payments/test/test_block_none10s.html 2018-09-19 12:31:51 +03:00
Marcos Cáceres 9dd1b3aeae Bug 1472026 - Implement PaymentResponse.prototype.onpayerdetailchange. r=edenchuang,baku
Implement PaymentResponse.prototype.onpayerdetailchange, per spec.

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

--HG--
extra : moz-landing-system : lando
2018-09-19 08:41:53 +00:00
Ehsan Akhgari 5d9d4af0cd Bug 1491574 - Part 2: Remove the XPCOM registration for nsPersistentProperties; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5950
2018-09-18 00:58:52 -04:00
Ehsan Akhgari 9aa38967b7 Bug 1491574 - Part 1: Remove the XPCOM registration for nsProperties; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5949
2018-09-18 00:33:59 -04:00
Bogdan Tara 7ebba39407 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-09-18 01:02:05 +03:00
Bogdan Tara c8f52c0158 Merge inbound to mozilla-central. a=merge 2018-09-18 00:58:07 +03:00
Tom Ritter 50da904b0c Bug 1490568 Quote the _PrepareAndDispatch symbol to fix the mingw-clang x86 build r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D6045

--HG--
extra : moz-landing-system : lando
2018-09-17 15:30:14 +00:00
Tom Ritter b5f6d986cc Bug 1491856 Change .scl 3 -> .scl 2 in the reflect assembly r=dmajor
As in Bug 1390583 and Bug 1470993, this will correct them to be external symbols

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

--HG--
extra : moz-landing-system : lando
2018-09-17 15:27:24 +00:00
Eric Rahm 8e5a061371 Bug 1491151 - Part 6: Convert CCGraphBuilder to use MRU cache. r=smaug
--HG--
extra : rebase_source : ee2a9bb8139d61a79fd362a2e44678b31091bd9f
2018-09-12 18:20:33 -07:00
Eric Rahm 9f6d588b5d Bug 1491151 - Part 4: Convert atom table to use MRU cache. r=smaug
--HG--
extra : rebase_source : 7adb5dd49cf55543324c313229c406dba8a8535a
2018-09-12 17:51:53 -07:00
Eric Rahm b9e8fd399e Bug 1491151 - Part 1: Add MruCache. r=smaug,froydnj
This adds a most recently used cache that can be used as a quick lookup table
for frequently used entries.

--HG--
extra : rebase_source : 571c32f75e985e299113f73b959809d208aad5f3
2018-09-10 14:45:55 -07:00
Ehsan Akhgari d238ac27cc Bug 1469714 - Part 1: Add the allow-storage-access-by-user-activation iframe sandbox flag; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D5810
2018-09-17 13:00:38 -04:00
Henri Sivonen 13e736d609 Bug 1490972 - Limit the number of bytes poisoned to avoid quadratic behavior. r=froydnj
XPCOM strings mark logically unused parts of nsStringBuffer as uninitialized
in debug builds by writing a marker byte and if memory checking is active,
by telling the memory checking that the range of memory is uninitialized.

This patch limits such marking to up to 16 code units to avoid quadratic
behavior, which is especially bad when there's a large disparity between
length and capacity (after a call to SetCapacity()).

The assumption here is that even a small poisoned memory range is enough
to detect the bugs that the poisoning is intended to detect.

MozReview-Commit-ID: 178rp0ckztj

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

--HG--
extra : moz-landing-system : lando
2018-09-14 18:58:15 +00:00
Henri Sivonen 89ca07c012 Bug 1487341 - Make Truncate(), SetLength() and Capacity() more efficient by keeping memcpying to the minimum. r=froydnj
MozReview-Commit-ID: 2LeRrWcN8vF

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

--HG--
extra : moz-landing-system : lando
2018-09-17 09:45:02 +00:00
Ehsan Akhgari 8b5f37d34a Bug 1491558 follow-up: Address mats' review comments 2018-09-17 02:23:06 -04:00
Ciure Andrei 7f8890ce67 Merge inbound to mozilla-central. a=merge 2018-09-16 00:40:16 +03:00
Dorel Luca e3d505cb98 Merge mozilla-central to autoland 2018-09-15 12:48:28 +03:00
Gijs Kruitbosch 659898b84e Bug 1488822 - propagate allowScriptsToClose via the frameloader instead of relying on frame scripts, r=mconley,kmag,nika
Differential Revision: https://phabricator.services.mozilla.com/D5775

--HG--
extra : moz-landing-system : lando
2018-09-15 08:26:33 +00:00
Henri Sivonen 9c077fccbc Bug 1490973 - Avoid repeatedly calling Append() in NS_UnescapeURL(). r=froydnj
MozReview-Commit-ID: H29SAvXS4Jl

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

--HG--
extra : moz-landing-system : lando
2018-09-13 20:49:31 +00:00
Ehsan Akhgari fa81a39327 Bug 1491558 - Remove the XPCOM registration for nsThreadPool; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5943
2018-09-15 12:13:57 -04:00
Dylan Roeh b18b70dfcf Bug 1489257 - Backed out 3 changesets (bug 1441059, bug 1478171) for causing bug 1489257. r=me
Backed out changeset f7bd4f224f9a (bug 1441059)
Backed out changeset e66e6bd82e3f (bug 1441059)
Backed out changeset 94cfd6113ca7 (bug 1478171)
2018-09-13 12:27:23 -05:00
Marcos Cáceres eb155e743a Bug 1474499 - Add support for onmerchantvalidation and MerchantValidationEvent. r=edenchuang,baku 2018-09-12 22:56:00 +03:00
Masatoshi Kimura 019eed26b0 Bug 1485224 - Make best efforts to write a stack frame atomically. r=froydnj
--HG--
extra : rebase_source : d8d4d9b7fcb98963ceebea10daedaba2ae48caa6
2018-09-13 19:22:18 +09:00
Boris Zbarsky 951bba6efd Bug 1482194. Throw the right exception when localStorage/sessionStorage quota is reached. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D3034

--HG--
extra : moz-landing-system : lando
2018-08-27 11:12:59 +00:00
Hiroyuki Ikezoe 17186e2c2f Bug 1483111 - Implement any-hover and any-pointer media queries features. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3609
2018-08-17 20:29:37 +09:00
Hiroyuki Ikezoe ef03e2a299 Bug 1035774 - Add media feature keys for hover and pointer. r=heycam,emilio
Summary:
https://drafts.csswg.org/mediaqueries-4/#hover
https://drafts.csswg.org/mediaqueries-4/#pointer

In this patch series, we don't introduce any-hover and any-pointer media
features yet, but functionalities for them on each platform backends will be
introduced in this patch series, so eIntID_AllPointerCapabilities and relevant
stuff is added in this patch for the convenience that each platform backends
can be reviewed at once.

Differential Revision: https://phabricator.services.mozilla.com/D3296
2018-08-14 17:13:04 +09:00
Sebastian Hengst d34c7d9a48 Bug 1490322 - Use new "Toolkit :: Blocklist Implementation" bugzilla component as default for blocklist related files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D5570

--HG--
extra : moz-landing-system : lando
2018-09-11 19:25:55 +00:00
Cosmin Sabou de7676288a Merge mozilla-inbound to mozilla-central. a=merge 2018-09-11 13:06:37 +03:00
Tom Ritter 26dbd4d795 Bug 1481633 Resolve kPStaticModules undefined symbols in MinGW Clang r=glandium
clang can handle MSVC-like codepaths generally, so we want to use those
when building with clang for Windows. So we switch _MSC_VER over to _WIN32
to pick up those codepaths when compiling for Windows with clang.

Additionally, we relax the ordering of sections for the same scenario.

Note that we do need to tell clang to use -fms-extensions with the MSVC code,
we do that in the mingw clang build job patch.

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

--HG--
extra : moz-landing-system : lando
2018-09-11 03:20:06 +00:00
Gerald Squelart b51e0fd0cc Bug 1489944 - Fixed some std::move warnings - r=froydnj
> dom/media/gmp/CDMStorageIdProvider.cpp(63,10):  warning:
> local variable 'storageId' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> layout/painting/DisplayItemClip.cpp(581,10):  warning:
> local variable 'str' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> layout/painting/DisplayItemClipChain.cpp(88,10):  warning:
> local variable 'str' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> layout/painting/nsDisplayList.cpp(179,10):  warning:
> local variable 'str' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> gfx/thebes/gfxWindowsPlatform.cpp(454,10):  warning:
> moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
Will remove std::move().

> gfx/thebes/gfxFontEntry.cpp(245,20):  warning:
> local variable 'name' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> netwerk/cookie/nsCookieService.cpp(4460,10):  warning:
> local variable 'path' will be copied despite being returned by name [-Wreturn-std-move]
GetPathFromURI() result is stored in an nsAutoCString, so it might as well return that type.

> toolkit/components/extensions/WebExtensionPolicy.cpp(462,12):  warning:
> local variable 'result' will be copied despite being returned by name [-Wreturn-std-move]
> toolkit/components/extensions/WebExtensionPolicy.cpp(475,10):  warning:
> local variable 'result' will be copied despite being returned by name [-Wreturn-std-move]
`result` may be empty or may be arbitrarily long, so I'll use nsCString inside the function.

> toolkit/xre/CmdLineAndEnvUtils.h(349,10):  warning:
> moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
Returning an UniquePtr, will remove std::move().
Also will `return s` instead of `return nullptr` when `(!s)`, to avoid extra construction which could also prevent elision (not entirely sure, but it's at least not worse!); and it's clearer that the two `return`s return the same already-constructed on-stack object.

> tools/profiler/core/shared-libraries-win32.cc(111,10):  warning:
> local variable 'version' will be copied despite being returned by name [-Wreturn-std-move]
nsPrintfCString -> nsCString, will add std::move().

> xpcom/glue/FileUtils.cpp(179,10):  warning:
> local variable 'fullName' will be copied despite being returned by name [-Wreturn-std-move]
> xpcom/glue/FileUtils.cpp(209,10):  warning:
> local variable 'path' will be copied despite being returned by name [-Wreturn-std-move]
nsAuto{,C}String -> ns{,C}String, will add std::move().

This allowed removals of 'AllowCompilerWarnings' from layout/painting,
netwerk/cookie, and toolkit/components/extensions.

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

--HG--
extra : moz-landing-system : lando
2018-09-10 15:51:48 +00:00
Henri Sivonen 1a38ec4710 Bug 1486711 - Fill logically uninitialized parts of an XPCOM string's buffer with a marker byte in debug builds. r=froydnj
MozReview-Commit-ID: IwLikJpacAW

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

--HG--
extra : moz-landing-system : lando
2018-09-07 05:47:57 +00:00
Daniel Holbert f26874e5ee Bug 1489696: Adjust Scheduler::GetPrefs() return type to let it benefit from RVO and to address -Wreturn-std-move build warning. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5340

--HG--
extra : moz-landing-system : lando
2018-09-08 01:06:21 +00:00
Mike Hommey f9e00e249f Bug 1489728 - Unbreak MSVC builds after bug 1489363 r=froydnj
MSVC doesn't like AssignLiteral(condition ? "literal1" : "literal2")
even when both literals have the same length. (clang and gcc are both
happy with that)

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

--HG--
extra : moz-landing-system : lando
2018-09-08 11:38:57 +00:00
Henri Sivonen 39dc649092 Bug 1488697 - Make StringBuilder::ToString avoid repeated capacity and aliasing checks as well as terminator writes. r=smaug
* Avoid the string implementation's capacity checks, since we know they
   succeed.
 * Avoid the string implementation's aliasing checks, since we know there's no
   aliasing.
 * Avoid writing the zero terminator more than once or out of sequence.
 * Use u"" literals when appending literals to a UTF-16 string.
 * Write runs of non-escaped code units instead of writing code unit by code
   unit in order to benefit from SIMD (either via memcpy or
   ConvertLatin1toUTF16).

This results in a 13% execution time reduction on desktop Haswell i7 when
getting the innerHTML of the body of the Selectors spec. (The WebKit
optimization target from https://bugs.webkit.org/show_bug.cgi?id=81214 .)

MozReview-Commit-ID: LAg3gkGJnpQ

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

--HG--
extra : moz-landing-system : lando
2018-09-08 07:47:28 +00:00
Mike Hommey f1afe5ceec Bug 1489340 - Remove xpcom/typelib r=froydnj
Nothing is using the xpt module anymore, which means we can remove it,
as well as the runtests.py script that runs its test, and the
integration of those tests in the build system.

Depends on D5221

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

--HG--
extra : moz-landing-system : lando
2018-09-07 13:55:38 +00:00
Mike Hommey 32627430f6 Bug 1489363 - Replace some string.Append* with AppendLiteral. r=froydnj
Depends on D5224

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

--HG--
extra : moz-landing-system : lando
2018-09-07 22:12:04 +00:00
Mike Hommey 117e48720c Bug 1489363 - Replace some string.Assign* with AssignLiteral. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5224

--HG--
extra : moz-landing-system : lando
2018-09-07 22:12:01 +00:00
Sylvestre Ledru aa37bde79b Bug 1489454 - Remove all trailing whitespaces (again) r=Ehsan
This also includes moving some files to the regular format.

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

--HG--
extra : moz-landing-system : lando
2018-09-07 14:47:51 +00:00
Emilio Cobos Álvarez c9c6290890 Bug 1489453 - EnumSet shouldn't take 32 bits if not needed. r=froydnj
This is the only reason I haven't used it before for things like
StyleSheet::State.

Change the underlying type to be the underlying enum representation by default,
but allow to override it if wanted.

Assertions should catch misuses.

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

--HG--
extra : moz-landing-system : lando
2018-09-07 14:40:02 +00:00
Henri Sivonen ee4d95b01f Bug 1488452 - Remove incorrect use of PromiseFlatString in FileUtilsWin. r=froydnj
Also rewrote some code around the actual problem to be more obviously correct
and comprehensible.

MozReview-Commit-ID: FF2hSjQ4U1x

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

--HG--
extra : moz-landing-system : lando
2018-09-07 14:48:36 +00:00
Zibi Braniecki e78d123097 Bug 1455649 - DocumentL10n, part 3 - Plug DocumentL10n life cycle into DOM hooks. r=smaug
--HG--
extra : rebase_source : d071878d22b5fd204db8367780ee22be22196773
2018-09-06 18:28:40 -07:00
Nicholas Nethercote 563171857f Bug 1488628 - Change nsIConsoleMessage.message to an AString. r=erahm
--HG--
extra : rebase_source : e43aec79e309936e17d475b8c50559767538c18d
2018-09-05 13:31:42 +10:00
Ehsan Akhgari 6bbaf2cf8c Bug 1489147 - Remove the XPCOM component registration for nsXPConnect; r=mccr8
We move the XPConnect() singleton accessor to nsIXConnect to make it available for consumers outside of XPConnect.  Most of the consumers of the singleton accessor just need the nsIXPConnect public interface, except for the IsShuttingDown() member which this patch adds to nsIXPConnect as well.

Differential Revision: https://phabricator.services.mozilla.com/D5151
2018-09-06 16:39:35 -04:00
Nicholas Nethercote 9d2cf12ce4 Bug 1489010 - Remove XPIDL support for `Null` and `Undefined` value-taking properties on `DOMString` parameters and attributes. r=jorendorff
These properties were added in bug 478251 back when XPIDL was sort of emulating
WebIDL. They are not needed any more, and none of our XPIDL files use them.

--HG--
extra : rebase_source : f2f2c54ae787ad90704074eb114f00c3741d5f88
2018-09-06 13:42:05 +10:00
shindli 2a86142e74 Backed out changeset d4ae1994c20c (bug 1489147) for bustages in JSDebugger.cpp on a CLOSED TREE 2018-09-06 22:12:44 +03:00
Ehsan Akhgari bb7fcd9d69 Bug 1489147 - Remove the XPCOM component registration for nsXPConnect; r=mccr8
We move the XPConnect() singleton accessor to nsIXConnect to make it available for consumers outside of XPConnect.  Most of the consumers of the singleton accessor just need the nsIXPConnect public interface, except for the IsShuttingDown() member which this patch adds to nsIXPConnect as well.

Differential Revision: https://phabricator.services.mozilla.com/D5151
2018-09-06 14:52:07 -04:00
André Bargull 38691a7464 Bug 1485066 - Part 11: Remove the unused |inBuf| argument from JS::FormatStackDump and change it to use Sprinter. r=Waldo 2018-09-05 03:01:23 -07:00
Cosmin Sabou 1f0a42def4 Backed out 14 changesets (bug 1485066) for build bustages on MessageManagerFuzzer. CLOSED TREE
Backed out changeset e40f67f15bf1 (bug 1485066)
Backed out changeset f09bc4d5fdcc (bug 1485066)
Backed out changeset 939e27aa2d59 (bug 1485066)
Backed out changeset d50fcf82556c (bug 1485066)
Backed out changeset 5cbc0ae0117a (bug 1485066)
Backed out changeset 09b5382e0baf (bug 1485066)
Backed out changeset 6676e8fedcb3 (bug 1485066)
Backed out changeset 28e7e61c11ec (bug 1485066)
Backed out changeset b08b0cfc1dbe (bug 1485066)
Backed out changeset 8defc9eabfac (bug 1485066)
Backed out changeset bf167b0a3af3 (bug 1485066)
Backed out changeset 4f89260d5e30 (bug 1485066)
Backed out changeset c22fc17c9d87 (bug 1485066)
Backed out changeset d35bb63dbc1d (bug 1485066)
2018-09-05 15:54:03 +03:00
André Bargull ceccb59fda Bug 1485066 - Part 11: Remove the unused |inBuf| argument from JS::FormatStackDump and change it to use Sprinter. r=Waldo 2018-09-05 03:01:23 -07:00
Jan de Mooij cbb67627a3 Bug 722345 part 3 - Remove request API. r=luke
Differential Revision: https://phabricator.services.mozilla.com/D4424

--HG--
extra : rebase_source : 1842588c00dbc8fb4294ce5436cdb787190909b4
2018-08-28 09:53:30 +02:00
Bogdan Tara ba6cae21b7 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-09-05 02:45:18 +03:00
Bogdan Tara 8b38c1ae85 Merge autoland to mozilla-central. a=merge 2018-09-05 01:53:44 +03:00
ffxbld ebe4d2e4d6 Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2018-09-04 11:15:27 -07:00
Henri Sivonen 34a614ae14 Bug 1488186 - Avoid writing past the logical length of a string in Base64URLEncode. r=froydnj
MozReview-Commit-ID: 4Sv7fHYIT9n

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

--HG--
extra : moz-landing-system : lando
2018-09-04 18:24:52 +00:00
Henri Sivonen f691976c87 Bug 1487051 - Remove EnsureStringLength(). r=froydnj
MozReview-Commit-ID: 4X4Rrs8xHTF

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

--HG--
extra : moz-landing-system : lando
2018-09-04 18:25:11 +00:00
Jan de Mooij 53f1370b5f Bug 1267297 - Use AutoEntryScript for script activity bookkeeping instead of the request machinery. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D4085

--HG--
extra : moz-landing-system : lando
2018-09-04 16:59:56 +00:00
Narcis Beleuzu 28a443cd37 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-09-02 01:00:31 +03:00
Brian Hackett cfe3b9a606 Bug 1486616 - Execute record/replay triggers when finalizing deferred things, r=mccr8.
--HG--
extra : rebase_source : 1b3091755ceaa78836e6fd40cb3af4ceedbebdbe
2018-08-31 05:35:36 -10:00
Brian Hackett 4d3ad5a928 Bug 1486573 - Track changes to nsPipeOutputStream writer count, r=froydnj.
--HG--
extra : rebase_source : f6a62ea3572e29424851c29c5b9526aab9d29bf5
2018-08-31 05:26:27 -10:00
Henri Sivonen 1a4db3c1d3 Bug 1487614 - Make the docs of SetCapacity() even more explicit. r=froydnj
MozReview-Commit-ID: KinrUtBG7Jd

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

--HG--
extra : moz-landing-system : lando
2018-09-01 07:50:11 +00:00
Henri Sivonen c62a32ebf1 Bug 1487606 - Make AppendLiteral() not undo the effect of SetCapacity(). r=froydnj
MozReview-Commit-ID: I2QSXbQhOUH

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

--HG--
extra : moz-landing-system : lando
2018-08-31 14:57:26 +00:00
Luke Wagner 109280bf02 Bug 1330661 - Baldr: make the BuildIdOp a process global (r=lth,mccr8)
--HG--
extra : rebase_source : 0388505583fb0b445f989e3a8b97ec861ed62499
2018-09-04 14:25:57 -05:00
Olli Pettay e8a92b84f1 Bug 1488413 - To improve performance, CycleCollector could use a cache on top of the graph's hashtable, r=mccr8
--HG--
extra : rebase_source : 8f67777644346549a3df3c4e97433378dc70a177
2018-09-04 23:22:37 +03:00
Henri Sivonen 818df08a5b Bug 1487050 - Remove CountCharInReadable() as dead code. r=froydnj
MozReview-Commit-ID: DpRxyOgO85X

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

--HG--
extra : moz-landing-system : lando
2018-09-04 14:48:39 +00:00
Narcis Beleuzu 05d91d3e02 Merge inbound to mozilla-central. a=merge 2018-08-30 19:58:52 +03:00
Henri Sivonen 5a26b995cf Bug 1487309 - Improve AssignLiteral() and AppendLiteral() documentation to talk about u"" literals. r=froydnj
MozReview-Commit-ID: 60NCtRgKRcn

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

--HG--
extra : moz-landing-system : lando
2018-08-30 14:37:09 +00:00
Henri Sivonen d733f8a4f2 Bug 1484987 - Avoid writing past the logical length of a string in XPCOM. r=froydnj
MozReview-Commit-ID: 3qkhOiQduLQ

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

--HG--
extra : moz-landing-system : lando
2018-08-30 11:09:27 +00:00
Paolo Amadini 5aaf848c8b Bug 1457218 - Part 3 - Remove the "menu-button" binding. r=surkov,bgrins
Differential Revision: https://phabricator.services.mozilla.com/D4531

--HG--
extra : rebase_source : 502aa0ff24d0e3d46ef60c7a14498e25c66d1c81
2018-08-29 14:04:25 +01:00
Nathan Froyd 7624eea8a4 Bug 1480549 - add aarch64 windows support to xptcall; r=dmajor
Since the ABI on this platform just uses the ARM procedure call
standard, which is the same standard Unix uses, we can just
copy-and-paste everything, with some adjustments to the assembly code to
compile properly.
2018-08-29 15:49:57 -04:00
Margareta Eliza Balazs 2fe43133db Merge inbound to mozilla-central. a=merge 2018-08-29 12:43:37 +03:00
Andreea Pavel eb68a1e6db Backed out changeset 097c92352197 (bug 1484987) for failing gtests at Base64.TruncateOnInvalidDecodeCString on a CLOSED TREE 2018-08-29 10:15:50 +03:00
Henri Sivonen a459f8cbf4 Bug 1484987 - Avoid writing past the logical length of a string in XPCOM. r=froydnj
MozReview-Commit-ID: 3qkhOiQduLQ

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

--HG--
extra : moz-landing-system : lando
2018-08-29 06:04:57 +00:00
Andreea Pavel a7c7a16e37 Backed out changeset 9216e8942ed6 (bug 1484987) for build bustages at builds/worker/workspace/build/src/xpcom/io/nsStorageStream.cpp on a CLOSED TREE 2018-08-29 08:36:19 +03:00
Henri Sivonen 5969209bdc Bug 1484987 - Avoid writing past the logical length of a string in XPCOM. r=froydnj
MozReview-Commit-ID: 3qkhOiQduLQ

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

--HG--
extra : moz-landing-system : lando
2018-08-28 14:29:40 +00:00
Henri Sivonen e1f43883a7 Bug 1484668 - Document that writing past mLength code units via BeginWriting() is not OK. r=froydnj
MozReview-Commit-ID: FdZN8PGLO9M

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

--HG--
extra : moz-landing-system : lando
2018-08-24 12:50:06 +00:00
Gerald Squelart bad49db9b0 Bug 1479996 - Combine nsTArray::IndexOf and element access into lambda-friendly functions - r=froydnj
In many places, nsTArray::IndexOf is followed by accessing that element
(hopefully with `Elements() + index`, which skips unnecessary bounds checks.)
But this pattern introduces operations that could be avoided:
- IndexOf converts the address of the found element into an index,
- The caller must test for a special `NoIndex` value,
- On success, accesses convert that index back into the original address.

This patch introduces new 'ApplyIf...' functions that combine all these
operations in a more efficient ensemble: If the sought element is found, it is
passed by reference to a given callable object (usually a lambda); if not
found, another callable is invoked.
Depending on what they need, the first callable may take one of these parameter
lists: (), (size_t), (maybe-const elem_type&), (size_t, maybe-const elem_type&).
On top of removing the pointer->index->pointer operations in most cases,
invoking callables directly from ApplyIf is safer, as the array is guaranteed to
be untouched at this time.
Also, being templates taking function objects, in most cases the compiler should
be able to inline and optimize the search and its callables' code.

This patch gives example uses in nsTArray::Contains, and in
FrameProperties::GetInternal, SetInternal.
And FrameProperties::Has now calls Contains, which is more efficient because
the former code would compute an index (or NoIndex), and then convert that index
to a bool; whereas the new code directly produces a bool from within the search
algorithm.

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

--HG--
extra : moz-landing-system : lando
2018-08-28 22:04:09 +00:00
Ciure Andrei d716a04e20 Merge inbound to mozilla-central. a=merge 2018-08-29 00:58:21 +03:00
Henri Sivonen c3d01b0fe9 Bug 1484045 - Prohibit shrinking of the string's buffer in appends of Latin1 to UTF-16 and vice versa. r=froydnj
This restores the old allocation semantics for "append" operations between
Latin1 and UTF-16 while keeping the buffer re-use optimization for the
"assign" cases.

MozReview-Commit-ID: 8JCw3AaCNLN

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

--HG--
extra : moz-landing-system : lando
2018-08-28 14:13:17 +00:00
Henri Sivonen 569510fbdc Bug 1485289 - Use BeginWriting() instead of GetMutableData() in LateWriteChecks. r=froydnj
MozReview-Commit-ID: G64L8b6wnO0

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

--HG--
extra : moz-landing-system : lando
2018-08-28 14:50:11 +00:00
Henri Sivonen acc4596637 Bug 1486470 - Avoid overwriting newData when there's an OOM failure on buffer shrinking attempt. r=froydnj
MozReview-Commit-ID: F54grcUOwBG

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

--HG--
extra : moz-landing-system : lando
2018-08-28 14:49:20 +00:00
Henri Sivonen 876f7ad09f Bug 1482828 - Introduce C++ analogs of Rust's nsA[C]StringBulkWriteHandle. r=froydnj
MozReview-Commit-ID: BZyHd4VzNur

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

--HG--
extra : moz-landing-system : lando
2018-08-28 16:42:26 +00:00
Henri Sivonen 8711bfbcb6 Bug 1483603 - Avoid propagating OOM from StartBulkWrite() when shrinking the buffer. r=froydnj
Shrinking the buffer is purely a memory footprint optimization and can be
omitted as far as the string semantics visible to the caller are concerned.
Since shrinking is optional, it doesn't make sense to propagate error when
it fails due to OOM.

MozReview-Commit-ID: BuyBLCBmYzZ

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

--HG--
extra : moz-landing-system : lando
2018-08-27 07:03:59 +00:00
David Keeler 1cd81e4c5a bug 1485087 - remove the option to use the TLS session cache from nsITLSServerSocket r=jryans,mayhemer
As initially implemented, nsITLSServerSocket by default enabled the use of the
TLS session cache provided by NSS. However, no consumers of nsITLSServerSocket
actually used it. Because it was an option, though, PSM had to jump through some
hoops to a) make it work in the first place and b) not have NSS panic on
shutdown. Furthermore, it meant increased memory usage for every user of Firefox
(and again, nothing actually used the feature, so this was for naught).

In bug 1479918, we discovered that if PSM shut down before Necko, NSS could
attempt to acquire a lock on the session cache that had been deleted, causing a
shutdown hang. We probably should make it less easy to make this mistake in NSS,
but in the meantime bug 1479918 needs uplifting and this workaround is the
safest, most straight-forward way to achieve this.

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

--HG--
extra : moz-landing-system : lando
2018-08-24 16:00:34 +00:00