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

2761 Коммитов

Автор SHA1 Сообщение Дата
Kris Maglione d1d8cfe0f0 Bug 1478124: Part 8e - Update XPCOM module to use a static component manifest. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D15043

--HG--
extra : rebase_source : 67200c20fe6db1abaf58b9e5203dce0e665e1117
extra : source : 012fd0107204da802f04b7c133b33a5dd22123a4
2018-12-18 20:28:14 -08:00
arthur.iakab c1fae83952 Backed out 16 changesets (bug 1478124) for failing android geckoview-junit CLOSED TREE
Backed out changeset fce62c77a56b (bug 1478124)
Backed out changeset eb2fa3b5edf7 (bug 1478124)
Backed out changeset 8dacce59fcc0 (bug 1478124)
Backed out changeset 012fd0107204 (bug 1478124)
Backed out changeset 496aaf774697 (bug 1478124)
Backed out changeset 21f4fda03159 (bug 1478124)
Backed out changeset b0444e0bc801 (bug 1478124)
Backed out changeset d94039b19943 (bug 1478124)
Backed out changeset 5d85deac61c2 (bug 1478124)
Backed out changeset 929fd654c9df (bug 1478124)
Backed out changeset 1ddd80d9e91a (bug 1478124)
Backed out changeset b8d2dfdfc324 (bug 1478124)
Backed out changeset f500020a273a (bug 1478124)
Backed out changeset dd00365ebb55 (bug 1478124)
Backed out changeset 538e40c5ee13 (bug 1478124)
Backed out changeset bedaa9c437ad (bug 1478124)
2019-01-29 10:03:06 +02:00
Kris Maglione cf4ef5fd24 Bug 1478124: Part 8e - Update XPCOM module to use a static component manifest. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D15043

--HG--
extra : rebase_source : 91ea45ed8699df8492a62268ffa672c360222b68
extra : absorb_source : f480bf52dfe4bf9c256d00db07b3f34b3ba932f1
extra : histedit_source : 65168d0307dbd1928155e8cce8a0d45ef077f0de
2018-12-18 20:28:14 -08:00
Andrea Marchesini 931c1560cf Bug 1520150 - Single InputStreams can serialize themselves as IPCRemoteStreams (pipe) - part 3 - pipe for string and storage streams, r=smaug 2019-01-28 10:49:28 +01:00
Andrea Marchesini 0499bad916 Bug 1520150 - Single InputStreams can serialize themselves as IPCRemoteStreams (pipe) - part 1 - Passing IPC managers around, r=smaug
Before this set of patches, the decision of exposing the stream as a pipe was
centralized in IPCStreamUtils, based on the total expectation size of the IPC
message. This triggers issues when multiplex inputStreams contain something
that cannot be sent as a pipe (IPCBlobInputStream, for instance), or something
that it's better to do not set as a pipe (nsFileInputStream), together with
memory streams (nsStringInputStream), which could make the IPC message greater
then what accepted (1mb).

These patches move the "pipe vs non-pipe" choice into the single inputStream
implementation.
2019-01-28 10:48:35 +01:00
Sylvestre Ledru 0b4021fcad Bug 1521460 - Also reformat objective-c files r=mstange,ehsan,spohl
# ignore-this-changeset

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

--HG--
extra : histedit_source : 084f340503d2e1a2d9e1753c38b2c4ee9c7819f3
2019-01-21 18:18:16 +01:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Andrew McCreight 84526df4e5 Bug 1517071 - Clear AsyncWaitRunnable::mStream when cancelled. r=froydnj
AsyncWaitRunnable holds a strong reference to its stream, and
NonBlockingAsyncInputStream holds a strong reference to the
runnable. The cycle gets broken in the RunAsyncWaitCallback() method
of the stream, but if the runnable is cancelled then we leak them
both. This patch fixes that by clearing the pointer to the stream when
the runnable is cancelled, breaking the cycle.

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

--HG--
extra : moz-landing-system : lando
2019-01-11 16:57:51 +00:00
Andreea Pavel ad0f015331 Backed out 1 changesets (bug 1517071) for build bustages on a CLOSED TREE
Backed out changeset 3b7589bf68d0 (bug 1517071)
2019-01-11 18:15:59 +02:00
Andrew McCreight d98ef96a18 Bug 1517071 - Clear AsyncWaitRunnable::mStream when cancelled. r=froydnj
AsyncWaitRunnable holds a strong reference to its stream, and
NonBlockingAsyncInputStream holds a strong reference to the
runnable. The cycle gets broken in the RunAsyncWaitCallback() method
of the stream, but if the runnable is cancelled then we leak them
both. This patch fixes that by clearing the pointer to the stream when
the runnable is cancelled, breaking the cycle.

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

