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

2846 Коммитов

Автор SHA1 Сообщение Дата
Nicholas Nethercote 21e7dce1a2 Bug 1410294 (part 3) - Overhaul static atom macros. r=froydnj.
There are four things that must be provided for every static atom, two of which
have a macro:
- the atom pointer declaration (no macro);
- the atom pointer definition (no macro);
- the atom char buffer (NS_STATIC_ATOM_BUFFER);
- the StaticAtomSetup struct (NS_STATIC_ATOM_SETUP).

This patch introduces new macros for the first two things: NS_STATIC_ATOM_DECL
and NS_STATIC_ATOM_DEFN, and changes the arguments of the existing two macros
to make them easier to use (e.g. all the '##' concatenation now happens within
the macros).

One consequence of the change is that all static atoms must be within a class,
so the patch adds a couple of classes where necessary (DefaultAtoms, TSAtoms).

The patch also adds a big comment explaining how the macros are used, and what
their expansion looks like. This makes it a lot easier to understand how static
atoms work. Correspondingly, the patch removes some small comments scattered
around the macro use points.

MozReview-Commit-ID: wpRyrEOTHE

--HG--
extra : rebase_source : 9f85d477b4d06c9a9e710c757de1f1476edb6efe
2017-10-22 08:50:25 +11:00
Nicholas Nethercote 074a872086 Bug 1410294 (part 1) - Rename nsStaticAtom as nsStaticAtomSetup. r=froydnj.
Because it's the type we use to set up static atoms at startup, not the static
atom itself.

The patch accordingly renames some parameters, variables, and NS_STATIC_ATOM,
for consistency.

MozReview-Commit-ID: 1a0KvhYNNw2

--HG--
extra : rebase_source : 5c66e5b2dfe053a368bf3584d957198aec4cce91
2017-10-20 14:04:47 +11:00
Kris Maglione f6ba082a01 Bug 1404198: Part 2b - Switch to NS_NewTimer* in xpcom. r=njn
MozReview-Commit-ID: BEtHEpOmT1E

--HG--
extra : rebase_source : dac8a182f1ad76df6715146e1da1279c02c0406f
2017-10-15 23:11:22 -07:00
Kris Maglione 3876d40960 Bug 1404198: Part 1 - Add non-virtual constructor for nsIObject(Input|Output)Stream and update existing callers. r=njn
MozReview-Commit-ID: 3eoh6AwDJyz

--HG--
extra : rebase_source : 92b18b6ef07d276cac79ce735ca0b592cffbf87e
2017-10-04 20:06:28 -07:00
Chris Pearce 04945c8950 Bug 1407624 - Make nsEscape.cpp build in non-unified mode. r=froydnj
nsEscape.cpp doesn't build in non-unified mode, as it uses mozilla::fallible,
mozilla::CheckedInt and mozilla::ASCIIMask::IsMasked without prefixing them
with the mozilla namespace. I suspect this file is usually included in
unified_cpp file which includes a "using namespace mozilla" directive.

MozReview-Commit-ID: GwlsK8kytLj

--HG--
extra : rebase_source : c3063aff7cdf10c416b8ee782c9bee745e643842
2017-10-11 16:32:23 +02:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Sebastian Hengst b86bd8d413 Backed out changeset 2e253e370b8d (bug 1371699) for frequently assertin in browser-chrome at SourceBuffer.cpp:473. r=backout on a CLOSED TREE 2017-10-05 13:12:36 +02:00
Sebastian Hengst 15b8e9a53b Backed out changeset 097c44e15165 (bug 1371699) 2017-10-05 13:10:55 +02:00
Sebastian Hengst 449b6fdffb Backed out changeset 950c069a0192 (bug 1371699) 2017-10-05 13:10:44 +02:00
Sebastian Hengst fd1c572923 merge mozilla-central to mozilla-inbound. r=merge a=merge on a CLOSED TREE 2017-10-05 11:47:25 +02:00
Andrea Marchesini d1f7ca1095 Bug 1403706 - Remove race conditions in temporary blob - part 3 - NS_OpenAnonymousTemporaryNsIFile, r=smaug 2017-10-05 07:41:41 +02:00
Andrea Marchesini cccac16f60 Bug 1403771 - SlicedInputStream takes ownership of the underlying stream and it propagates the Close() call, r=smaug 2017-10-05 07:38:48 +02:00
Andrea Marchesini 00a01b8402 Bug 1371699 - NonBlockingAsyncInputStream::ReadSegments passes the correct stream to the writer callback, r=froydnj 2017-10-04 11:46:34 +02:00
Andrea Marchesini 1867437172 Bug 1371699 - Use of NonBlockingAsyncInputStream in our code base, r=froydnj 2017-10-03 07:20:18 +02:00
Andrea Marchesini 952e5f8ead Bug 1371699 - Implement NonBlockingAsyncInputStream - nsIAsyncInputStream wrapper for non-blocking non-async streams, r=froydnj 2017-10-03 07:20:17 +02:00
Sebastian Hengst d4232ad6f1 Backed out changeset c68498143c13 (bug 1403771) for bustage at dom/file/StreamBlobImpl.cpp:108: 'GetInternalStream' was not declared in this scope. r=backout on a CLOSED TREE 2017-10-04 19:11:13 +02:00
Andrea Marchesini 96a79ce7c9 Bug 1403771 - SlicedInputStream takes ownership of the underlying stream and it propagates the Close() call, r=smaug 2017-10-04 18:51:10 +02:00
Andrea Marchesini fb5c48f638 Bug 1403771 - SlicedInputStream::Read should not call ::Read() of the underlying stream when there is nothing else to read, r=smaug 2017-10-04 13:10:10 +02:00
Sebastian Hengst 9d84c676a9 Backed out changeset 919a4eb29621 (bug 1371699) for frequently asserting at image/SourceBuffer.cpp:473, e.g. in browser-chrome's browser_testOpenNewRemoteTabsFromNonRemoteBrowsers.js on OS X and Windows. r=backout 2017-10-03 16:57:29 +02:00
Sebastian Hengst e8e914baa7 Backed out changeset c033bdb24e14 (bug 1371699) 2017-10-03 16:55:02 +02:00
Andrea Marchesini ff3b280260 Bug 1371699 - Use of NonBlockingAsyncInputStream in our code base, r=froydnj 2017-10-03 07:20:18 +02:00
Andrea Marchesini 1297664f63 Bug 1371699 - Implement NonBlockingAsyncInputStream - nsIAsyncInputStream wrapper for non-blocking non-async streams, r=froydnj 2017-10-03 07:20:17 +02:00
Mike Hommey e2e258506d Bug 1403366 - Remove outdated comment. r=froydnj
--HG--
extra : rebase_source : 810e0c072c2effb6eb1f3e3c3baef5dde69eee86
2017-09-28 11:01:15 +09:00
Mike Hommey 3af63f59c0 Bug 1403366 - When NS_XPCOM_INIT_CURRENT_PROCESS_DIR is not already set, fallback to BinaryPath's parent. r=froydnj
The Windows and OSX code paths were essentially doing the same thing,
and the Unix fallback was using an old convention that is pretty much
outdated.

Under normal conditions (XPCOM initialized by Firefox),
NS_XPCOM_INIT_CURRENT_PROCESS_DIR is set from BinaryPath anyways, so
this only really affects adhoc XPCOM initialization from e.g. C++ unit
tests.

--HG--
extra : rebase_source : b3151fffd4c82159b633a48dead86f2c3b0a03d6
2017-09-28 10:49:48 +09:00
Mike Hommey e68b54aab1 Bug 1403366 - Don't use nsDirectoryService::Create in nsDirectoryService::GetCurrentProcessDirectory. r=froydnj
Back in the day, there was no global with an already initialized
DirectoryService. But now there is, and, in fact,
GetCurrentProcessDirectory already errors out if that global is not set
by the time it's called. All calling nsDirectoryService::Create achieves
is doing the check again and calling QueryInterface, which we don't need
to do anyways.

--HG--
extra : rebase_source : 32f5080ecb8165cffd601799e72d278b482b0871
2017-09-28 08:46:43 +09:00
Sebastian Hengst 481a987cf9 Backed out changeset 3ac2c898f94f (bug 1403366) for failing xpcshell tests netwerk/test/httpserver/test/test_basic_functionality.js and test_bug337744.js. r=backout 2017-09-29 17:21:29 +02:00
Sebastian Hengst a4c17f327a Backed out changeset 7e08706f9f34 (bug 1403366) 2017-09-29 17:19:40 +02:00
Sebastian Hengst a4c329d535 Backed out changeset f9db424c4c6a (bug 1403366) 2017-09-29 17:19:29 +02:00
Mike Hommey 87d3bf1331 Bug 1403366 - Remove outdated comment. r=froydnj
--HG--
extra : rebase_source : 5c97f2d6b3a3157de127553bb39fe37f4af2cba8
2017-09-28 11:01:15 +09:00
Mike Hommey feab23649a Bug 1403366 - When NS_XPCOM_INIT_CURRENT_PROCESS_DIR is not already set, fallback to BinaryPath's parent. r=froydnj
The Windows and OSX code paths were essentially doing the same thing,
and the Unix fallback was using an old convention that is pretty much
outdated.

Under normal conditions (XPCOM initialized by Firefox),
NS_XPCOM_INIT_CURRENT_PROCESS_DIR is set from BinaryPath anyways, so
this only really affects adhoc XPCOM initialization from e.g. C++ unit
tests.

--HG--
extra : rebase_source : f7faa6f22ffc56fb4da7ae96eb571a35fa6f615d
2017-09-28 10:49:48 +09:00
Mike Hommey a8c37d0520 Bug 1403366 - Don't use nsDirectoryService::Create in nsDirectoryService::GetCurrentProcessDirectory. r=froydnj
Back in the day, there was no global with an already initialized
DirectoryService. But now there is, and, in fact,
GetCurrentProcessDirectory already errors out if that global is not set
by the time it's called. All calling nsDirectoryService::Create achieves
is doing the check again and calling QueryInterface, which we don't need
to do anyways.

--HG--
extra : rebase_source : 519980829be4ff4a0941c0e8d18be5761ece6552
2017-09-28 08:46:43 +09:00
Nicholas Nethercote dfd3b7e7aa Bug 1400459 (part 2) - Devirtualize nsIAtom. r=heycam.
This patch merges nsAtom into nsIAtom. For the moment, both names can be used
interchangeably due to a typedef. The patch also devirtualizes nsIAtom, by
making it not inherit from nsISupports, removing NS_DECL_NSIATOM, and dropping
the use of NS_IMETHOD_. It also removes nsIAtom's IIDs.

These changes trigger knock-on changes throughout the codebase, changing the
types of lots of things as follows.

- nsCOMPtr<nsIAtom> --> RefPtr<nsIAtom>

- nsCOMArray<nsIAtom> --> nsTArray<RefPtr<nsIAtom>>
  - Count() --> Length()
  - ObjectAt() --> ElementAt()
  - AppendObject() --> AppendElement()
  - RemoveObjectAt() --> RemoveElementAt()

- ns*Hashtable<nsISupportsHashKey, ...> -->
  ns*Hashtable<nsRefPtrHashKey<nsIAtom>, ...>

- nsInterfaceHashtable<T, nsIAtom> --> nsRefPtrHashtable<T, nsIAtom>
  - This requires adding a Get() method to nsRefPtrHashtable that it lacks but
    nsInterfaceHashtable has.

- nsCOMPtr<nsIMutableArray> --> nsTArray<RefPtr<nsIAtom>>
  - nsArrayBase::Create() --> nsTArray()
  - GetLength() --> Length()
  - do_QueryElementAt() --> operator[]

The patch also has some changes to Rust code that manipulates nsIAtom.

MozReview-Commit-ID: DykOl8aEnUJ

--HG--
extra : rebase_source : 254404e318e94b4c93ec8d4081ff0f0fda8aa7d1
2017-09-26 08:33:21 +10:00
Jean-Yves Avenard 918e171099 Bug 1403100 - Fix compilation on High Sierra (10.13). r=froydnj
MozReview-Commit-ID: B3B2YeUTlAz

