Backout rev b25230c0a193 for wrong bug number. r=me
☠☠ backed out by 21b8c95e507a ☠ ☠
authorBen Kelly <ben@wanderview.com>
Mon, 14 Sep 2015 12:12:00 -0700
changeset 295023 fb33eb2a55b082f6426fa3ee47f5f417a7b77242
parent 295022 eb42e21bbb96754c5f1e2a28a944a1824dd2d57e
child 295024 e4733b9eb53cdf487057b0905d6d6051bcd9e1ff
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backout rev b25230c0a193 for wrong bug number. r=me
xpcom/io/nsStreamUtils.cpp
xpcom/io/nsStreamUtils.h
--- a/xpcom/io/nsStreamUtils.cpp
+++ b/xpcom/io/nsStreamUtils.cpp
@@ -852,27 +852,16 @@ NS_FillArray(FallibleTArray<char>& aDest
   // SetLengthAndRetainStorage here, see nsTArrayElementTraits::Construct()
   // in nsTArray.h:
   aDest.SetLengthAndRetainStorage(aKeep + *aNewBytes);
 
   MOZ_ASSERT(aDest.Length() <= aDest.Capacity(), "buffer overflow");
   return rv;
 }
 
-bool
-NS_InputStreamIsCloneable(nsIInputStream* aSource)
-{
-  if (!aSource) {
-    return false;
-  }
-
-  nsCOMPtr<nsICloneableInputStream> cloneable = do_QueryInterface(aSource);
-  return cloneable && cloneable->GetCloneable();
-}
-
 nsresult
 NS_CloneInputStream(nsIInputStream* aSource, nsIInputStream** aCloneOut,
                     nsIInputStream** aReplacementOut)
 {
   if (NS_WARN_IF(!aSource)) {
     return NS_ERROR_FAILURE;
   }
 
--- a/xpcom/io/nsStreamUtils.h
+++ b/xpcom/io/nsStreamUtils.h
@@ -260,22 +260,16 @@ struct MOZ_STACK_CLASS nsWriteSegmentThu
  *        failed
  * @return the result from aInput->Read(...)
  */
 extern NS_METHOD
 NS_FillArray(FallibleTArray<char>& aDest, nsIInputStream* aInput,
              uint32_t aKeep, uint32_t* aNewBytes);
 
 /**
- * Return true if the given stream can be directly cloned.
- */
-extern bool
-NS_InputStreamIsCloneable(nsIInputStream* aSource);
-
-/**
  * Clone the provided source stream in the most efficient way possible.  This
  * first attempts to QI to nsICloneableInputStream to use Clone().  If that is
  * not supported or its cloneable attribute is false, then a fallback clone is
  * provided by copying the source to a pipe.  In this case the caller must
  * replace the source stream with the resulting replacement stream.  The clone
  * and the replacement stream are then cloneable using nsICloneableInputStream
  * without duplicating memory.  This fallback clone using the pipe is only
  * performed if a replacement stream parameter is also passed in.