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

2544 Коммитов

Автор SHA1 Сообщение Дата
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