--HG--
extra : rebase_source : e58b694bb7c5b0e3c9ae73f0d3f0b2d16f91019d
2017-09-26 11:52:29 +02:00
Boris Zbarsky 203072cfe1 Bug 1401171 - Make nsIMultiplexInputStream not inherit from nsIInputStream. r=bkelly
This is a preexisting issue that makes nsMultiplexInputStream multiple-inherit
from nsIInputStream: once via nsIMultipartInputStream and once via
nsIAsyncInputStream.  This causes problems once we end up with more multiplex
streams that are async streams, because then some assingments to
nsCOMPtr<nsIInputStream> start asserting.  This patch just removes the footgun
by getting rid of the multiple inheritance.
2017-09-19 16:26:21 +02:00
Sebastian Hengst 7973633f84 Backed out changeset 3c9e25405f59 (bug 1401204) an request from baku for landing with wrong bug number. r=backout 2017-09-19 16:25:20 +02:00
Boris Zbarsky 5c70c28414 Bug 1401204 - Make nsIMultiplexInputStream not inherit from nsIInputStream. r=bkelly
This is a preexisting issue that makes nsMultiplexInputStream multiple-inherit
from nsIInputStream: once via nsIMultipartInputStream and once via
nsIAsyncInputStream.  This causes problems once we end up with more multiplex
streams that are async streams, because then some assingments to
nsCOMPtr<nsIInputStream> start asserting.  This patch just removes the footgun
by getting rid of the multiple inheritance.
2017-06-11 00:07:23 -04:00
Nomis101 f73dafa53a Bug 1398291 - Remove remaining IsOSXLeopard leftover. r=mstange
--HG--
extra : rebase_source : 1b3cf1183d11c85d34a6dd713f71b7f4cbd002f3
2017-09-08 21:15:00 +02:00
Ben Kelly 10e7aa67d1 Bug 1398942 P2 Convert nsPipe3.cpp NS_ASSERTION() calls to hard assertions. r=froydnj 2017-09-13 10:36:18 -07:00
Ben Kelly db6fe1b9f4 Bug 1398942 P1 Convert existing nsPipe3.cpp MOZ_ASSERT's to use MOZ_DIAGNOSTIC_ASSERT. r=froydnj 2017-09-13 10:36:15 -07:00
Ben Kelly a8bc15e6c1 Bug 1397595 P2 Delay removing nsPipeInputStream from nsPipe list until DrainInputStream() actually runs. r=froydnj 2017-09-12 06:28:58 -07:00
Ben Kelly 244a6712f0 Bug 1397595 P1 Clear nsPipeInputStream mReadCursoe and mReadLimit in DrainInputStream() to keep state consistent with mAvailable. r=froydnj 2017-09-12 06:28:55 -07:00
Andrea Marchesini 7779bd9850 Bug 1397645 - Optimize IPCBlobInputStream slicing with the introduction of nsICloneableInputStreamWithRange, r=asuth 2017-09-11 17:29:15 +02:00
Sebastian Hengst 71854680c0 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-09-08 00:07:48 +02:00
Andrea Marchesini 536def110e Bug 1397331 - Reduce the number of QI done in nsMultiplexInputStream using counters, r=smaug 2017-09-07 18:39:10 +02:00
Eric Rahm 0617c21c24 Bug 1393230 - Part 2: Fix more improper string usages. r=njn
This fixes improper usages of Find where an offset was actually being use for
the boolean ignore case flag. It also fixes a few instances of passing in a
literal wchar_t to our functions where a NS_LITERAL_STRING or char16_t should
be used instead.

--HG--
extra : rebase_source : 5de1e9335895d65e6db06c510e8887d27be3390f
extra : source : f762f605dd83fc6331161a33e1ef5d54cafbd08d
2017-08-31 15:52:30 -07:00
Tom Ritter 6fd392825a Bug 1394013 Fix forbidden string constant assignment r=froydnj
ISO C++ forbids converting a string constant to 'wchar_t*' [-Werror=write-strings]

Either change it to a nullptr (which has same intent) or pass through a static


MozReview-Commit-ID: CSunOCyO9PN

--HG--
extra : rebase_source : bfdabc1f463eca75987c6561f7c3ea60acf0340f
2017-08-22 16:58:06 -05:00
Ryan VanderMeulen 4d504e0608 Backed out 3 changesets (bug 1393230) because it touches the servo directory.
Backed out changeset 9115364cd4aa (bug 1393230)
Backed out changeset f762f605dd83 (bug 1393230)
Backed out changeset c366bfc13e86 (bug 1393230)
2017-09-07 09:33:53 -04:00
Eric Rahm 70ece631cb Bug 1393230 - Part 2: Fix more improper string usages. r=njn
This fixes improper usages of Find where an offset was actually being use for
the boolean ignore case flag. It also fixes a few instances of passing in a
literal wchar_t to our functions where a NS_LITERAL_STRING or char16_t should
be used instead.
2017-08-31 15:52:30 -07:00
Nathan Froyd 3ac61243c3 Bug 1362449 - part 12 - avoid conversions in nsString Base64 decoding; r=erahm
After all the previous work, we can now base64 decode nsString types
without intermediate conversion steps to nsCString, which is faster and
more memory-efficient.
2017-09-06 16:58:36 -04:00
Nathan Froyd 1506c036e9 Bug 1362449 - part 11 - fix decoding subroutines to cope with wide output types; r=erahm
The result of decoding needs to be an explicit 8-bit type before being
widened to the output type to avoid undesirable effects like sign
extension.
2017-09-06 16:58:36 -04:00
Nathan Froyd bd7f988c20 Bug 1362449 - part 10 - templatify CString base64 decode routine; r=erahm
The current nsString decoding routine indirectly relies on the various
checks this routine performs; making it generic over string types
ensures that we can eventually call it directly from the nsString
decoding routine.
2017-09-06 16:58:36 -04:00
Nathan Froyd d44ccf35ff Bug 1362449 - part 9 - templatify core base64 decode routine; r=erahm
Similar to the work we did for encoding, we're going to want this to be
type-generic.
2017-09-06 16:58:36 -04:00
Nathan Froyd 9cab40ef08 Bug 1362449 - part 8 - use our base64 decoding routines instead of NSPR's; r=erahm
Our base64 decoding routines are a little nicer, and using them is a
necessary step to templating all the necessary routines.
2017-09-06 16:58:36 -04:00
Nathan Froyd 602ae06673 Bug 1362449 - part 7 - make decode routines type-generic; r=erahm
The existing Base64URL code converts from `const char` to `uint8_t`.
We're going to want versions that convert from character types to
character types, so make the decode routines accept generic input and
output types.
2017-09-06 16:58:36 -04:00
Nathan Froyd 84d527a6e0 Bug 1362449 - part 6 - factor out base64url decoding routines; r=erahm
The decoding logic is the same for Base64 and Base64URL; we might as
well reuse the routines that we already have for Base64URL decoding so
we don't make mistakes in the logic.
2017-09-06 16:58:37 -04:00
Nathan Froyd 844466bd3f Bug 1362449 - part 5 - add tables for normal base64 decoding; r=erahm
These tables are nearly identical to the ones for base64url decoding,
but ideally will be slightly more readable, since things are broken up
into sets of eight entries at a time.
2017-09-06 16:58:37 -04:00
Nathan Froyd 7e9f8459e0 Bug 1362449 - part 4 - avoid conversions in nsString Base64 encoding; r=erahm
After all the previous work, we can base64 encoding nsString values
directly into nsString values, without having to go through intermediate
nsCString values.  Since this routine backs base64 routines exposed to
the web, this change should help with OOMs that we see associated with
base64 encoding.
2017-09-06 16:58:37 -04:00
Nathan Froyd d68341d832 Bug 1362449 - part 3 - templatify core nsCString base64 encode routine; r=erahm
The nsACString -> nsACString encode routine has several checks in it for
correct operation, and the nsAString -> nsAString encode routine relies
on those checks happening via the nsACString -> nsACString routine.
Once we start encoding nsAStrings directly, we'll still need those
checks, and the easiest way to ensure they happen is to move the core
base64 encode logic for strings into a templated helper.
2017-09-06 16:58:37 -04:00
Nathan Froyd fe35e37738 Bug 1362449 - part 2 - use our Base64 encode implementation rather than NSPR's; r=erahm
One less use of NSPR is a good thing.  The failure cases that
PL_Base64Encode would have caught for us are:

1. "Truncation".
2. Integer overflow when computing destination string length.
3. Malloc failures.

The first one only gets checked if we pass in zero for the source
length, which we never do.  The latter two only get checked if we pass
in a null pointer for the destination, which we never do.  So removing
the error handling PL_Base64Encode implies here is a good thing.
2017-09-06 16:58:37 -04:00
Nathan Froyd 329a43dc67 Bug 1362449 - part 1a - fix Encode*to* for non-8-bit character types; r=erahm
We need to explicitly reduce the incoming character to 8 bits, rather
than assuming that a conversion to uint32_t will do the right thing.
2017-09-06 16:58:37 -04:00
Nathan Froyd 261bd97797 Bug 1362449 - part 1 - make Base64 encode generic over source character types; r=erahm
We'll need this to implement direct encoding from nsString, and the
changes are trivial.
2017-09-06 16:58:37 -04:00
Andrea Marchesini 2e5b11551a Bug 1396290 - nsStringStream should propagate the OOM error of SetData() when cloned, r=froydnj 2017-09-06 18:11:44 +02:00
Andrea Marchesini 570f15da30 Bug 1393360 - nsMultiplexInputStream should not QI each stream when checking if seekable, cloneable or IPC serializable, r=smaug 2017-08-25 15:32:13 +02:00
Nicholas Nethercote f582d96b98 Bug 1390428 (part 9) - Remove nsXPIDLCString. r=erahm.
This is straightforward, with only two notable things.

- `#include "nsXPIDLString.h" is replaced with `#include "nsString.h"`
  throughout, because all nsXPIDLString.h did was include nsString.h. The
  exception is for files which already include nsString.h, in which case the
  patch just removes the nsXPIDLString.h inclusion.

- The patch removes the |xpidl_string| gtest, but improves the |voided| test to
  cover some of its ground, e.g. testing Adopt(nullptr).

--HG--
extra : rebase_source : 452cc4a08046a1adb1a8099a7e85a1917de5add8
2017-08-17 15:29:03 +10:00
Sebastian Hengst 99e5cb9c14 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: GSKVB94r7Kk
2017-08-23 16:29:51 +02:00
Nicholas Nethercote 780a2e4aec Bug 1390428 (part 4) - Remove still more nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is null checked. The patch uses IsVoid() to replace
the null checks (and get() and EqualsLiteral() calls to replace any implicit
conversions).

--HG--
extra : rebase_source : 484ad42a7816b34b86afbe072e04ba131c1619c6
2017-08-16 13:58:55 +10:00
Tom Ritter c3169de381 Bug 1392630 Remove unused variables r=froydnj
MozReview-Commit-ID: eSbnMzdWZm

--HG--
extra : rebase_source : c432a7d08b845fc102251faadeb7200a4991294a
2017-08-22 09:16:31 -05:00
Tom Ritter 8760e71649 Bug 1392609 Find returns an int32_t not a uint32_t r=froydnj
MozReview-Commit-ID: 8jBe7CGbAvM

--HG--
extra : rebase_source : f8f9963118658174e11364f2aed958dfe3a0cea7
2017-08-22 06:21:09 -05:00
Nicholas Nethercote 4e54a99900 Bug 1385172 - Move some comments in nsEscape.h. r=erahm.
Comments about functions should go before the declaration, not after!

--HG--
extra : rebase_source : 7cfdb2cc7fd926bec36673d8ca334920c07d0a43
2017-08-21 08:58:28 +10:00
Nicholas Nethercote 4a623e6df4 Bug 1385172 - Replace nsEscapeHTML{,2}() with new nsAppendEscapedHTML() function. r=erahm.
The existing functions work with C strings but almost all the call sites use
Mozilla strings.

The replacement function has the following properties.

- It works with Mozilla strings, which makes it much simpler and also improves
  the call sites.

- It appends to the destination string because that's what a lot of the call
  sites need. For those that don't, we can just append to an empty string.

- It is declared outside the |extern "C"| section because there is no need for
  it to be in that section.

Note: there is no 16-bit variant of nsAppendEscapedHTML(). This is because
there are only two places that need 16-bit variants, both rarely executed,
and so converting to and from 8-bit is good enough.

The patch also adds some testing of the new function, renaming
TestEscapeURL.cpp as TestEscape.cpp in the process, because that file is now
testing other kinds of escaping.

--HG--
rename : xpcom/tests/gtest/TestEscapeURL.cpp => xpcom/tests/gtest/TestEscape.cpp
extra : rebase_source : 51145ae2c9b0b4573c7ea0c342dcb246f9f14fb9
2017-08-18 12:00:59 +10:00
Michael Kaply 73bafcec5e Bug 1389168 - Remove unnecessary IBM license text. r=gerv
MozReview-Commit-ID: 8HdaBppsJsc

--HG--
extra : rebase_source : 617c17b1162265e44810597fa69d533316da1a6b
2017-08-16 16:10:56 -05:00
Valentin Gosu 97a44a506c Bug 1369317 - Filter and escape URI string in only one pass r=mcmanus
MozReview-Commit-ID: KU4C4cS3jZC

--HG--
extra : rebase_source : 4995b4d8a133b8568af5b130be2077ee90f8b4e4
2017-08-13 10:03:34 +02:00
Valentin Gosu b3e75dbf06 Bug 1386683 - Do not escape the `'` character in the URL hash r=junior
MozReview-Commit-ID: DkoDvWGbWfu

--HG--
extra : rebase_source : 22de804e82136114a0688ce271cac8c49f8c4f23
2017-08-06 11:13:04 +02:00
Masatoshi Kimura 06311d2e3a Bug 1375125 - Remove nsILocalFile. r=froydnj
MozReview-Commit-ID: 6oU6Ya5UXtC

