gecko-dev/netwerk/test
Patrick McManus 175115e709 bug 1116867 - make nsIProgressEventSink and nsITransportEventSink safely scriptable r=mayhemer r=bz
These scriptable interfaces use uint_64 arguments with sentinel values
of UINT64_MAX. However, UINT64_MAX exceeds MAX_SAFE_INTEGER and cannot
be gatewayed to/from javascript - so they cannot be used
correctly. Change them to use signed 64 bit numbers and -1 as the
sentinnel. C++ implementations ought to be enough to audit as the
special value could never be used correctly in JS anyhow - also
audited OnProgressChange() uses for downstream use of this data.
---
 dom/base/nsXMLHttpRequest.cpp                      | 19 +++++++----
 dom/base/nsXMLHttpRequest.h                        | 10 +++---
 dom/plugins/base/nsPluginStreamListenerPeer.cpp    |  4 +--
 .../webbrowserpersist/nsWebBrowserPersist.cpp      | 14 ++++----
 image/src/imgLoader.cpp                            |  4 +--
 modules/libjar/nsJARChannel.cpp                    |  3 +-
 netwerk/base/public/nsIProgressEventSink.idl       |  8 ++---
 netwerk/base/public/nsITransport.idl               |  8 ++---
 netwerk/base/public/nsNetUtil.h                    | 24 ++++++++++++++
 netwerk/base/src/Dashboard.cpp                     |  2 +-
 netwerk/base/src/nsBaseChannel.cpp                 | 12 +++----
 netwerk/base/src/nsIncrementalDownload.cpp         |  4 +--
 netwerk/base/src/nsSocketTransport2.cpp            |  5 +--
 netwerk/base/src/nsStreamTransportService.cpp      | 38 +++++++++++++---------
 netwerk/base/src/nsTransportUtils.cpp              | 12 +++----
 netwerk/protocol/file/nsFileChannel.cpp            |  8 +++--
 netwerk/protocol/ftp/nsFtpConnectionThread.cpp     |  4 +--
 netwerk/protocol/http/Http2Push.cpp                |  2 +-
 netwerk/protocol/http/Http2Session.cpp             |  2 +-
 netwerk/protocol/http/HttpChannelChild.cpp         | 31 +++++++++---------
 netwerk/protocol/http/HttpChannelChild.h           |  6 ++--
 netwerk/protocol/http/HttpChannelParent.cpp        |  4 +--
 netwerk/protocol/http/HttpChannelParent.h          |  4 +--
 netwerk/protocol/http/NullHttpTransaction.cpp      |  2 +-
 netwerk/protocol/http/PHttpChannel.ipdl            |  2 +-
 netwerk/protocol/http/SpdyPush31.cpp               |  2 +-
 netwerk/protocol/http/SpdySession31.cpp            |  2 +-
 netwerk/protocol/http/TunnelUtils.cpp              |  2 +-
 netwerk/protocol/http/nsAHttpTransaction.h         |  4 +--
 netwerk/protocol/http/nsHttpChannel.cpp            | 30 +++++++++++------
 netwerk/protocol/http/nsHttpConnection.cpp         |  4 +--
 netwerk/protocol/http/nsHttpConnectionMgr.cpp      |  4 +--
 netwerk/protocol/http/nsHttpPipeline.cpp           |  4 +--
 netwerk/protocol/http/nsHttpPipeline.h             |  6 ++--
 netwerk/protocol/http/nsHttpResponseHead.cpp       |  2 +-
 netwerk/protocol/http/nsHttpResponseHead.h         |  2 +-
 netwerk/protocol/http/nsHttpTransaction.cpp        | 32 +++++++++---------
 netwerk/protocol/http/nsHttpTransaction.h          |  2 +-
 netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp   |  2 +-
 netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp      |  3 +-
 netwerk/test/TestIncrementalDownload.cpp           |  7 ++--
 uriloader/base/nsDocLoader.cpp                     | 14 ++++----
 42 files changed, 203 insertions(+), 151 deletions(-)
