dump stream pointer, error, whence and offset when an seek error occurs. draft
authorISHIKAWA, Chiaki <ishikawa@yk.rim.or.jp>
Sat, 09 Nov 2019 11:00:12 +0900
changeset 81072 5a4d04240bdaa767d3637490270a58a9f1d1db9d
parent 81071 5816efa090d438ceb394efc938be18ede0c93963
child 81073 552fdab452104a392f8bfe515ca4f2289065bb56
push id9744
push userishikawa@yk.rim.or.jp
push dateSat, 09 Nov 2019 02:01:06 +0000
treeherdertry-comm-central@56c83244ac0e [default view] [failures only]
dump stream pointer, error, whence and offset when an seek error occurs.
mozilla-M-C-010-dump-seek-error-in-buffered-stream.patch
new file mode 100644
--- /dev/null
+++ b/mozilla-M-C-010-dump-seek-error-in-buffered-stream.patch
@@ -0,0 +1,32 @@
+# HG changeset patch
+# User ISHIKAWA, Chiaki <ishikawa@yk.rim.or.jp>
+# Parent  400334fb0ff69620235e71e64f5ebd76f1869830
+dump stream pointer, error, whence and offset when an seek error occurs.
+
+diff --git a/netwerk/base/nsBufferedStreams.cpp b/netwerk/base/nsBufferedStreams.cpp
+--- a/netwerk/base/nsBufferedStreams.cpp
++++ b/netwerk/base/nsBufferedStreams.cpp
+@@ -180,16 +180,23 @@ nsBufferedStream::Seek(int32_t whence, i
+   }
+ 
+   rv = ras->Seek(whence, offset);
+   if (NS_FAILED(rv)) {
+ #ifdef DEBUG
+     NS_WARNING(
+         "(debug) Error: ras->Seek() returned error within "
+         "nsBufferedStream::Seek, so we exit early.");
++        fprintf(stderr,
++                "(debug) ras = %p, rv=0x%08x, whence=%0x, "
++                "offset=%08lx\n",
++                (void *) ras,
++                (unsigned int) rv,
++                whence,
++                (long int) offset);
+ #endif
+     return rv;
+   }
+ 
+   mEOF = false;
+ 
+   // Recompute whether the offset we're seeking to is in our buffer.
+   // Note that we need to recompute because Flush() might have