--HG--
extra : rebase_source : 55b6e30aa348c1b939326698b0da7d72c26b479c
2017-08-05 09:43:49 +09:00
Haik Aftandilian 546c76f86e Bug 1376496 - Part 4 - FileDescriptorFile.cpp coding style fixes. r=jimm
MozReview-Commit-ID: LN5o3WIW8ug

--HG--
extra : rebase_source : 225bfafa51c2626b98bc540cd907f7ce408f78bd
2017-07-17 23:48:42 -07:00
Brad Werth 291faedb49 Bug 1380165 Part 1: Remove no-longer-used NS_MACOSX_JAVA2_PLUGIN_DIR variable and a comment that referenced a closed bug that conditionally used it. r=mstange
MozReview-Commit-ID: 7Qbel0gmEAI

--HG--
extra : rebase_source : 68801d890663572d0232b99082b49241cb3f8a02
2017-07-12 14:01:12 -07:00
Brad Werth 8e8714cad4 Bug 1059424 Part 2: Simplify nsAppFileLocationProvider Java plugin detection now that we are minimum macOS 10.9. r=mstange
MozReview-Commit-ID: CkmH2ngEDKT

--HG--
extra : rebase_source : 8a24d9b9f012a28c171cb6d2024e9f5a83ba9080
2017-07-10 15:37:46 -07:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Mats Palmgren 9542d00e58 Bug 1376498 part 2 - Use plain Remove(key) in some places instead of Lookup(key).Remove() for simplicity. r=froydnj
MozReview-Commit-ID: 7GlCL1jyGAz
2017-07-05 02:01:44 +02:00
Nicholas Nethercote 3e439bb4f8 Bug 1376638 - Minimize uses of prmem.h. r=glandium.
It's silly to use prmem.h within Firefox code given that in our configuration
its functions are just wrappers for malloc() et al. (Indeed, in some places we
mix PR_Malloc() with free(), or malloc() with PR_Free().)

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

--HG--
extra : rebase_source : 0f781bca68b5bf3c4c191e09e277dfc8becffa09
2017-06-30 19:05:41 -07:00
Carsten "Tomcat" Book 7918eeee02 merge mozilla-inbound to mozilla-central a=merge 2017-06-28 13:23:29 +02:00
Mats Palmgren e0fc464fa9 Bug 1376476 - Use Lookup instead of Get+Remove, and LookupForAdd instead of Get+Put, to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: FpFNg0vJXc5
2017-06-28 01:03:17 +02:00
Carsten "Tomcat" Book 9c5ccdbab2 Merge mozilla-central to autoland 2017-06-27 15:15:58 +02:00
Haik Aftandilian c3cf53a7ef Bug 1334550 - Part 1 - Proxy moz-extension protocol requests to the parent process; r=jimm,mayhemer
Changes ExtensionProtocolHandler to use remote streams for
moz-extension loads of file and JAR URI's to allow for
filesystem read-access sandboxing.

Adds messaging to PNecko to allow child processes to
request an input stream or file descriptor for moz-extension
URI's.

Add ExtensionProtocolHandler singleton so that NeckoParent can
call methods directly and ExtensionProtocolHandler::NewFD
can use a new member variable |mFileOpenerThread| to open files.

Adds FileDescriptorFile, a limited implementation of nsIFile
that wraps a file descriptor, to be sideloaded into
nsJARChannels so that extension JAR files can be read
using a file descriptor without accessing the filesystem
directly.

MozReview-Commit-ID: 1pcnIpjz2yR

--HG--
extra : rebase_source : 9d7334778fc81837b11b98d4e32603f7e5eb3a27
2017-06-23 17:10:54 -07:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Nicholas Nethercote 58786e1ea7 Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +10:00
Nicholas Nethercote f1364a75ea Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
All the instances are converted as follows.

- nsSubstring  --> nsAString
- nsCSubstring --> nsACString