2015-01-08 14:48:52 -05:00
..
browser Bug 1087739: Make JS callers of ios.newChannel call ios.newChannel2 in netwerk/ (r=sworkman,tanvi) 2014-10-24 15:16:29 -07:00
crashtests Bug 785753 - Adding two crashtests. 2014-07-13 13:01:43 +00:00
httpserver Bug 1113004 - Add IsPrivateResponse to HttpChannel. r=mayhemer 2015-01-08 22:38:00 +01:00
mochitests Bug 1111137 - Disable test_user_agent_overrides.html on Android due to frequent failures. 2015-01-16 09:59:57 -05:00
reftest
unit bug 1102923 - move spdy/h2 tests off fixed port r=hurley r=ted 2015-01-15 11:12:05 -05:00
unit_ipc Bug 1087739: Make JS callers of ios.newChannel call ios.newChannel2 in netwerk/ (r=sworkman,tanvi) 2014-10-24 15:16:29 -07:00
moz.build Bug 1119006 - Remove files where code is still calling removed NS_OpenURI API (r=mcmanus) 2015-01-14 11:52:57 -08:00
PropertiesTest.cpp
ReadNTLM.cpp
sites.txt
TestBind.cpp Bug 951677 - Part 2: test case. r=honzab 2014-10-07 17:25:54 +08:00
TestBlockingSocket.cpp
TestCacheBlockFiles.cpp
TestCachePrefixKeyParser.cpp Bug 968593 - HTTP cache v2: Make load context key (a.k.a key prefix) safely parsable, r=michal 2014-04-06 20:44:40 +02:00
TestCallbacks.cpp Bug 1119256 - Mark virtual overridden functions as MOZ_OVERRIDE in netwerk; r=jduell 2015-01-14 17:57:08 -05:00
TestCommon.h Bug 1119256 - Mark virtual overridden functions as MOZ_OVERRIDE in netwerk; r=jduell 2015-01-14 17:57:08 -05:00
TestCookie.cpp Bug 869836 - Part 1: Use EqualsLiteral instead of == NS_LITERAL_STRING(...). r=ehsan 2014-05-22 06:48:50 +03:00
TestDNS.cpp Bug 1119256 - Mark virtual overridden functions as MOZ_OVERRIDE in netwerk; r=jduell 2015-01-14 17:57:08 -05:00
TestDNSDaemon.cpp
TestFileInput2.cpp Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
TestHttp.cpp Bug 1119006 - Remove files where code is still calling removed NS_OpenURI API (r=mcmanus) 2015-01-14 11:52:57 -08:00
TestIDN.cpp
TestIncrementalDownload.cpp bug 1116867 - make nsIProgressEventSink and nsITransportEventSink safely scriptable r=mayhemer r=bz 2015-01-08 14:48:52 -05:00
TestIOThreads.cpp Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
TestMakeAbs.cpp
TestOpen.cpp Bug 1110469 - Remove NS_OpenURI (r=sworkman) 2015-01-11 20:26:40 -08:00
TestOverlappedIO.cpp Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
TestProtocols.cpp Bug 1119006 - Remove files where code is still calling removed NS_OpenURI API (r=mcmanus) 2015-01-14 11:52:57 -08:00
TestRes.cpp Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
TestServ.cpp Bug 1028588 - Fix dangerous public destructors in netwerk/ - r=mcmanus 2014-06-24 12:36:44 -04:00
TestServ.js
TestSocketInput.cpp Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
TestSocketIO.cpp Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
TestSocketTransport.cpp Bug 869836 - Part 9: Use AssignLiteral instead of Assign(NS_LITERAL_STRING(...)). r=ehsan 2014-05-22 06:48:52 +03:00
TestStandardURL.cpp
TestStreamChannel.cpp Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
TestStreamLoader.cpp Bug 1038756: Callsites creating a channel in /netwerk/ (r=mcmanus) 2014-09-21 09:40:12 -07:00
TestStreamPump.cpp Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
TestStreamTransport.cpp Bug 869836 - Part 2: Use AppendLiteral instead of Append(NS_LITERAL_STRING(...)). r=ehsan 2014-05-22 06:48:50 +03:00
TestSTSParser.cpp Bug 787133 - (hpkp) Part 1/2. Header Parsing and interface within PSM. r=keeler, r=mcmanus 2014-09-03 10:24:12 -07:00
TestUDPSocket.cpp Backed out 4 changesets (bug 745283) for conflicting with the backout of bug 786419 a=backout 2014-08-26 16:33:42 -07:00
TestUDPSocketProvider.cpp
TestUpload.cpp Bug 1028588 - Fix dangerous public destructors in netwerk/ - r=mcmanus 2014-06-24 12:36:44 -04:00
TestURLManipulation.html
TestURLParser.cpp
TestWriteSpeed.cpp
urlparse_mac.dat
urlparse_unx.dat
urlparse_win.dat
urlparse.dat
urltest.cpp
urltests.dat