--HG--
extra : moz-landing-system : lando
2019-01-11 14:36:45 +00:00
Jorg K 5a6ca9bbf4 Bug 1511692 - suppress warning for NS_BASE_STREAM_CLOSED from base streams Available() call. r=baku 2018-12-04 00:48:00 +02:00
Tooru Fujisawa 7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Ehsan Akhgari 490e611801 Bug 1508472 - Part 5: Fifth batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal. I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-29 10:30:46 +00:00
Valentin Gosu 66d5164c37 Bug 1502097 - (Part 2) Define IDN blocklist as ranges of characters [ {firstChar, lastChar}* ] r=jfkthame,dragana
* Changes the format of the blocklist from a list of characters to a list of
  character ranges. Binary search still works, and it is easier to include
  large ranges of characters in the blocklist.
* Moves logic for handling the blocklist to IDNBlocklistUtils.h/.cpp
* Changes NS_EscapeURL to take a function that determines if a character
  is blocked. This way the type of the array doesn't matter.

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

--HG--
extra : moz-landing-system : lando
2018-11-24 12:04:34 +00:00
Andrea Marchesini 888416a7cc Bug 1435899 - Close underlying stream in NonBlockingAsyncInputStream sooner. r=froydnj
--HG--
extra : rebase_source : 4cbaa004bba9c81347468025d06d51a037530f4c
2018-02-27 02:03:00 -05: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
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
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
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
Ciure Andrei 9dc058058c Backed out changeset 6af35f6a050f (bug 1488439) for PluginProcessParent.cpp build bustages CLOSED TREE 2018-10-10 23:47:57 +03:00
David Parks cdf3ac5659 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-10 20:16:22 +00: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
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 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
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
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
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
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 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
Nicholas Nethercote e51afbee7e Bug 1486690 - Remove unnecessary checks after moz_xrealloc() calls. r=glandium
--HG--
extra : rebase_source : c036680008cef1f87ed94700f9146022ce879e53
2018-08-28 15:56:23 +10:00
Nicholas Nethercote ac5efebb4b Bug 1486690 - Remove unnecessary checks after moz_xmalloc() calls. r=glandium
There are surprisingly many of them.

(Plus a couple of unnecessary checks after `new` calls that were nearby.)

--HG--
extra : rebase_source : 47b6d5d7c5c99b1b50b396daf7a3b67abfd74fc1
2018-08-28 15:56:01 +10:00
Kris Maglione 7c4ecc33ad Bug 1486182: Follow-up: Fix straggler nsIUTF8StringEnumerator references. r=bustage CLOSED TREE
--HG--
extra : amend_source : 78712fd8de524cb047e6e398c47333bacfcd85db
2018-08-28 14:29:16 -07:00
aceman 77d5a7fd81 Bug 1486311 - convert remaining nsIFile::GetDirectoryEntries() callers to pass in a nsIDirectoryEnumerator. r=kmag 2018-08-26 14:15:00 +03:00
Marco Castelluccio aac81fa3f1 Bug 1486528 - Remove some unnecessary nsIMemory imports. r=njn
--HG--
extra : rebase_source : 5abdbcd1efa23cb05cb1f1dc995c3d532d240de9
2018-08-27 16:38:18 +02:00
Kris Maglione 2dee0aae3c Bug 1484496: Part 4b - Add intrinsic type information to most nsSimpleEnumerators. r=froydnj
This allows JS callers to automatically get the correct types during
interation, without having to explicitly specify them.

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

--HG--
extra : rebase_source : b708f382d8ea571d199c669bfed5b5a7ca9ffac4
extra : histedit_source : 7df6feb82088c8a5ca45dc28fe4d2b852c177fee
2018-08-18 21:06:32 -07:00
Kris Maglione c943b2a5c4 Bug 1484496: Part 4a - Add JS iterator support to nsISimpleEnumerator. r=mccr8
This patch adds simple stubs to convert between the nsISimpleEnumerator
iteration protocol and the JS iteration protocol.

Each iterable object is required to have an @@iterator method which returns an
object implementing the iterator protocol. The later objects, by convention,
also have such a method which returns the object itself.