--HG--
extra : rebase_source : cfd2238c52e3cb4d13e3bd5ddb80ba6584ab6d91
2017-06-20 19:19:52 +10:00
Nicholas Nethercote fe9268c4cd Bug 1374580 (part 2) - Remove nsAFlat{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsAFlatString  --> nsString
- nsAFlatCString --> nsCString

--HG--
extra : rebase_source : b37350642c58a85a08363df2e7c610873faa6e41
2017-06-20 19:19:05 +10:00
Nicholas Nethercote 1572f96f5d Bug 1374580 (part 1) - Remove nsASingleFragment{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsASingleFragmentString  --> nsAString
- nsASingleFragmentCString --> nsACString

--HG--
extra : rebase_source : e6a1ddc8938fecd9a735b15e872c054edf4c7910
2017-06-20 19:18:17 +10:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Masatoshi Kimura 3231cb3535 Bug 1372886 - Remove dead parameters from nsIConverterInputStream.init(). r=hsivonen
MozReview-Commit-ID: GliLHLsUWjt

--HG--
extra : rebase_source : 50d3f4680a498125ddf600b0d64f6740b0229f80
2017-06-17 19:30:09 +09:00
Bill McCloskey d7df561295 Bug 1372426 - More detailed names for nsInputStreamReadyEvent (r=erahm)
MozReview-Commit-ID: 6beE0eMCxg7
2017-06-14 14:44:04 -07:00
Wes Kocher 6c1a0ae549 Backed out 6 changesets (bug 1371699) for various failures including frequent img-blobURI-2.html failures and leaks a=backout
Backed out changeset 67a27cf0ab80 (bug 1371699)
Backed out changeset 7e494fa90087 (bug 1371699)
Backed out changeset 30405ec37e1e (bug 1371699)
Backed out changeset 2d67624a01dc (bug 1371699)
Backed out changeset 503c9d22e6bb (bug 1371699)
Backed out changeset eedcb67a9fb6 (bug 1371699)

MozReview-Commit-ID: 4HydLjK7Ond
2017-06-13 17:50:11 -07:00
Wes Kocher e883883e7c Backed out changeset 45b5cadadc22 (bug 1372426) because it's blocking a backout a=backout
MozReview-Commit-ID: Jl0zxef8R9k
2017-06-13 17:48:38 -07:00
Bill McCloskey 1b366c9ec9 Bug 1372426 - More detailed names for nsInputStreamReadyEvent (r=erahm)
MozReview-Commit-ID: 6beE0eMCxg7
2017-06-13 15:24:08 -07:00
Wes Kocher fdca69feeb Backed out changeset e8a63038d787 (bug 1372426) for build failures in nsStringStream.cpp a=backout
MozReview-Commit-ID: 8ci8nKoiLhz
2017-06-13 15:20:12 -07:00
Bill McCloskey 7efe80ba16 Bug 1372426 - More detailed names for nsInputStreamReadyEvent (r=erahm)
MozReview-Commit-ID: 6beE0eMCxg7
2017-06-13 14:53:26 -07:00
Eric Rahm ab9516d40d Bug 1353593 - Part 2: Remove wwc functions. r=froydnj
This removes the use of |wwc| functions in favor of char16ptr_t's implicit
conversion operators.

MozReview-Commit-ID: GHONYieMPla
2017-06-12 16:20:49 -07:00
Boris Zbarsky 319fd7b3aa Bug 1371699 part 6. Implement nsIAsyncInputStream for nsStringInputStream. r=bkelly 2017-06-13 16:16:58 -04:00
Boris Zbarsky 5193353a61 Bug 1371699 part 4. Make nsIMultiplexInputStream not inherit from nsIInputStream. r=bkelly
This is a preexisting issue that makes nsMultiplexInputStream multiple-inherit
from nsIInputStream: once via nsIMultipartInputStream and once via
nsIAsyncInputStream.  This causes problems once we end up with more multiplex
streams that are async streams, because then some assingments to
nsCOMPtr<nsIInputStream> start asserting.  This patch just removes the footgun
by getting rid of the multiple inheritance.
2017-06-13 16:16:39 -04:00
Boris Zbarsky 3d884086c3 Bug 1371699 part 3. Make nsIStringInputStream not inherit from nsIInputStream anymore. r=bkelly
This will prevent ambiguous nsIInputStream inheritance once we also inherit from nsIAsyncInputStream.
2017-06-13 16:16:23 -04:00
Boris Zbarsky 4c7424ec25 Bug 1371699 part 2. Implement nsICancelableRunnable on AsyncWaitRunnable. r=bkelly
It's just luck that we haven't ended up with a multiplex stream on workers that contains at least one async stream.
2017-06-13 16:16:07 -04:00
Boris Zbarsky d071e405b2 Bug 1371699 part 1. Give nsStringInputStream an mStatus variable. r=bkelly
This will make it simple to implement CloseWithStatus.
2017-06-13 16:16:04 -04:00
Henri Sivonen 432653453a Bug 1261841 part 2 - Use encoding_rs instead of uconv. r=emk,mystor.
MozReview-Commit-ID: 15Y5GTX98bv
2017-06-13 13:23:23 +03:00
Andrea Marchesini a698cd8d63 Bug 1372272 - AsyncStreamHelper::OnInputStreamReady() should be NOP if calling AsyncWait() in one of the substreams fails in ::Run(), r=bz 2017-06-12 19:45:05 +02:00
Ehsan Akhgari cb3e227493 Bug 1371279 - Try to use reserved stack space instead of heap allocation in nsLocalFile::GetNativeTarget(); r=froydnj 2017-06-09 01:14:16 -04:00
Colin Dean 0f028d9bc9 Bug 1364984 - use non-deprecated API for finding the temporary directory on OS X; r=mstange
FSFindFolder is deprecated as of 10.9 and apparently continues to
work...except for the case of finding the temporary directory when the
user's home directory lives on an NFS mount (!).  Using
NSTemporaryDirectory does The Right Thing here, so let's use that instead.
2017-06-07 20:40:50 -04:00
Bryce Van Dyk 99d1ede409 Bug 1272371 - Update multiplexed input stream seek behaviour. r=froydnj
This patch is originally from :baku and updates the seek behaviour of
nsMulitplexInputStream. This fixes an issue with absolute seeking where if a
seek is performed and the correct offset reached, the members of the multiplex
stream were not updated to reflect this.

MozReview-Commit-ID: 7lEvuXxzYkI

--HG--
extra : rebase_source : d86a7ce0fc26abd3c9a60810bd7f7f6346e7a5b0
2017-05-25 13:38:01 +12:00
Paolo Amadini f3d8ecd611 Bug 1364050 - Part 4 - Remove references to "downloads.rdf". r=mak
MozReview-Commit-ID: y3BfYQYkF2

--HG--
extra : rebase_source : 0f09e7961aa0f226ba4cc1616172ee4856a50ee8
2017-05-11 09:37:10 +01:00
Patrick McManus eab0a004e6 Bug 1362388 - dont let File backed http requests find size on main thread r=nwgh
MozReview-Commit-ID: AFM4R0M7dmj

--HG--
extra : rebase_source : 01d3020eb952ec286be30b937476161a403215ff
2017-05-05 17:51:13 -04:00
Wes Kocher 8eaf64f920 Backed out 2 changesets (bug 1362388) for android build bustage in nsHttpChannel.cpp a=backout
Backed out changeset f5b4fbe31c01 (bug 1362388)
Backed out changeset 446ecc3f5715 (bug 1362388)

MozReview-Commit-ID: DI01cDPrgM7
2017-05-12 13:58:28 -07:00
Patrick McManus 3db60df302 Bug 1362388 - dont let File backed http requests find size on main thread r=nwgh
MozReview-Commit-ID: AFM4R0M7dmj

--HG--
extra : rebase_source : ad15d3aad5d0d271acd5cd35dbfbf72e432bcdd7
2017-05-05 17:51:13 -04:00
Sebastian Hengst a477978a5d Backed out changeset a418e4a81c02 (bug 1362388) for build bustage from netwerk/protocol/http/nsHttpChannel.cpp:597 not being declared. r=backout 2017-05-11 18:01:01 +02:00
Patrick McManus 20a6e4849c Bug 1362388 - dont let File backed http requests find size on main thread r=nwgh
MozReview-Commit-ID: AFM4R0M7dmj

--HG--
extra : rebase_source : 3cd535eb604a78551f6a6043088701e1d1fc40ce
2017-05-05 17:51:13 -04:00
Andrea Marchesini c41696993b Bug 1361654 - Initializing all the member variables in SlicedInputStream, r=qdot 2017-05-04 08:36:35 +02:00
Phil Ringnalda e099f834fe Backed out 2 changesets (bug 1360992, bug 1361654) for a 70% failure rate in test_fileReader.html on ASan e10s
Backed out changeset ab9fdee3a6a4 (bug 1360992)
Backed out changeset 141c2dfd49ff (bug 1361654)

MozReview-Commit-ID: 3rSzvmc5FPx
2017-05-05 12:35:57 -07:00
Nathan Froyd 844bb853dd Bug 1362390 - make Base64Encode tolerant of allocation failures; r=mccr8 2017-05-05 11:33:36 -04:00
Nathan Froyd 880d162a51 Bug 1362194 - part 3 - make Base64Decode even more tolerant of allocation failures; r=mccr8
The lossy conversion to ASCII here can also fail; we should handle that
as well.  Rewriting the code to use MakeScopeExit also avoids tangled
logic and/or duplicating calls to ensure the destination string is
truncated on failure.
2017-05-05 11:33:36 -04:00
Nathan Froyd 8b000da91e Bug 1362194 - part 2 - make Base64Decode tolerant of allocation failures; r=mccr8
We need to use a fallible CopyASCIItoUTF16 function, since we might not
have enough memory to perform the copy.
2017-05-05 11:33:36 -04:00
Andrea Marchesini f62189c258 Bug 1361443 - nsMultiplexInputStream should implement nsIAsyncInputStream, r=smaug 2017-05-04 14:44:35 +02:00
Carsten "Tomcat" Book eb1fd0ed7f Backed out changeset c0e3f3edf36a (bug 1361443) for crashes in [@ mozilla::Base64EncodeInputStream] and test failures in test_fileReaderSync.xul 2017-05-04 16:40:14 +02:00
Andrea Marchesini a9df58d062 Bug 1361443 - nsMultiplexInputStream should implement nsIAsyncInputStream, r=smaug 2017-05-04 14:44:35 +02:00
Andrea Marchesini 4d39fea437 Bug 1361654 - Initializing all the member variables in SlicedInputStream, r=qdot 2017-05-04 08:36:35 +02:00
Chris Peterson 30c0c4add0 Bug 1356843 - Fix -Wcomma warnings in xpcom/io/nsLocalFileUnix.cpp. r=froydnj
clang's -Wcomma warning warns about suspicious use of the comma operator such as calling a function for side effects within an expression. Check NS_SUCCEEDED() to use HasMoreElement() in an expression and confirm that it actually returned a legitimate out parameter.

xpcom/io/nsLocalFileUnix.cpp:725:48 [-Wcomma] possible misuse of comma operator here
xpcom/io/nsLocalFileUnix.cpp:1053:39 [-Wcomma] possible misuse of comma operator here

MozReview-Commit-ID: aebrgc5Wqk

--HG--
extra : rebase_source : 18a2bbeb55ff106cdcb88e4889c7fd2745952a31
extra : source : e62ac5b8744d342948ab12f21f369d21f857a706
2017-04-03 11:05:57 -07:00
Andrea Marchesini 8b8935bd3b Bug 1355369 - SlicedInputStream must implement AsyncWait correctly, r=smaug 2017-04-12 13:49:08 +02:00
Andrea Marchesini 0cd2885406 Bug 1355369 - SlicedInputStream should expose nsIAsyncInputStream interface only when needed, r=smaug 2017-04-12 13:49:08 +02:00
Eric Rahm 807d2c062b Bug 1353544 - Replace usage of PR_BEGIN_MACRO in xpcom. r=froydnj 2017-04-05 18:06:44 -07:00
Paolo Amadini bc9668cdff Bug 1346716 - Remove the entry for "mimeTypes.rdf" in the directory service. r=mak
This improves performance because we won't try to fix the permissions of the file every time the nsIHandlerService implementation wants to open it, and makes it easier to access the file path from xpcshell tests.

MozReview-Commit-ID: DZmLa92qUnZ

--HG--
extra : source : bd0fdce03cc7442079e96318d3a9b519a4d403a9
2017-03-30 15:51:18 +01:00
Andrea Marchesini 5b7d646332 Bug 1350239 - SlicedInputStream::Seek must set correct position in the source stream, r=smaug 2017-03-27 11:48:06 +02:00
Ehsan Akhgari 566751834a Bug 1346583 - Remove the PContent::Msg_OpenAnonymousTemporaryFile sync IPC; r=billm 2017-03-21 09:27:48 -04:00
Andrea Marchesini 2e9d67bae0 Bug 1347557 - Move 2 static methods about the IPC serialization of streams into an helper class, r=qdot 2017-03-21 07:47:25 +01:00
David Major dc67bfc9a3 Bug 1344629 - Part 6: Rewrite unnecessary uses of nsLiteralString. r=dbaron
There's an antipattern where nsLiteralString is used as an unnecessary intermediary in converting from CharT* to CharT*,
e.g. CallAFunctionThatTakesACharPointer(NS_LITERAL_CSTRING("foo").get());
or
NS_NAMED_LITERAL_STRING(foo, "abc");
CallAFunctionThatTakesACharPointer(foo.get());

This patch rewrites the callsites that can be trivially changed to use char*/char16_t*.

I'd somewhat like to remove nsTLiteralString::get() altogether, but in code that's less straightforward than these examples, get() is useful enough to keep.

MozReview-Commit-ID: Kh1rUziVllo

--HG--
extra : rebase_source : c21a65694d6e1c42fd88f73632f7ac8f38d005ae
2017-03-14 15:26:27 +13:00
Iris Hsiao 5cece96e1c Backed out 12 changesets (bug 1344629) for stylo build bustage
Backed out changeset cf4273d3ac30 (bug 1344629)
Backed out changeset a96390e044e0 (bug 1344629)
Backed out changeset d9b330f9bc24 (bug 1344629)
Backed out changeset 2b460fe020af (bug 1344629)
Backed out changeset 0ada91b0452e (bug 1344629)
Backed out changeset 083304fcd6bd (bug 1344629)
Backed out changeset 53d7d1ce2c97 (bug 1344629)
Backed out changeset 55eee7078ae4 (bug 1344629)
Backed out changeset 7d3c06b3eca9 (bug 1344629)
Backed out changeset e5df14c3db61 (bug 1344629)
Backed out changeset 636095ff2815 (bug 1344629)
Backed out changeset 0be052ad24c1 (bug 1344629)
2017-03-14 11:52:24 +08:00
David Major 40f4821701 Bug 1344629 - Part 6: Rewrite unnecessary uses of nsLiteralString. r=dbaron
There's an antipattern where nsLiteralString is used as an unnecessary intermediary in converting from CharT* to CharT*,
e.g. CallAFunctionThatTakesACharPointer(NS_LITERAL_CSTRING("foo").get());
or
NS_NAMED_LITERAL_STRING(foo, "abc");
CallAFunctionThatTakesACharPointer(foo.get());

This patch rewrites the callsites that can be trivially changed to use char*/char16_t*.

I'd somewhat like to remove nsTLiteralString::get() altogether, but in code that's less straightforward than these examples, get() is useful enough to keep.

MozReview-Commit-ID: Kh1rUziVllo

--HG--
extra : rebase_source : c21a65694d6e1c42fd88f73632f7ac8f38d005ae
2017-03-14 15:26:27 +13:00
Andrea Marchesini 2d8722e0b8 Bug 1344204 - nsMultiplexInputStream should be serializable/cloneable following the internal sub streams, r=smaug 2017-03-08 07:48:16 +01:00
Sebastian Hengst 4ad1529674 Backed out changeset 5739a7f790f2 (bug 1333899) for failing reftest svg-image-datauri-1.html on Linux opt and pgo. r=backout 2017-02-22 10:00:50 +01:00
Andrea Marchesini 9f369c0e29 Bug 1339710 - Remove the implementation of SlicedInputStream::ReadSegments, r=smaug 2017-02-22 09:42:27 +01:00
Andrea Marchesini 930614ab07 Bug 1339710 - SlicedInputStream should be nsISeekableStream, r=smaug 2017-02-22 09:41:59 +01:00
Andrea Marchesini 0500e8f2e7 Bug 1339710 - SlicedInputStream should be an nsIIPCSerializableInputStream, r=smaug 2017-02-22 09:41:05 +01:00
Andrea Marchesini 5dfc951f15 Bug 1339710 - SlicedInputStream should not be nsICloneableInputStream if the source stream is not, r=smaug 2017-02-22 09:40:46 +01:00
Iris Hsiao f9bdfe10bb Backed out 5 changesets (bug 1339710) for GTest failures in TestSlicedInputStream.StartBiggerThan
Backed out changeset 7c0ec55b44dc (bug 1339710)
Backed out changeset cbb4e1c2aada (bug 1339710)
Backed out changeset c685dca493f5 (bug 1339710)
Backed out changeset 4761a15d45fd (bug 1339710)
Backed out changeset 7561692c1bc7 (bug 1339710)
2017-02-22 16:19:50 +08:00
Andrea Marchesini 2431d460d2 Bug 1339710 - Remove the implementation of SlicedInputStream::ReadSegmenets, r=smaug 2017-02-22 07:57:54 +01:00
Andrea Marchesini 76b13c0185 Bug 1339710 - SlicedInputStream should be nsISeekableStream, r=smaug 2017-02-22 07:57:14 +01:00
Andrea Marchesini a75afeb38f Bug 1339710 - SlicedInputStream should be an nsIIPCSerializableInputStream, r=smaug 2017-02-22 07:55:50 +01:00
Andrea Marchesini f981e3155b Bug 1339710 - SlicedInputStream should not be nsICloneableInputStream if the source stream is not, r=smaug 2017-02-22 07:54:46 +01:00
Eric Rahm 9279ddcaa9 Bug 1333899 - Part 1: Add a fallible NS_UnescapeURL. r=froydnj
This adds a fallible version of |NS_UnescapeURL| that can be used to
gracefully handle allocation failures when the string needs to be unescaped.

MozReview-Commit-ID: 1eXPzeB2yrI
2017-02-21 17:56:34 -08:00
Tom Tromey 5f8f360823 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs

--HG--
extra : rebase_source : 2f1f0aa12493c44f352d9a7e8683e7bb72d2d75b
2016-12-15 20:16:31 -07:00
Tom Tromey f8ab4ddf02 Bug 1060419 - remove unneeded includes of prprf.h, r=froydnj
MozReview-Commit-ID: JifhpA3oOeH

--HG--
extra : rebase_source : 08460997dc3fd91f3065c718e17b41bb4acf8bae
2016-12-09 10:00:01 -10:00
Michał Górny f9a50474a4 Bug 1329798 - Include sys/sysmacros.h for major(), minor() on Linux. r=glandium
Include sys/sysmacros.h explicitly as that will be required by future
glibc versions to expose major() and minor() macros.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1329798
2017-02-15 00:49:00 +01:00
Sylvestre Ledru 5bedb078f1 Bug 1338086 - Remove useless else blocks in order to reduce complexity in xpcom/ r=froydnj
MozReview-Commit-ID: JUJARn5Nspp

--HG--
extra : rebase_source : c719d19215fb26ace822269c2a28faf5cf35ffbb
2017-02-09 15:31:35 +01:00
Sebastian Hengst dcd9914458 Backed out changeset c8fe57b085bd (bug 1333631) 2017-01-30 23:17:34 +01:00
Masatoshi Kimura 835c70f82e Bug 1333631 - Disallow nsIFile::GetNativeTarget on Windows. r=froydnj
MozReview-Commit-ID: 4igXHPtQu4x

--HG--
extra : rebase_source : b65e458521270500a7f9054d63ee17d162918402
2017-01-25 23:36:50 +09:00
Chris Peterson 29bbf6d6b2 Bug 1331171 - Part 2: Remove Windows shell integration checks for Windows Vista. r=jimm
MozReview-Commit-ID: 8B6HnnpVP4L

--HG--
extra : rebase_source : 501ebb81dac3a56be9c64bf09d3261e570476a8d
2017-01-14 01:19:22 -08:00
Chris Peterson 2ffa3b99a7 Bug 1331171 - Part 1: Remove StartupSpecialSystemDirectory() workaround for Windows XP. r=jimm
SHGetKnownFolderPath() is available on Windows Vista+ so we no longer need to GetProcAddress("SHGetKnownFolderPath"). We can set _WIN32_WINNT 0x0600 to expose the SHGetKnownFolderPath function declaration in shlobj.h and call it directly.

Also remove a redundant #include <shlobj.h>.

MozReview-Commit-ID: AoAlrfvQ5AB

--HG--
extra : rebase_source : 2fa3a0d3d122ca31fb3369a43a03b6e2c5d5dec2
2017-01-14 01:12:02 -08:00
Bill McCloskey ef3d0f1c2e Bug 1331804 - Add more runnable names (r=ehsan)
MozReview-Commit-ID: 1QBmqfgY6WI
2017-01-24 16:34:37 -08:00
Wes Kocher f7ccafcb58 Backed out 8 changesets (bug 1331804, bug 1332100) for windows vm debug dt5 failures a=backout
Backed out changeset 8bf7f0e27c6c (bug 1331804)
Backed out changeset 600c0b9026c2 (bug 1331804)
Backed out changeset 3a5b5b9ecace (bug 1331804)
Backed out changeset c76432c9954e (bug 1331804)
Backed out changeset 46a9096745e7 (bug 1332100)
Backed out changeset 8b751230fa23 (bug 1331804)
Backed out changeset 2810212347fd (bug 1331804)
Backed out changeset be72b7763910 (bug 1331804)

MozReview-Commit-ID: Ywdsr4GZ4a
2017-01-24 15:12:21 -08:00
Bill McCloskey 80aaeed2fc Bug 1331804 - Add more runnable names (r=ehsan)
MozReview-Commit-ID: 1QBmqfgY6WI
2017-01-24 10:04:55 -08:00
Randell Jesup 422acb55ec Bug 1332167: Unix major() and minor() return unsigned r=froydnj 2017-01-20 10:38:43 -05:00
Ben Kelly 10f39e4fd9 Bug 1331038 Make nsPipe handle OOM conditions gracefully. r=froydnj 2017-01-13 17:11:01 -08:00
Cervantes Yu c764d2cafa Bug 1328569 - Don't call UnmapViewOfFile() with a null address. r=froydnj
MozReview-Commit-ID: Ca5n8rSXQ4x

--HG--
extra : rebase_source : 511a8e7171c82dd2fb91357ee2da8feae6049800
2017-01-04 18:42:51 +08:00
Makoto Kato eaee45d547 Bug 1323695 - Conflict SHLoadLibraryFromKnownFolder when bumping up to WINVER=0x0601. r=froydnj
When setting WINVER=0x601, we cannot compile SpecialSystemDirectory.cpp due to the following.

 0:13.17 c:/Development/hg.mozilla.org/mozilla-inbound/xpcom/io/SpecialSystemDirectory.cpp(123): error C2084: function 'HRESULT SHLoadLibraryFromKnownFolder(const KNOWNFOLDERID &,DWORD,const IID &,void **)' already has a body
 0:13.17 C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\um\shobjidl.h(32834): note: see previous definition of 'SHLoadLibraryFromKnownFolder'
 0:13.17 c:/Development/hg.mozilla.org/mozilla-inbound/xpcom/io/SpecialSystemDirectory.cpp(158): error C2440: 'initializing': cannot convert from 'HRESULT (__cdecl *)(const KNOWNFOLDERID &,DWORD,const IID &,void **)' to 'HRESULT'
 0:13.17 c:/Development/hg.mozilla.org/mozilla-inbound/xpcom/io/SpecialSystemDirectory.cpp(158): note: There is no context in which this conversion is possible

MozReview-Commit-ID: 2KZEzcn21S7

--HG--
extra : rebase_source : b13f2fb11c9e006a83c7d5c3175af001e384b55e
2016-12-16 10:52:23 +09:00
Tomislav Jurin 348bfffc19 Bug 1296189 - Replace NS_RUNTIMEABORT("some string literal message") with MOZ_CRASH(). r=froydnj 2016-12-02 13:46:53 -08:00
Ben Kelly 8ea15a056a Bug 1134372 P1 Allow pipe cloned streams to be read at different rates. r=froydnj 2016-12-02 10:41:33 -08:00
Bob Owen 8565d5695d Bug 1279699: Use temporary files instead of shared memory to store the page recordings when printing via parent. r=bas, r=froydnj, r=jimm 2016-11-22 14:06:46 +00:00
Ryan VanderMeulen 21ece8d83a Backed out changeset a4b0052954d2 (bug 1279699) for causing various crash regressions.
--HG--
extra : rebase_source : bf9223381149f34a7b3513eda05fe197ae2db876
2016-12-01 15:25:25 -05:00
Andrea Marchesini 345cea7ffb Bug 1318165 - nsStringStream should report correctly the size of the internal buffer, r=njn 2016-11-25 08:24:51 +01:00
Bob Owen 58e9c2a82f Bug 1279699: Use temporary files instead of shared memory to store the page recordings when printing via parent. r=bas, r=froydnj 2016-11-22 14:06:46 +00:00
Andi-Bogdan Postelnicu 42effb5bbf Bug 1317954 - Use auto type specifier where aplicable for variable declarations to improve code readability and maintainability in xpcom/. r=froydnj
MozReview-Commit-ID: EZZrYF1W81B

--HG--
extra : rebase_source : 30eea607d07ac819a0e55a2c4b0f8c359c156705
2016-11-16 14:24:59 +02:00
Andi-Bogdan Postelnicu d7f83a7ea6 Bug 1317954 - Converts for(...; ...; ...) loops to use the new range-based loops in C++11 in xpcom/. r=froydnj
MozReview-Commit-ID: 9mKXvXyYa6U

--HG--
extra : rebase_source : 55f74f93829b52b2c347a62520a79ab867adca35
2016-11-16 14:24:21 +02:00
Carsten "Tomcat" Book cc5d30c616 Merge mozilla-central to mozilla-inbound
--HG--
extra : rebase_source : 658b3ffdfa71afff2d44129f50e50e2fbecbd06e
2016-11-11 16:43:07 +01:00
Gerald Squelart 0affeb4ab0 Bug 1316432 - Fix nsCOMPtr constructions&assignments from 0 - r=froydnj
Giving '0' (literal zero) to nsCOMPtr is now ambiguous, as both
nsCOMPtr(decltype(nullptr)) and nsCOMPtr(T*) could be used.
In any case, our coding standards mandate the use of 'nullptr' for pointers.
So I'm changing all zeroes into nullptr's where necessary.

MozReview-Commit-ID: LXiZTu87Ck6

--HG--
extra : rebase_source : f9dcc6b06e9ebf9c30a576f9319f76a51b6dc26f
2016-11-10 14:11:27 +11:00
David Major 4f4e6ccff1 Bug 1316120: Fix nsLocalFileWin.cpp build on clang-cl. r=froydnj
This keeps the ITEMIDLIST pointers in the "LP" flavour to avoid casting away __unaligned qualifiers. __unaligned is meaningless on non-Itanium platforms but clang-cl nonetheless has trouble with it. (https://llvm.org/bugs/show_bug.cgi?id=30578)
2016-11-10 11:48:59 -06:00
Andrea Marchesini a467e08b38 Bug 1315173 - Make nsIStringInputStream a builtinclass, r=valentin, r=njn 2016-11-07 08:45:42 +01:00
Gijs Kruitbosch 8d36987e6f Bug 1310518 - fix crashes when downloading files without referrer/source URL, r=mstange
MozReview-Commit-ID: HnSb0yxlAfs

--HG--
extra : rebase_source : 56548450c404702c66e213e327e2083495577382
2016-10-28 17:38:29 +01:00
Gijs Kruitbosch a6e0fa62ec Bug 1305339 - part 2: use URI flags to determine if data is from the web, r=mstange,bz
This actually accomplishes what was discussed in the bug and marks any file with the
relevant URI flags as WebDownload, and everything else as OtherDownload.

Note that I'm using DoGetProtocolFlags in order to deal with
nsIProtocolHandlerWithDynamicFlags correctly; while just getting protocol flags
from the IO service directly would be less work, it's technically less correct.

MozReview-Commit-ID: HgD1fV98IEc

--HG--
extra : rebase_source : f114532b48dbca5c83871e61c8d04c719e3b38d1
2016-10-03 13:52:19 +01:00
Gijs Kruitbosch 5fae01fcd2 Bug 1305339 - part 1: use correct key to get and set quarantine information on 10.10+, r=mstange
kLSItemQuarantineProperties was deprecated in 10.10. AFAICT it was replaced by
kCFURLQuarantinePropertiesKey, which was inconveniently new in 10.10.
On my 10.11 machine, the Info.plist fix from the previous patch was not
sufficient to get the data to actually show up when using the old (deprecated)
key. I suspect the setter is a no-op with the old key. So here's code that
uses the new key ("documented" in LSQuarantine.h, where conveniently
the actual properties in the dictionary have kept their keys, but the
dictionary key is now referenced as the CF one).

MozReview-Commit-ID: IMsV6TLrYTP

--HG--
extra : rebase_source : 400db5d7dcbc8fbf165c9e8049376d50001e8f1c
2016-10-03 13:52:41 +01:00
Tom Schuster 774a8bf34d Bug 1302163 - Change code to use SprintfLiteral instead of snprintf. r=ehsan 2016-10-04 17:57:51 +02:00
Gijs Kruitbosch 926b56b96c Bug 1279240 - move path parsing of commandline handlers for mimetypes/protocols to nsILocalFileWin, r=froydnj
MozReview-Commit-ID: 4CENm3iqGUH

--HG--
extra : rebase_source : 2e208aa73d4c9d6827a11e3ef73fdeca6ed4a348
2016-09-30 17:18:41 +01:00
Josh Matthews ee8da66177 Bug 1294450 - Make AutoIPCStream favour PSendStream for large input streams. r=nfroydj 2016-09-29 06:20:00 +02:00
Wes Kocher 673a0db365 Backed out changeset 57e78c503c4e (bug 1294450) for build bustage a=backout 2016-09-28 17:38:00 -07:00
Josh Matthews facc06fda2 Bug 1294450 - Make AutoIPCStream favour PSendStream for large input streams. r=froydnj
--HG--
extra : rebase_source : 764aa593bd2734ca15d556a0b5ca55e3f69d25bb
2016-09-28 18:38:51 -04:00
Honza Bambas eeb66ca287 Bug 1305025 - Don't return error from nsPipe::Status when there are data to read to prevent potentiall loop. r=jduell
--HG--
extra : rebase_source : 8362d5f7e6a459d507ba8b7ac8a74afed9242982
2016-09-28 03:32:00 -04:00
Sylvestre Ledru c0a2402556 Bug 1305037 - Simplify the declaration of slashp r=froydnj
MozReview-Commit-ID: BBax5TZdSDt

--HG--
extra : rebase_source : e97cf58802fbd542aa88772f7ced585d59c1a001
2016-09-23 15:00:21 +02:00
Andrea Marchesini d62e084ce0 Bug 1288997 - memory blob should not be shared across processes - part 2 - SlicedInputStream, r=froydnj 2016-07-25 22:41:02 +02:00
Josh Aas 0a5546331b Bug 337051: Add origin and referrer URL metadata to downloaded files on OS X. r=mstange,pamadini 2016-09-13 02:25:36 -05:00
Nicholas Nethercote 880da46719 Bug 1296164 (part 3) - Use [must_use] on more nsIFile things. r=froydnj.
These ones don't require any extra checks to be added.

--HG--
extra : rebase_source : d13aa304f930d5250462813d32c67747f4ce4b30
2016-08-18 16:43:28 +10:00
Nicholas Nethercote 8f84642d03 Bug 1296164 (part 2) - Use [must_use] on nsIFile.open{NSPR,ANSI}FileDesc(). r=froydnj.
The patch also changes RemoteOpenFileChild::OpenNSPRFileDesc() so that it
cannot succeed with a null fd, so that checking just the return value is
sufficient.

--HG--
extra : rebase_source : cc40bbcf2a9991edc9d3da3fb624d27db50b4996
2016-08-18 15:27:16 +10:00
Nicholas Nethercote 04be8d005a Bug 1296164 (part 1) - Use [must_use] on nsIFile.{create,createUnique}. r=froydnj.
And fix numerous missing checks that this change identifies.

--HG--
extra : rebase_source : 97b0a6e8f9375c937dadb59c1110bb54b7633134
2016-08-18 13:30:12 +10:00
Nicholas Nethercote f68e1caceb Bug 1295825 (part 2) - Use [must_use] and MOZ_MUST_USE in nsIPipe.idl. r=froydnj.
The patch also makes GetInputStream() fail if the pipe isn't initialized, just
like GetOutputStream().

--HG--
extra : rebase_source : 7391b331ffe25e0ac7ebc755f7da313dc7b5517d
2016-08-17 16:52:48 +10:00
Andi-Bogdan Postelnicu f2739cfe8d Bug 1296286 - preventfalse positive resource leak trigger in Base64DecodeHelper. r=froydnj
MozReview-Commit-ID: 6E8ftV093ep

--HG--
extra : rebase_source : 10e39c2be69471c2e4c9df14cfc067c8e78c227f
2016-08-18 16:40:04 +03:00
Nicholas Nethercote 44523bfcdc Bug 1295053 (part 3) - Don't use NS_METHOD for xpcom IO functions. r=froydnj.
These don't need __stdcall on Win32.

--HG--
extra : rebase_source : 19959269036f9f0e8f1ca4ee6b82f0d5e2a93a64
2016-08-15 14:30:32 +10:00
Nicholas Nethercote 3b0485fcdb Bug 1294645 - Don't use NS_CALLBACK for callbacks in nsI{Input,Output,UnicharInput},Stream.idl. r=froydnj.
Slightly less than half (93 / 210) of the NS_METHOD instances in the codebase
are because of the use of NS_CALLBACK in
nsI{Input,Output,UnicharInput},Stream.idl. The use of __stdcall on Win32 isn't
important for these callbacks because they are only used as arguments to
[noscript] methods.

This patch converts them to vanilla |nsresult| functions. It increases the size
of xul.dll by about ~600 bytes, which is about 0.001%.

--HG--
extra : rebase_source : c15d85298e0975fd030cd8f8f8e54501f453959b
2016-08-12 17:36:22 +10:00
Nicholas Nethercote e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00
Nicholas Nethercote c10a40d45c Bug 1275309 (part 1) - Add a variant of Base64Decode(). r=erahm.
This mirrors the changes made to encoding in bug 1273712.

--HG--
extra : rebase_source : 9902fa6aa7460ad04969b69f679e438e4850944d
2016-08-04 11:49:46 +10:00
Jarda Snajdr b75d78272f Bug 1289811 - Give nsIOutputStreamCallback a [function] attribute. r=nfroyd 2016-07-28 14:18:00 -04:00
Simon Lindholm 620a47f1e2 Bug 1287277 - Avoid repeated string reallocations in NS_UnescapeURL. r=nfroyd
--HG--
extra : rebase_source : 67490a033fd6ef52d3047c6e194322b223d85b0f
2016-07-14 01:27:23 +02:00
Wei-Cheng Pan fd87664d8e Bug 1264566 - Part 2: Refactor all usage of FileDescriptor. r=valentin
Callers should use a UniquePtr to hold the platform handle.

MozReview-Commit-ID: 6BWnyAf4b3a

--HG--
extra : transplant_source : %26%CA%0D%28%08%9BT%97Z%A1%3Dq%CD%21%A1_%EFE%83%0E
extra : histedit_source : 77f8ed3d0fdec6cce0c95469130ade0fb547bb91
2016-05-27 16:12:51 +08:00
Carsten "Tomcat" Book 336105a0de merge mozilla-inbound to mozilla-central a=merge 2016-07-22 11:58:02 +02:00
Jim Chen ce45a595ab Bug 1287946 - Update existing code to use mozilla::java; r=me 2016-07-21 13:49:04 -04:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Chris Peterson b175c9fdd5 Bug 1277106 - Part 2: Expand MOZ_UTF16() strings to u"" string literals. r=Waldo 2016-07-20 22:03:25 -07:00
Carsten "Tomcat" Book e8bc59a87a Backed out changeset 684888aeee81 (bug 1287946) 2016-07-21 08:07:12 +02:00
Jim Chen 78f67d1f6f Bug 1287946 - Update existing code to use mozilla::java; r=me 2016-07-21 00:42:26 -04:00
Wes Kocher 3bba9b339e Backed out 5 changesets (bug 1287623) for static build bustage CLOSED TREE
Backed out changeset a48daec87ec9 (bug 1287623)
Backed out changeset 248153344e15 (bug 1287623)
Backed out changeset 8aa409c9b1ce (bug 1287623)
Backed out changeset 602d4d88e806 (bug 1287623)
Backed out changeset 114da8bdc0b0 (bug 1287623)
2016-07-20 15:40:33 -07:00
Andrew McCreight 07f2ce5ee2 Bug 1287623, part 2 - Use StaticRefPtr for nsDirectoryService::gService. r=froydnj 2016-07-20 15:19:00 -07:00
Andrew McCreight 4f63d0eaf2 Bug 1287623, part 2 - Use StaticRefPtr for nsDirectoryService::gService. r=froydnj 2016-07-21 09:54:16 -07:00
Haik Aftandilian 844a01c384 Bug 1270018 - NS_APP_CONTENT_PROCESS_TEMP_DIR should only return the sandbox writeable temp. r=bobowen, r=bsmedberg
MozReview-Commit-ID: 5L9zCR4ExWD

--HG--
extra : transplant_source : %B8%90%A3%1C%A4G%A5%95%0C%B7J%B6%A4%FAC%1A%9B%FA0%EE
2016-07-05 14:48:25 -07:00
Kyle Huey 6baa905da7 Bug 1282527: Remove remaining PR_ASSERTs outside of NSPR/NSS. r=dbaron
--HG--
extra : rebase_source : a9dd69c772ef2641ee300d57d2a4d4c83003726c
2016-06-28 10:47:22 -07:00
Eric Rahm 878eac623e Bug 1249352 - Part 4: Add a fallible NS_EscapeURL. r=froydnj 2016-06-27 11:10:46 -07:00
Ralph Giles 956493cd6e Bug 1275744 - Reference MOZ_LOG in xpcom comments. r=erahm
NSPR_LOG_MODULES is deprecated.

MozReview-Commit-ID: Cel3JCLXLmp

--HG--
extra : rebase_source : da100ece62fd571d19a07455f8c256f5cd39f62b
2016-05-25 15:26:10 -07:00
Eric Rahm 9f0aed4b73 Bug 1270310 - Part 2: Pass buffer length to Assign call in ConvertStringLineBreaks. r=froydnj
The length of the new buffer being assigned in ConvertStringLineBreaks has
already been calculated, so we can pass that in.
2016-05-05 15:52:16 -07:00
Eric Rahm f5b4b3b7b8 Bug 1270310 - Part 1: Make allocation in ConvertStringLineBreaks fallible. r=froydnj, r=smaug
ConvertStringLineBreaks calls ConvertUnicharLineBreaksInSitu which uses
fallible allocation. We should make the potential allocation in |BeginWriting|
fallible as well and handle the failure. This also updates the callers to
|ConvertStringLineBreaks| to handle the error properly in release builds.
2016-05-05 15:50:35 -07:00
Nicholas Nethercote f0f5072443 Bug 1278156 - Remove useless null check in xp_iconv(). r=froydnj.
aOutputLeft is null checked and then dereferenced twice more in this function,
and all callers pass a non-null pointer. So just remove the null check.

--HG--
extra : rebase_source : 8190a51fde8434ac346a4e23db5ed4703762778c
2016-06-03 14:59:16 +10:00
Nicholas Nethercote ec7a660ceb Bug 1274148 (part 1, attempt 2) - Use MOZ_MUST_USE more in xpcom/io/Base64.h. r=erahm,bagder,mattwoodrow.
--HG--
extra : rebase_source : 3e4a861f4f9c4151ffbad110159ad541119278fa
2016-06-06 12:22:14 +10:00
Nicholas Nethercote 4f1d56df39 Backout 0ed86240bc77 for bustage. 2016-06-06 11:51:44 +10:00
Nicholas Nethercote 8bc7cd881e Bug 1274148 (part 1) - Use MOZ_MUST_USE more in xpcom/io/Base64.h. r=erahm,bagder,mattwoodrow.
--HG--
extra : rebase_source : b468df852789a22e3d50a9580515bb6aa46784d5
2016-06-06 09:21:00 +10:00
Chris Peterson 11ef78ae89 Bug 1275016 - Rename Endian.h to EndianUtils.h to avoid #include confusion with Android's endian.h stdlib header. r=froydnj
--HG--
rename : mfbt/Endian.h => mfbt/EndianUtils.h
2016-05-22 13:31:11 -07:00
Wes Kocher 8249ffcbd2 Backed out 4 changesets (bug 1270310) for mass mochitest bustage CLOSED TREE
Backed out changeset ff9ace379d78 (bug 1270310)
Backed out changeset 605790e5e611 (bug 1270310)
Backed out changeset 4c302e1119e1 (bug 1270310)
Backed out changeset 3e2d76bd1f08 (bug 1270310)
2016-05-26 00:04:04 -07:00
Eric Rahm 99b5f4dce2 Bug 1270310 - Part 2: Pass buffer length to Assign call in ConvertStringLineBreaks. r=froydnj
The length of the new buffer being assigned in ConvertStringLineBreaks has
already been calculated, so we can pass that in.
2016-05-05 15:52:16 -07:00
Eric Rahm 288aaa8d36 Bug 1270310 - Part 1: Make allocation in ConvertStringLineBreaks fallible. r=froydnj, r=peterv
ConvertStringLineBreaks calls ConvertUnicharLineBreaksInSitu which uses
fallible allocation. We should make the potential allocation in |BeginWriting|
fallible as well and handle the failure. This also updates the callers to
|ConvertStringLineBreaks| to handle the error properly in release builds.
2016-05-05 15:50:35 -07:00
Nicholas Nethercote ebf2837e7e Bug 1273712 (part 2) - Add a new overloading of Base64Encode(). r=erahm.
This will be used in bug 1273711 to avoid an OOM.

This also tweaks one of the existing overloadings of Base64Encode to return
NS_ERROR_OUT_OF_MEMORY on OOM instead of NS_ERROR_INVALID_ARG.

--HG--
extra : rebase_source : a2ad472b11ac2c858487bf5fdae84d183084773b
2016-05-19 08:55:46 +10:00
Nicholas Nethercote 47eac9822f Bug 1273712 (part 1) - Rename arguments and variables in Base64.{h,cpp}. r=erahm.
The argument naming in Base64.{h,cpp} is horribly confused, with a lot of them
gotten backwards. This patch fixes that, and also introduces a more consistent
naming scheme for arguments and local variables: "binary" is used for binary
data, and "base64" is used for base64-encoded data.

This patch doesn't change any functionality.

--HG--
extra : rebase_source : 7d8a08762e291851bd117a0409fc8715b830fdbe
2016-05-19 08:53:50 +10:00
Andrea Marchesini 98894192c9 Bug 1272781 - nsEscape should work with ns(C)Strings and not with char pointers, r=smaug 2016-05-18 18:21:56 +02:00
Aaron Klotz 4d218d003f Bug 1258009: Move nsLocalFile::Launch back to the main thread on Win32, but pass SEE_MASK_ASYNCOK and a parent HWND; r=jimm
This is as much a perf issue as it is a UX issue. We should be passing a HWND to
ShellExecuteEx because it can show UI, and that UI should have a proper
parent-child relationship with the Mozilla window. We should do that on the
main thread because of the GUI stuff. OTOH, we want the ShellExecuteEx call to
be a lightweight as possible, hence the SEE_MASK_ASYNCOK flag.

MozReview-Commit-ID: 7VLkWTRWPoe

--HG--
extra : rebase_source : ce16bc0c926a299d9b9103ad0697e3cd07b9157d
2016-05-05 16:52:18 -06:00
Ben Kelly 77ab8893ab Bug 1093357 P4 Follow-on to nsPipe3.cpp to address review feedback missing in P0 patch. r=me 2016-05-16 03:31:48 -07:00
Ben Kelly 61c706ab56 Bug 1093357 P0 Explicitly advertise that nsPipeInputStream supports ReadSegments(). r=froydnj 2016-05-15 10:32:09 -07:00
Chris Peterson 8a9e2d2bd4 Bug 1272513 - Part 2: Remove redundant -Wshadow CXXFLAGS from moz.build files. r=glandium 2016-05-14 00:54:55 -07:00
Andrea Marchesini 6f820b5dd7 Bug 1272298 - nsFormSubmission should support "\0" input string, r=smaug 2016-05-13 22:48:03 +02:00
Kyle Huey c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Kit Cambridge b3e4980239 Bug 1266569 - Avoid including the `ChromeUtils` binding in `Base64.h`. r=froydnj
MozReview-Commit-ID: 8ZLdMhJMaUe

--HG--
extra : rebase_source : d5cb2b5bcc587bad95e6223d18ef38c6937f9270
extra : histedit_source : 208b28d87e223333c2995fd615e0602b11d5bb68
2016-04-22 07:41:58 -07:00
Kit Cambridge d21d6da5e8 Bug 1256488 - Add a Base64 URL-decoder for C++ and chrome JS callers. r=mt,baku
MozReview-Commit-ID: IrDwImYfHRu

--HG--
extra : rebase_source : ed7da7447e5d70c596234961625fcd4b8139814f
2016-03-22 12:09:04 -07:00
Stone Shih fa3b1e6240 Bug 1240436 - Part3: Remove NS_NewStringInputStream to prevent misuse. r=froydnj 2016-04-14 18:55:50 +08:00
Kyle Huey 2709afd167 Bug 1263311: Part 3 - s/nsCancelableRunnable/CancelableRunnable/g. r=froydnj 2016-04-11 11:40:06 -07:00
Kyle Huey 1cc02aa8c6 Bug 1263311: Part 1 - Change the nsICancelableRunnable interface. r=froydnj 2016-04-11 11:40:06 -07:00
Wes Kocher 7d2cebe912 Backed out 3 changesets (bug 1263311) for Windows build failures in ServiceWorkerPrivate.cpp CLOSED TREE
Backed out changeset 0434a548e1fe (bug 1263311)
Backed out changeset 60b1be29446c (bug 1263311)
Backed out changeset 18132498bc40 (bug 1263311)

MozReview-Commit-ID: LPEa05QobdQ
2016-04-11 12:50:56 -07:00
Kyle Huey d200ed89d0 Bug 1263311: Part 3 - s/nsCancelableRunnable/CancelableRunnable/g. r=froydnj 2016-04-11 11:40:06 -07:00
Kyle Huey f13a6fc866 Bug 1263311: Part 1 - Change the nsICancelableRunnable interface. r=froydnj 2016-04-11 11:40:06 -07:00
Nicholas Nethercote d376f9f82e Bug 1260871 - Remove do_GetAtom() and rename NS_NewAtom() as NS_Atomize(). r=erahm.
do_GetAtom() is currently just a synonym for NS_NewAtom().

--HG--
extra : rebase_source : f4409784f931616cbc300591e6b843d30805c273
2016-03-29 10:09:43 +11:00
Kyle Huey 850c2af206 Bug 1258498: Use fallible allocation in nsScriptableInputStream::ReadBytes. r= froydnj 2016-03-21 13:49:18 -07:00
Gregory Szorc 2923feff68 Bug 1256028 - Disable C4477 to unblock compilation on VS2015; r=mcmanus
As part of unblocking building with VS2015u1 in automation, I'm mass
disabling compiler warnings that are turned into errors. This is not
the preferred mechanism to fix compilation warnings. So hopefully
this patch never lands because someone insists of fixing the underlying
problem instead. But if it does land, hopefully the workaround is
only temporary.

MozReview-Commit-ID: 9AkkAUDMln6

--HG--
extra : rebase_source : 76126361de678729344b0e9eaeac1d523f88ebb4
2016-03-14 18:44:26 -07:00
Wilmer Paulino 37e46b9248 Bug 1238545 - Remove nsISimpleUnicharStreamFactory; r=froydnj 2016-01-13 17:04:25 -05:00
Aaron Klotz 7bd05e35b4 Bug 1236108: Add temp directory for sandboxed content processes to directory r=bsmedberg
service. This is needed so that chrome processes know where sandboxed content
processes will be writing their temp files, and so that content processes know
where to write; r?bsmedberg

MozReview-Commit-ID: BK9bTxFGvZO

--HG--
extra : rebase_source : dec290c82fb934ceadc0c9ce0cf87337aa1e8f47
2016-03-07 11:26:35 -08:00
Jeff Lu d0b0eb8c7a Bug 864842 - Show error for browsing Windows drive without media, r=michal 2016-02-22 17:00:10 +01:00
Ben Kelly 7382b7bc31 Bug 1247580 P1 Allow old nsIX509Cert serialized objects to be read off disk. r=bz 2016-02-17 07:18:00 -08:00
Julian Seward 37bf902fe7 Bug 1136762 - TSan: data race xpcom/io/nsPipe3.cpp:1061 CloseWithStatus. r=nfroyd.
--HG--
extra : rebase_source : b29cfb05b0c942973e573871edc0f0fdf7203a15
2016-02-17 11:22:28 +01:00
Birunthan Mohanathas d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Phil Ringnalda d381b4bca6 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas 373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Sylvestre Ledru ab4e3a0d42 Bug 1218816 - Remove useless semicolons. Found by coccinelle. r=Ehsan
--HG--
extra : rebase_source : 7d2cc56b6553cd7a8d848d3c660f30735bd82eec
2016-01-22 16:58:49 +01:00
David Rajchenbach-Teller 583ca7286d Bug 1224374 - Profiler labels for the top 26-100 chrome hangs;r=BenWa
--HG--
extra : rebase_source : 39e94507c0288863e495322a6899ff009840870d
2016-01-15 11:38:03 +01:00
Sebastian Hengst d8d4a2d1a5 Backed out 2 changesets (bug 1224374) for Windows bustage. r=bustage on a CLOSED TREE
Backed out changeset 5f458e6e4997 (bug 1224374)
Backed out changeset 0dc02cb0b604 (bug 1224374)
2016-01-19 21:30:41 +01:00
David Rajchenbach-Teller 2d53758d08 Bug 1224374 - Profiler labels for the top 26-100 chrome hangs;r=BenWa
--HG--
extra : rebase_source : 51d39d6f88bf58ccb29f5897c3dbbe71007ee842
2016-01-15 11:38:03 +01:00
Wilmer Paulino 99af515866 Bug 1237668 - Remove nsSimpleUnicharStreamFactory r=froydnj 2016-01-11 19:31:29 -05:00
Mike Hommey 8810bde2ef Bug 1235099 - Remove the NS_APP_BOOKMARKS_50_FILE directory service key. r=dolske
Nothing in mozilla-central uses the NS_APP_BOOKMARKS_50_FILE/BMarks key except
tests. It's also not been very useful since the switch to places in ... Firefox
3? so even if addons use it, it's not doing them much good.
BookmarkHTMLUtils.defaultPath returns the same thing anyways for those that
really do insist on getting the equivalent thing (but I'd argue
BookmarkHTMLUtils.defaultPath, as well as the browser.bookmarks.file pref could
just go away as well).

Seamonkey does use NS_APP_BOOKMARKS_50_FILE/BMarks, but they really only need
the #define, which they can add in their source.
2016-01-12 08:01:52 +09:00
Mike Hommey 63439e34f6 Bug 1234012 - Remove the NS_APP_PROFILE_DEFAULTS_{NLOC_,}50_DIR directory keys. r=bsmedberg
Nothing apart the code that was just removed uses those keys, so remove them.
Actually, there is a use in Seamonkey, but considering they're shipping with
omnijar, the code expecting the directory has not been working as designed for
a while, so they can fixup and remove that use as well.
2016-01-09 07:30:32 +09:00
Kit Cambridge 1c0dc1a969 Bug 1205137 - Add a `PushSubscription` serializer. r=mt,smaug
--HG--
extra : commitid : F5xjqIFcach
extra : rebase_source : 61b0a0cbae318f7afc51752fc31a7133b8abd15c
2015-12-14 16:28:19 -08:00
Birunthan Mohanathas 1cc56207d5 Bug 1227569 - Remove unsupported OpenVMS code. r=mccr8 2015-12-18 15:02:50 +02:00
Andrea Marchesini f2f6c3be20 Bug 901097 - FileReader API in workers, r=sicking, r=nfroyd
--HG--
rename : dom/base/test/fileapi_chromeScript.js => dom/workers/test/fileapi_chromeScript.js
2015-12-18 08:44:00 +00:00
Sebastian Hengst fe800f661e Backed out changeset 30839ee209e8 (bug 901097) for mochitest failures on Android and Mulet. r=backout 2015-12-17 14:13:59 +01:00
Andrea Marchesini 35ff8e160c Bug 901097 - FileReader API in workers, r=sicking, r=nfroyd
--HG--
rename : dom/base/test/fileapi_chromeScript.js => dom/workers/test/fileapi_chromeScript.js
2015-12-17 12:00:35 +00:00
Makoto Kato 385785d472 Bug 1233283 - Remove unless tmp from ReadDir in nsLocalFileWin. r=froydnj 2015-12-17 13:55:38 +09:00
Wes Kocher e23593462a Backed out changeset 84c8783b8518 (bug 901097) for test_fileReader.html crashes CLOSED TREE
--HG--
extra : commitid : crWlUUwg6J
2015-12-16 09:43:42 -08:00
Andrea Marchesini 7a681c85f9 Bug 901097 - FileReader API in workers, r=sicking, r=nfroyd
--HG--
rename : dom/base/test/fileapi_chromeScript.js => dom/workers/test/fileapi_chromeScript.js
2015-12-16 12:37:31 +00:00
Carsten "Tomcat" Book af9ca82bf2 Backed out changeset d74d1e794421 (bug 901097) for bustage on a CLOSED TREE 2015-12-16 11:48:40 +01:00
Andrea Marchesini 97ccffac37 Bug 901097 - FileReader API in workers, r=sicking, r=nfroyd
--HG--
rename : dom/base/test/fileapi_chromeScript.js => dom/workers/test/fileapi_chromeScript.js
2015-12-16 10:15:03 +00:00
Andrea Marchesini ebc5b1a50f iBug 1122788 - patch 2 - nsMultiplexInputStream should not use Tell() in debug builds, r=bz 2015-12-05 09:36:51 +00:00
Andrea Marchesini c018e81125 Bug 1122788 - patch 1 - nsMultiplexInputStream should not use Tell() in debug builds, r=bz 2015-12-05 09:35:49 +00:00
Wes Kocher 18c24e60a0 Backed out changeset d271b9e473fd (bug 1122788) for being a possible cause of test_fileapi.html bustage CLOSED TREE
--HG--
extra : commitid : JtZfexvrBDK
2015-12-04 15:21:24 -08:00
Andrea Marchesini 17ff0fc26a Bug 1122788 - nsMultiplexInputStream should not use Tell() in debug builds, r=bz 2015-12-04 21:17:44 +00:00
Lars T Hansen f6742410f9 Bug 1176214 - Part 15: Changes to xpcom. r=nfroyd
--HG--
extra : rebase_source : 661ab7ca0fe93d626257525cb7b6f4663a3d19ba
2015-11-13 15:08:30 +01:00
Valentin Gosu 67b179e6f9 Bug 412457 - should unescape hostname first, then perform IDNA r=mcmanus 2015-11-18 15:25:27 +01:00
Mike Hommey 762aba02cd Bug 1221453 - Use ObjDirPaths for GENERATED_INCLUDES and merge with LOCAL_INCLUDES. r=gps 2015-11-06 09:59:21 +09:00
Valentin Gosu f4d3791247 Bug 1163030 - URL: stop escaping ` in query r=mcmanus 2015-11-02 13:55:24 +01:00
Valentin Gosu e96a491a5d Bug 1163028 - URL: stop escaping [ and ] in path r=mcmanus 2015-11-02 13:54:10 +01:00
Chris Peterson 4cbe614b32 Bug 1220035 - Fix -Wimplicit-fallthrough warnings in xpcom. r=mccr8
xpcom/base/nsDebugImpl.cpp:458:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/ds/nsCheapSets.h:139:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/ds/nsPersistentProperties.cpp:232:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/ds/nsVariant.cpp:360:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/ds/nsVariant.cpp:766:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/ds/nsVariant.cpp:1658:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/ds/nsVariant.cpp:1661:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/glue/nsTextFormatter.cpp:355:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/glue/nsTextFormatter.cpp:362:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/io/nsWildCard.cpp:85:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/io/nsWildCard.cpp:401:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
2015-10-29 21:31:32 -07:00
Birunthan Mohanathas 44936aabb2 Bug 1217320 - Remove more XPIDL signature comments in .cpp files. r=froydnj
Comment-only, DONTBUILD.
2015-10-27 06:54:25 +02:00
Eric Rahm 5b38c55967 Bug 1174785 - Part 2: Convert xpcom over to LogModule. r=froydnj
--HG--
extra : rebase_source : 58d3b32bd0174f2540512cef810cafdd3556ef6b
2015-10-19 12:50:14 -07:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Chris Peterson 0dbaae1ce2 Bug 1204403 - Fix -Wshadow warnings in xpcom. r=mccr8 2015-09-07 23:56:16 -07:00
Ben Kelly 233c4ec7a9 Bug 1203680 P4 Fix bug in nsStorageStream with reading streams created before data is populated. r=froydnj 2015-09-15 10:15:45 -07:00
Ben Kelly 02126738d3 Bug 1203680 P2 Implement an NS_InputStreamIsCloneable() method. r=froydnj 2015-09-15 10:15:45 -07:00
Wes Kocher a336f83a0a Backed out 9 changesets (bug 1203680) for mochitest bustage CLOSED TREE
Backed out changeset e4733b9eb53c (bug 1203680)
Backed out changeset fb33eb2a55b0
Backed out changeset eb42e21bbb96 (bug 1203680)
Backed out changeset 86642d84e604 (bug 1203680)
Backed out changeset 1026da4b02fb (bug 1203680)
Backed out changeset 311f9810e0b3 (bug 1203680)
Backed out changeset 6fedc85dc0d9 (bug 1203680)
Backed out changeset b25230c0a193 (bug 1093357)
Backed out changeset 2369d63ef14a (bug 1203680)
2015-09-14 14:27:57 -07:00
Ben Kelly 7c43b0d527 Bug 1203680 P2 Implement an NS_InputStreamIsCloneable() method. r=froydnj 2015-09-14 12:12:00 -07:00
Ben Kelly acc86c5c7a Backout rev b25230c0a193 for wrong bug number. r=me 2015-09-14 12:12:00 -07:00
Ben Kelly 79ccea7ed6 Bug 1203680 P4 Fix bug in nsStorageStream with reading streams created before data is populated. r=froydnj 2015-09-14 12:04:56 -07:00
Ben Kelly 2577b751f1 Bug 1093357 P2 Implement an NS_InputStreamIsCloneable() method. r=froydnj 2015-09-14 12:04:56 -07:00
Ben Kelly a1265d3d9a Bug 1203760 P1 Allow pipe to wake up multiple streams at the same time. r=froydnj 2015-09-14 08:49:09 -07:00
Florian Quèze e966fcb5ac Bug 1169459 - remove the loadFromJars/jarURIs prefs, r=Mossop. 2015-09-04 11:50:49 +02:00
Nicholas Nethercote f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Chris Peterson 1416e566de Bug 1198124 - Enable -Wshadow in directories that have no -Wshadow warnings. r=glandium 2015-08-25 09:14:38 -07:00
Michael Layzell 945c9a35f4 Bug 1195415 - Add asciiHostPort field to nsIURI, and use it in the implementation of nsPrincipal::GetOriginForURI, r=bholley 2015-08-18 14:52:24 -04:00
Arnaud Bienner 2755fa9a57 Bug 1190086 - Use new String::Contains(char) method more widely r=froydnj
--HG--
extra : rebase_source : 81df1495200d3734ea1c4c13818ae764a445f4b3
2015-08-14 00:49:15 +02:00
Nathan Froyd 3b0a318c70 Bug 1192230 - clean up reference-counting in xpcom/; r=erahm 2015-07-01 12:27:43 -04:00
Birunthan Mohanathas 7315345693 Bug 1191100 - Remove XPIDL signature comments in .cpp files. r=ehsan
Comment-only so DONTBUILD.
2015-08-04 16:17:36 -07:00
Bobby Holley 97b9240b34 Bug 1188696 - Hoist nsRefPtr.h into MFBT. r=froydnj 2015-07-29 10:44:59 -07:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Robert O'Callahan 4ac8503958 Bug 1143575. Avoid use of COMPARE macro which can clash with Android headers. r=bent
--HG--
extra : commitid : G02N9VidCk7
extra : rebase_source : a2a3bba44ef2b8765432e06d32ee4a811c9954fd
2015-06-07 12:26:40 +03:00
Juan Gomez 258ad59e3f Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-07-03 18:29:00 -07:00
Ryan VanderMeulen 5f5c327690 Backed out changeset 8b4e4083639e (bug 1171931) for B2G debug emulator bustage. 2015-06-25 19:48:42 -04:00
Juan Gomez 702a59d135 Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj
--HG--
extra : rebase_source : 2ecbe6c1dd8a7ad8dc529b53349ad431cf1116c9
2015-06-24 14:11:00 -04:00
Boris Zbarsky 075355a9e5 Bug 1175601. Make nsIFile.getRelativeDescriptor work with paths with paths with arbitrary numbers of segments, not just 32. r=froydnj 2015-06-17 16:17:22 -04:00
Boris Zbarsky bf8f45932e Bug 1175600. Add getRelativePath/setRelativePath to nsIFile. r=froydnj 2015-06-17 16:17:20 -04:00
Florian Quèze 46202ff411 Bug 1109354 - prefer Firefox default engines over profile-installed plugins with the same name, r=markh.
--HG--
extra : rebase_source : cdf4cb2b3969a9ac797f61c3f0b4f081353582e4
2015-06-15 18:32:09 +02:00
Ted Mielczarek 5ad09caf62 bug 1171124 - Swap some XP_MACOSX for XP_DARWIN in nsLocalFileUnix. r=froydnj
--HG--
extra : commitid : 3q0r3528Awn
extra : rebase_source : 2e959724508569d186623ab88b8b532e539caaba
2015-02-04 10:49:45 -05:00
Chris Peterson 1755f9e8bb Bug 1026761 - CID 749761: nsAStreamCopier::Process can use sourceCondition, sinkCondition uninitialized. r=froydnj 2015-06-06 12:35:37 -07:00
Nikhil Marathe f22c1bc30b Bug 1166504 - Make nsMultiplexInputStream cloneable. r=bkelly,froydnj
--HG--
extra : rebase_source : 50d88c93b4b8bab0d474002f6661432ad5357e43
2015-06-02 16:12:57 -07:00
Eric Rahm 75c4bebb79 Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-03 15:25:57 -07:00
Carsten "Tomcat" Book 5471309381 Backed out 14 changesets (bug 1165515) for linux x64 e10s m2 test failures
Backed out changeset d68dcf2ef372 (bug 1165515)
Backed out changeset 7c3b45a47811 (bug 1165515)
Backed out changeset b668b617bef2 (bug 1165515)
Backed out changeset d0916e1283a2 (bug 1165515)
Backed out changeset ac4dc7489942 (bug 1165515)
Backed out changeset e9632ce8bc65 (bug 1165515)
Backed out changeset c16d215cc7e4 (bug 1165515)
Backed out changeset e4d474f3c51a (bug 1165515)
Backed out changeset d87680bf9f7c (bug 1165515)
Backed out changeset b3c0a45ba99e (bug 1165515)
Backed out changeset 9370fa197674 (bug 1165515)
Backed out changeset 50970d668ca1 (bug 1165515)
Backed out changeset ffa4eb6d24b9 (bug 1165515)
Backed out changeset 5fcf1203cc1d (bug 1165515)

--HG--
extra : rebase_source : 6fb850d063cbabe738f97f0380302153e3eae97a
2015-06-02 13:05:56 +02:00
Eric Rahm a9afd68cef Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-01 22:17:33 -07:00
Wes Kocher ba06617421 Backed out changeset 47a103414177 (bug 1166504) for mochitest-e10s-4 permafail CLOSED TREE 2015-06-01 17:59:17 -07:00
Wes Kocher 4e9f80ed2e Backed out 14 changesets (bug 1165515) for b2g mochitest-6 permafail CLOSED TREE
Backed out changeset 9b97e2aa2ed9 (bug 1165515)
Backed out changeset 150606c022a2 (bug 1165515)
Backed out changeset 4e875a488349 (bug 1165515)
Backed out changeset 467e7feeb546 (bug 1165515)
Backed out changeset d6b6cc373197 (bug 1165515)
Backed out changeset 0615265b593c (bug 1165515)
Backed out changeset fafd1dce9f08 (bug 1165515)
Backed out changeset d1df869245f9 (bug 1165515)
Backed out changeset 6876a7c63611 (bug 1165515)
Backed out changeset b7841c94a9a3 (bug 1165515)
Backed out changeset e5e3617f7c73 (bug 1165515)
Backed out changeset 39be3db95978 (bug 1165515)
Backed out changeset 0ec74176f8de (bug 1165515)
Backed out changeset 5b928dd10d71 (bug 1165515)
2015-06-01 17:57:58 -07:00
Nikhil Marathe f2fab68cc8 Bug 1166504 - Make nsMultiplexInputStream cloneable. r=bkelly,froydnj
--HG--
extra : rebase_source : cb6b530acf76e6414cd8d76aedd994b27effe069
2015-05-19 14:28:32 -07:00
Eric Rahm f82c0e7caf Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-01 14:31:01 -07:00
Michael Layzell 8b31d0676c Bug 1167380 - Mark (Read/Write)SegmentsState::m(Source/Sink) as MOZ_NON_OWNING_REF and mark as MOZ_STACK_CLASS. r=froydnj 2015-05-28 08:32:00 -04:00
Ryan VanderMeulen 13603e7715 Bug 1059081 - More non-unified bustage fixage.
CLOSED TREE

--HG--
extra : amend_source : 17ec29e14dbd9b1bb4296a0faed151c073b93599
2015-05-28 15:00:36 -04:00
Josh Matthews bd1ad4e991 Bug 1059081 - Fix non-unified bustage. a=bustage
--HG--
extra : transplant_source : %03j%8A%5DJ-%8F%CD%D7%BE%F11%B7%89%21%15n%F6%0E%8D
2015-05-28 13:23:56 -04:00
Eric Rahm 3925a960aa Bug 1165515 - Part 1: Convert PR_LOG to MOZ_LOG. r=froydnj 2015-05-21 13:22:04 -07:00
Eric Rahm 4879ae86f4 Bug 1165518 - Part 2: Replace prlog.h with Logging.h. rs=froydnj 2015-05-19 11:15:34 -07:00
Felix Janda 058b46c6b4 Bug 1152176 - xpcom: Define linux kernel BLOCK_SIZE if necessary. r=nfroyd
--HG--
extra : rebase_source : e706a9d1f672cce26991f9b348c85956219a36ce
2015-05-18 21:30:14 +02:00
Birunthan Mohanathas 1f8d7454e3 Bug 968520 - Add mozilla::fallible to Fallible{Auto,}TArray::SetCapacity calls. r=froydnj 2015-05-18 13:50:34 -07:00
Bob Owen f1a00623b7 Bug 1162327 Part 1: Change low integrity temp to a fixed dir per profile and improve clean-up. r=jimm, r=froydnj 2015-05-18 11:51:07 +01:00
Neil Rashbrook cf42e317ab Bug 1155963 Only allow NS_LITERAL_CSTRING to be used on compile-time literals r=froydnj,ehsan 2015-05-16 09:07:10 +01:00
Wes Kocher 3c714c42eb Backed out changeset 17cfad44e12b (bug 1155963) for breaking b2g builds 2015-05-14 16:35:18 -07:00
Neil Rashbrook ae441fafa2 Bug 1155963 Only allow NS_LITERAL_CSTRING to be used on compile-time literals r=froydnj,ehsan 2015-05-15 00:00:33 +01:00
Josh Matthews 312dc84e14 Bug 1059081 - Add a threadsafe wrapper for persistent nsMultiplexStream queues. r=nfroyd 2015-05-14 07:55:57 -04:00
Nicholas Nethercote 1a8597278b Bug 1163916 (part 2) - Avoid a static constructor for kCompressedBufferLength. r=froydnj.
--HG--
extra : rebase_source : b44ed66dd66481c63bbddafefca34b88860ecc1b
2015-05-13 16:48:32 -07:00
Eric Rahm 645b42df1f Bug 1162242 - Part 1: Remove instances of #ifdef PR_LOGGING. r=froydnj
PR_LOGGING is now always defined, we can remove #ifdefs checking for it.
2015-05-07 09:43:35 -07:00
Ehsan Akhgari d2b480a8db Bug 1161240 - Make sure that NS_CloneInputStream correctly deals with null input; r=froydnj 2015-05-05 09:56:47 -04:00
David Major 6ac6e10e68 Bug 1159604 - Use fallible allocations in nsLinebreakConverter.cpp (as the code expects). r=smaug 2015-05-04 07:33:00 +02:00
Mike Hommey 924c9eb636 Bug 1134923 - Remove NS_Alloc/NS_Realloc/NS_Free. r=nfroyd
They are kept around for the sake of the standalone glue, which is used
for e.g. webapprt, which doesn't have direct access to jemalloc, and thus
still needs a wrapper to go through the xpcom function list and get to
jemalloc from there.
2015-05-01 09:40:30 +09:00
Valentin Gosu b6ae7d5d90 Bug 1040285 - Single Quotes should not be encoded in the path r=mcmanus,annevk 2015-04-28 18:29:22 +03:00
David Major ebde6b9f4f Bug 1157835: Remove the MSVC_ENABLE_PGO flag from the build system. r=glandium
--HG--
extra : rebase_source : 0c47c99bb8b92f8361a51fd81b20a2cc8647a986
2015-04-27 19:59:27 -04:00
Kartikaya Gupta cd5b55f8d6 Bug 1039866 - Rip out a bunch of metro-only code. r=jimm,gavin,rstrong 2015-04-23 15:10:30 -04:00
Ehsan Akhgari 8d22829c76 Bug 1156109 - Make nsStorageInputStream::mStorageStream an nsRefPtr; r=froydnj 2015-04-20 13:10:30 -04:00
Wes Kocher e3210dc1de Backed out 1 changesets (bug 1040285) for windows xpcshell failures CLOSED TREE
Backed out changeset ffd1b16f058b (bug 1040285)
2015-04-16 15:17:15 -07:00
Valentin Gosu 68ac72d180 Bug 1040285 - Single Quotes should not be encoded in the path. r=mcmanus, r=annevk 2015-04-16 01:11:05 +03:00
Andrew McCreight 3bee6e09f9 Bug 1151541, part 3 - Fix leading tabs in xpcom/. r=froydnj 2015-04-09 10:25:05 -07:00
Mike Hommey b077d9624d Bug 1134920 - Use moz_xmalloc/moz_xrealloc/free instead of nsMemory::Alloc/Realloc/Free. r=nfroyd 2015-04-01 13:51:45 +09:00
Mike Hommey c39e359c7d Bug 1138293 - Use malloc/free/realloc/calloc instead of moz_malloc/moz_free/moz_realloc/moz_calloc. r=njn
The distinction between moz_malloc/moz_free and malloc/free is not
interesting. We are inconsistent in our use of one or the other, and
I wouldn't be surprised if we are mixing them anyways.
2015-03-31 12:32:49 +09:00
Andrew McCreight 2f48802ae0 Bug 1147572 - Remove implementation language field from DOM class info. r=jst 2015-03-30 10:45:39 -07:00
Titi_Alone cc4df63d2e Bug 1133063 - Move SetLength into the if's condition. r=froydnj 2015-02-26 19:13:59 +01:00
Jed Davis e9bc517fd8 Bug 1146416 - Move remote anonymous temporary file opening to the main thread. r=roc 2015-03-27 17:24:37 -07:00
Andrea Marchesini e6f385fb3d Bug 1148527 - Indentation fix after bug 1145631, r=ehsan 2015-03-27 18:52:19 +00:00
Bill McCloskey a9569d4725 Bug 997325 - Implement main process scriptable only flag in XPIDL (r=mrbkap) 2015-03-26 14:39:48 -07:00
Trevor Saunders d5851ef31c bug 1146027 - more final r=froydnj 2015-03-24 17:51:43 -04:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Jacek Caban 50943d7672 Bug 1142584 - Fixed nsEscape.cpp compilation on mingw GCC 4.8. r=nfroyd 2015-03-19 14:29:54 +01:00