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

2544 Коммитов

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