This patch adds both a @@iterator() and entries() methods to
nsISimpleEnumerator. The former returns an iterator which returns plain
nsISupports objects. The latter accepts an IID and queries each element to
that IID before returning it. If any element fails to query, the error is
propagated to the caller.

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

--HG--
extra : rebase_source : 340eb43a1c5e6d7ae69fa8ee486d66d31d079b14
extra : histedit_source : f3efc6c265851a563968ee410e4626e0540f55c0
2018-08-18 16:02:49 -07:00
Kris Maglione 0425e42aa8 Bug 1484496: Part 3 - Fix nsISimpleEnumerator implementations with broken contracts. r=froydnj
The nsISimpleEnumerator contract specifies that GetNext() returns
NS_ERROR_FAILURE when iteration is complete. Several implementations, however,
either return NS_OK and a null result, or return some other error code, when
iteration is complete.

Since my initial implementation of the JS iteration stubs rely on the
contract-defined behavior of GetNext(), these need to be fixed before it can
land.

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

--HG--
extra : rebase_source : aab0395df52e18ccff5b0a2489a983013bf484b1
extra : histedit_source : a5644f0a88799b4463af9dd01dfec33b373b1f58
2018-08-18 18:28:10 -07:00
Kris Maglione 65c28aa0ad Bug 1484496: Part 2 - Add common base class for all nsISimpleEnumerator implementations. r=froydnj
In order to allow JS callers to use nsISimpleEnumerator instances with the JS
iteration protocol, we'll need to additional methods to every instance. Since
we currently have a large number of unrelated implementations, it would be
best if they could share the same implementation for the JS portion of the
protocol.

This patch adds a stub nsSimpleEnumerator base class, and updates all existing
implementations to inherit from it. A follow-up will add a new base interface
to this class, and implement the additional functionality required for JS
iteration.

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

--HG--
extra : rebase_source : ad66d7b266856d5a750c772e4710679fab9434b1
extra : histedit_source : a83ebffbf2f0b191ba7de9007f73def6b9a955b8
2018-08-18 14:22:47 -07:00
Nathan Froyd 3e20f0d916 Bug 1471743 - remove STRICT_FAKE_SYMLINKS code from nsLocalFileWin; r=erahm
We don't define STRICT_FAKE_SYMLINKS anywhere, so this is dead code.
2018-08-21 17:00:59 -04:00
Mike Conley fe62d22333 Bug 1355346 - Call nsCocoaFileUtils::AddOriginMetadataToFile off of the main-thread when completing downloads. r=mstange
Tags: #secure-revision

Bug #: 1355346

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

--HG--
extra : rebase_source : 2d128a363f21b82364562ac19c53d715eeac0d9d
2018-08-17 19:07:51 -04:00
Cameron McCormack 1cbfafaeb7 Bug 1482782 - Part 2: Move directory service atoms into nsGkAtoms. r=njn
Summary: Depends On D3280

Reviewers: njn!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3281
2018-08-15 15:46:00 +10:00
Narcis Beleuzu d20e8e7674 Backed out 8 changesets (bug 1483121, bug 1482782) for build bustages on nsDirectoryService.cpp. CLOSED TREE
Backed out changeset 0a8334bbcf45 (bug 1483121)
Backed out changeset cb2dcb859071 (bug 1482782)
Backed out changeset c834d4ca2eef (bug 1482782)
Backed out changeset 887de0efbb67 (bug 1482782)
Backed out changeset 018fdb50a6be (bug 1482782)
Backed out changeset 33a8aa8096c9 (bug 1482782)
Backed out changeset e3632354f16e (bug 1482782)
Backed out changeset 46f8319bee82 (bug 1482782)
2018-08-15 09:14:41 +03:00
Cameron McCormack ae87156cab Bug 1482782 - Part 2: Move directory service atoms into nsGkAtoms. r=njn
Summary: Depends On D3280

Reviewers: njn!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3281
2018-08-15 15:46:00 +10:00
Masatoshi Kimura 3b21b7868b Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : c09366fb93e5b0f72abe1e99d3094e3d96a934fb
extra : intermediate-source : 5950c9d63c3b4fd63a25464a7b50944aaec7079f
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Andrea Marchesini f7b001ece2 Bug 1479407 - nsMultiplexInputStream::AppendElement should be fallible, r=froydnj 2018-07-30 23:15:36 +02:00
Shane Caraveo 7962eacafd Bug 1344771 - Implement attribution on OSX using quarantine data, r=mossop,spohl
MozReview-Commit-ID: NgjE1HZS7M

