Bug 536324 part 1 - Change nsIChannel's contentLength to be 64-bit. r=jduell sr=jst
authorNick Hurley <hurley@todesschaf.org>
Mon, 22 Oct 2012 10:51:07 -0700
changeset 111187 c2c998bad111769302587fb90ee436fa3956a599
parent 111186 1423fc67d73ed2c4e40dfa5938898cd336af76f5
child 111188 90d8a63e061cc05f84d5f4c87dd9b2ebded439b9
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersjduell, jst
bugs536324
milestone19.0a1
Bug 536324 part 1 - Change nsIChannel's contentLength to be 64-bit. r=jduell sr=jst
netwerk/base/public/nsIChannel.idl
--- a/netwerk/base/public/nsIChannel.idl
+++ b/netwerk/base/public/nsIChannel.idl
@@ -19,17 +19,17 @@ interface nsIStreamListener;
  * by calling nsIChannel::open or nsIChannel::asyncOpen.
  *
  * After a request has been completed, the channel is still valid for accessing
  * protocol-specific results.  For example, QI'ing to nsIHttpChannel allows
  * response headers to be retrieved for the corresponding http transaction.
  *
  * This interface must be used only from the XPCOM main thread.
  */
-[scriptable, uuid(98f3b51b-bb55-4276-a43c-db636f8d77e3)]
+[scriptable, uuid(2a8a7237-c1e2-4de7-b669-2002af29e42d)]
 interface nsIChannel : nsIRequest
 {
     /**
      * The original URI used to construct the channel. This is used in
      * the case of a redirect or URI "resolution" (e.g. resolving a
      * resource: URI to a file: URI) so that the original pre-redirect
      * URI can still be obtained.  This is never null.  Attempts to
      * set it to null must throw.
@@ -114,23 +114,21 @@ interface nsIChannel : nsIRequest
      * This attribute only applies to textual data.
      *
      * The value of the contentCharset attribute is a mixedcase string.
      */
     attribute ACString contentCharset;
 
     /**
      * The length of the data associated with the channel if available.  A value
-     * of -1 indicates that the content length is unknown.
-     *
-     * Callers should prefer getting the "content-length" property
-     * as 64-bit value by QIing the channel to nsIPropertyBag2,
-     * if that interface is exposed by the channel.
+     * of -1 indicates that the content length is unknown. Note that this is a
+     * 64-bit value and obsoletes the "content-length" property used on some
+     * channels.
      */
-    attribute long contentLength;
+    attribute int64_t contentLength;
 
     /**
      * Synchronously open the channel.
      *
      * @return blocking input stream to the channel's data.
      *
      * NOTE: nsIChannel implementations are not required to implement this
      * method.  Moreover, since this method may block the calling thread, it