Commit Graph

18496 Commits

Author SHA1 Message Date
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
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