--HG--
rename : browser/modules/AttributionCode.jsm => browser/components/attribution/AttributionCode.jsm
rename : browser/modules/test/unit/test_AttributionCode.js => browser/components/attribution/test/xpcshell/test_AttributionCode.js
extra : rebase_source : 197f427e0d2fcbdbe85d5ebe65067dcc9eee6407
2018-07-23 11:01:26 -03:00
Kris Maglione 7aa3564a28 Bug 1477579: Part 3 - Avoid duplicating static strings in category manager entries. r=froydnj
Much like the component manager, many of the strings that we use for category
manager entries are statically allocated. There's no need to duplicate these
strings.

This patch changes the category manager APIs to take nsACStrings rather than
raw pointers, and to pass literal nsCStrings when we know we have a literal
string to begin with. When adding the category entry, it then skips making
copies of any strings with the LITERAL flag.

MozReview-Commit-ID: EJEcYSdNMWs
***
amend-catman

--HG--
extra : source : aa9a8f18e98f930a3d8359565eef02f3f6efc5f9
extra : absorb_source : 81a22ab26ee8017ac43321ff2c987d8096182d37
2018-07-23 17:41:06 -07:00
Brindusan Cristian 91a3707d5f Backed out 3 changesets (bug 1477579) for build bustages on xpcshell\selftest.py and crashtest failures on /components/nsComponentManager.cpp. CLOSED TREE
Backed out changeset aa9a8f18e98f (bug 1477579)
Backed out changeset 5fb0b7746a5d (bug 1477579)
Backed out changeset 8359f8fe4184 (bug 1477579)
2018-07-24 04:55:03 +03:00
Kris Maglione dfd38a6ac3 Bug 1477579: Part 3 - Avoid duplicating static strings in category manager entries. r=froydnj
Much like the component manager, many of the strings that we use for category
manager entries are statically allocated. There's no need to duplicate these
strings.

This patch changes the category manager APIs to take nsACStrings rather than
raw pointers, and to pass literal nsCStrings when we know we have a literal
string to begin with. When adding the category entry, it then skips making
copies of any strings with the LITERAL flag.

MozReview-Commit-ID: EJEcYSdNMWs
***
amend-catman

--HG--
extra : rebase_source : 4f70e7b296ecf3b52a4892c92155c7c163d424d2
2018-07-23 17:41:06 -07:00
Brian Hackett 2f0f16c25a Bug 1465452 Part 11 - Record refcount changes for pipe input/output streams, r=erahm.
--HG--
extra : rebase_source : 4c5f16a40e92688a3724da10c341dc4961911038
2018-07-21 14:34:51 +00:00
Valentin Gosu 5bd326c5f5 Bug 1412081 - Add ability to blacklist file paths on Unix platforms r=mayhemer
--HG--
extra : rebase_source : 6894f5c3df745519e5e9db5b7bf6f004922152d1
2018-06-20 02:52:12 +02:00
Nathan Froyd 8f2baafcb6 Bug 1471434 - micro-optimize refcounting for directory enumerators; r=erahm
We were not being as efficient as we could be with passing ownership.
2018-06-27 09:46:33 -04:00
Jorg K 0570f32194 Bug 1471278 - Restore GetSpecialSystemDirectory() for Win_Documents when compiling Thunderbird. r=froydnj 2018-06-26 13:41:00 +03:00
Chris Peterson 2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Josh Aas e70eb1edef Bug 1449686 - Remove most XPCOM special directories as they are unused. r=froydnj 2018-06-25 09:55:00 +03:00
Andi-Bogdan Postelnicu 78304aaf0d Bug 1453795 - XPCOM - Initialize member fields in classes/ structures. r=froydnj
--HG--
extra : rebase_source : c9d9e80b83ad52d8ac9203f491f1c9469a7e9b0c
extra : amend_source : ca502ae98ff21a2e3d1ab2d389310f3a5aded5ed
2018-06-15 14:41:20 +03:00
shindli 350fbcac6e Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-06-19 00:46:12 +03:00
Paolo Amadini eee7fe032d Bug 1468217 - Add "SettingContent-ms" to the list of executable file extensions. r=Gijs 2018-06-18 11:26:33 +01:00
Valentin Gosu 4cade1b2b5 Bug 1389251 - Add esc_Spaces that may be used to force escaping of spaces r=bz,jdescottes
MozReview-Commit-ID: 4tahH3IOKW

--HG--
extra : rebase_source : 12057b98c87d7d3c57e90888082f540c49c5a9a9
2018-06-18 15:06:25 +02:00
Valentin Gosu 6444ab9d1e Bug 1389251 - Do not escape spaces in nsSimpleURI r=bz
This change makes nsEscape::T_EscapeURL not escape spaces when passed esc_OnlyNonASCII.
This fixes a web-compat issue for URLs such as "javascript: alert('hello');" and the fact that data: URIs with spaces around MIME type are rejected.

MozReview-Commit-ID: 91Qw9foW6Y3

--HG--
extra : rebase_source : 2da1b5f305ca2abcce2f9988cd6a5cbc12635c61
2018-06-18 15:06:24 +02:00
Dorel Luca ba31c8c2b2 Backed out 3 changesets (bug 1389251) for browser-chrome failure on browser/base/content/test/pageinfo/browser_pageinfo_image_info.js. CLOSED TREE
Backed out changeset a76a3251a9d2 (bug 1389251)
Backed out changeset c6baebf7b34c (bug 1389251)
Backed out changeset 6e89a11ae28e (bug 1389251)
2018-06-15 06:18:04 +03:00
Valentin Gosu 316f7bf9ac Bug 1389251 - Add esc_Spaces that may be used to force escaping of spaces r=bz,jdescottes
MozReview-Commit-ID: 7VgNlkWqrPK

--HG--
extra : rebase_source : c7ea99bc727a82e652871e78c222e8d5d642a52e
2018-06-12 03:05:03 +02:00
Valentin Gosu 01487f76fb Bug 1389251 - Do not escape spaces in nsSimpleURI r=bz
This change makes nsEscape::T_EscapeURL not escape spaces when passed esc_OnlyNonASCII.
This fixes a web-compat issue for URLs such as "javascript: alert('hello');" and the fact that data: URIs with spaces around MIME type are rejected.

MozReview-Commit-ID: B78AacLxGBp

--HG--
extra : rebase_source : fcef25fab58f7da1732725054ae684588f2e0e89
2018-06-12 03:03:57 +02:00
Andrea Marchesini c60afa7b18 Bug 1466314 - StreamBlobImpl should wrap the cloned stream with InputStreamLengthWrapper if needed, r=smaug 2018-06-13 08:37:26 -07:00
Honza Bambas 4bec70d83f Bug 1468071. r=valentin 2018-06-12 10:50:39 -04:00
Honza Bambas eef37ac56e Bug 1413868. r=valentin 2018-06-07 13:56:16 -04:00
Andrea Marchesini 1590c0bec2 Bug 1466101 - Fix a debug-only variable use in InputStreamLengthHelper, r=mayhemer 2018-06-05 23:19:00 +02:00
Csoregi Natalia 2f779be8d9 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-02 01:03:45 +03:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Andrea Marchesini 77e2dca204 Bug 1460561 - nsMultiplexInputStream should behave correctly when NS_InputStreamIsBuffered() is used, r=michal, r=froydnj 2018-05-24 07:51:53 +02:00
Andrea Marchesini 1bfb8a0e93 Bug 1464090 - Assertion in InputStreamLengthHelper::GetAsyncLength to avoid dealing with nsIAsyncInputStream, r=mayhemer 2018-05-31 18:12:26 +02:00
Andrea Marchesini f6ec0a57a4 Bug 1464090 - InputStreamLengthHelper must swap the callback in order to release them on the owning thread, r=mayhemer 2018-05-31 18:12:25 +02:00
Andrea Marchesini 4a5b123402 Bug 1464090 - Implement InputStreamLengthWrapper to make any stream nsIInputStreamLength and nsIAsyncInputStreamLength, r=froydnj 2018-05-31 18:12:25 +02:00
Josh Aas cedb6a19de Bug 1457941: Add a number of result checks to nsLocalFileWin, avoid use of uninitialized values. r=froydnj 2018-05-30 19:04:00 +03:00
Markus Stange 423ce68542 Bug 1462784 - Relabel various other stuff as being OTHER. r=njn
Any more specific work that is happening in these methods will have its own
specific category labeling in that specific code. The instances touched in this
patch are more on the outside and don't really know what kind of code is going
to be running inside.

MozReview-Commit-ID: 47NO1DZzkdH

--HG--
extra : rebase_source : 344c380ddaaf42a1fd820a26b762c61ee9e2d524
2018-05-18 17:58:43 -04:00
Csoregi Natalia fc2ed6e92a Backed out 18 changesets (bug 1462784) for ESlint failure on FlameGraph.js:1297. CLOSED TREE
Backed out changeset 79556798ff9f (bug 1462784)
Backed out changeset 88321efb673b (bug 1462784)
Backed out changeset 7880f9dc7023 (bug 1462784)
Backed out changeset 71fe35fd1f7e (bug 1462784)
Backed out changeset a543b94b049a (bug 1462784)
Backed out changeset d1ca8b0f2221 (bug 1462784)
Backed out changeset 68eabfbf3c16 (bug 1462784)
Backed out changeset 34e71c789903 (bug 1462784)
Backed out changeset 6fe79d1ca1bd (bug 1462784)
Backed out changeset e5ad2e525ea9 (bug 1462784)
Backed out changeset 329645ff1e23 (bug 1462784)
Backed out changeset e09c38853172 (bug 1462784)
Backed out changeset 0663d1a6d2da (bug 1462784)
Backed out changeset 106967fc29d2 (bug 1462784)
Backed out changeset 99b4a433a8e5 (bug 1462784)
Backed out changeset 1d38a4cf5a4a (bug 1462784)
Backed out changeset 692017229de6 (bug 1462784)
Backed out changeset c2911a626671 (bug 1462784)
2018-06-01 23:42:00 +03:00
Markus Stange 3f54b9a3dd Bug 1462784 - Relabel various other stuff as being OTHER. r=njn
Any more specific work that is happening in these methods will have its own
specific category labeling in that specific code. The instances touched in this
patch are more on the outside and don't really know what kind of code is going
to be running inside.

MozReview-Commit-ID: 47NO1DZzkdH

--HG--
extra : rebase_source : f807c14bf6a592e0c651e15b63d1e7d63e4b0159
2018-05-18 17:58:43 -04:00
Andrea Marchesini 7dcc1b6880 Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 9 - necko and docShell, r=mayhemer, r=smaug 2018-05-23 07:12:36 +02:00
Andrea Marchesini 767ed01fe0 Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 7 - nsIMultiplexInputStream exposes nsIInputStreamLength, r=froydnj, r=mayhemer 2018-05-23 07:12:35 +02:00
Andrea Marchesini cb2d1c2cfe Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 4 - SlicedInputStream exposes nsIInputStreamLength, r=froydnj 2018-05-23 07:12:35 +02:00
Andrea Marchesini 1b19a3a663 Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 3 - InputStreamLengthHelper, r=froydnj 2018-05-23 07:12:35 +02:00
Andrea Marchesini 86aef1bfc6 Bug 1434553 - Implement nsIInputStreamLength and nsIAsyncInputStreamLength - part 1 - IDL, r=mayhemer, r=froydnj, r=smaug 2018-05-23 07:12:34 +02:00
Kris Maglione 6b12d08f7d Bug 1462937: Update callers to use nsIFile::GetDirectoryEntries as a nsIDirectoryEnumerator. r=froydnj
MozReview-Commit-ID: Iv4T1MVAF5

--HG--
extra : rebase_source : 1c518883d082884db7f9323a5acc20361228c26b
extra : histedit_source : 70a73c23d1199d3bfbb5379c78930401166c094b
2018-05-19 20:17:45 -07:00
Kris Maglione 5ad7ba0bf1 Bug 1462483: Part 1 - Explicitly return a nsIDirectoryEnumerator from nsIFile::GetDirectoryEntries. r=froydnj
All of our GetDirectoryEntries implementations return a
nsIDirectoryEnumerator, and a lot of relies on this, and explicitly QIs to it.
That gets a bit ugly, and in JS code, a bit expensive. We should just return a
directory enumerator directly if that's part of the API contract.

MozReview-Commit-ID: IUeEB1Ih1Wu

--HG--
extra : rebase_source : 6fffb2d4b0f83db1fd270423a195379acef0dfe4
2018-05-17 15:06:48 -07:00
Marco Bonardo c67bc6cc9a Bug 1430023 - Get rid of some remaining localstore.rdf code. r=mossop
MozReview-Commit-ID: LqqSsb2h1Yv

--HG--
extra : rebase_source : 1a89abfbe75e17ed4be3a9fa52eef2d1db9f99bd
2018-05-09 10:49:35 +02:00
Chris Peterson 71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Michael Kaply c2f87a5b92 Bug 1418953 - Remove NS_APP_USER_SEARCH_DIR. r=florian
MozReview-Commit-ID: DYzdJtz5aEH

--HG--
extra : rebase_source : 4dc75dfb011a174b7baf50e6f7faa720d88e4723
2018-04-24 15:19:47 -05:00
Kris Maglione 33ff77dabf Bug 1363925: Part 3 - Move more install logic from XPIProvider to XPIInstall. r=aswan
MozReview-Commit-ID: 87PXV43Lpn9

--HG--
extra : rebase_source : dfc38cfb001455243449d7fe0da7f9294e88c8c2
extra : histedit_source : 6e561d0601dcca8da34c926b72e65a126bd40572
2018-04-21 18:29:33 -07:00
Nathan Froyd 2d58b9d7fb Bug 1455178 - avoid static constructors for atom initialization; r=njn
For reasons unknown, if you give MSVC:

// Foo.h
struct Foo
{
  ...
};

extern const Foo gFoo;

// Foo.cpp, which necessarily includes Foo.h.
extern constexpr Foo gFoo = {
};

MSVC will create a static initializer for gFoo and place it in the
read/write data section, rather than the read-only data section.
Removing the `extern const` declaration seems to be enough to make this
problem go away.  We need to adjust the declaration of other variables
to compensate for the non-visibility of gFoo in the header file.
2018-04-22 16:53:22 -04:00
Andrea Marchesini 2bbc9938e9 Bug 1453955 - Synchronize access to various stream classes' async wait callback reference - SlicedInputStream, r=mayhemer 2018-04-13 16:40:20 +02:00
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Nathan Froyd 7bb7ffd8c9 Bug 1453134 - part 1 - add a string input stream constructor that accepts move references; r=baku
This method is more efficient when we know we're not going to need the
string afterwards, and should cut down on intermediate allocations.
2018-04-11 10:06:17 -04:00
Andrea Marchesini ff755dfc70 Bug 1451731 - Synchronize access to various stream classes' async wait callback reference - part 3 - SlicedInputStream, r=mayhemer 2018-04-10 17:33:08 +02:00
Nicholas Nethercote 9ea93c4f7b Bug 1449395 - Remove nsStaticAtomSetup. r=froydnj
Each nsStaticAtomSetup contains a pointer to a static atom, and also a pointer
to the canonical pointer to that static atom. Which is pretty weird! The
notable thing thing about it is that these structs are in an array, and that
gives us the only way to iterate over all static atoms in a single class, for
registration and lookups.

But thanks to various other recent changes to the implementation of static
atoms, we can now put the static atoms themselves into an array, which can be
iterated over. So this patch does that. With that done, nsStaticAtomSetup is no
longer necessary.

According to the `size` utility, on Linux64 this reduces the size of libxul.so
by the following amounts:

> text:  62008 bytes
> data:  20992 bytes
> bss:   21040 bytes
> total: 104040 bytes

- The bss reduction is one word per atom, because the canonical static atom
  pointers (e.g. nsGkAtoms::foo) have moved from .bss to .data, because they're
  now initialized at compile time instead of runtime.

- The data reduction is one word per atom, because we remove two words per atom
  for the nsStaticAtomSetup removal, but gain one word per atom from the
  previous bullet point.

- I'm not sure about the text reduction. It's three words per atom. Maybe
  because there is one less relocation per atom?

Other notable things in the patch:

- nsICSSAnonBoxPseudo and nsICSSPseudoElement now inherit from nsStaticAtom,
  not nsAtom, because that's more precise.

- Each static atoms array now has an enum associated with it, which is used in
  various ways.

- In the big comment about the macros at the top of nsStaticAtom.h, the pre-
  and post-expansion forms are now shown interleaved. The interleaving reduces
  duplication and makes the comment much easier to read and maintain. The
  comment also has an introduction that explains the constraints and goals of
  the implementation.

- The SUBCLASS macro variations are gone. There are few enough users of these
  macros now that always passing the atom type has become simpler.

MozReview-Commit-ID: 1GmfKidLjaU

--HG--
extra : rebase_source : 2352590101fc6693ba388f885ca4714a42963943
2018-03-29 11:48:18 +11:00