Bug 1494992 - Record reference count changes for nsJARInputThunk, r=froydnj.
authorBrian Hackett <bhackett1024@gmail.com>
Fri, 28 Sep 2018 05:22:22 -1000
changeset 494549 cde062deae16688243106bd9229cf7933c72e844
parent 494548 7ed2dd1cac5420a828628b08a39ddbeacf458af1
child 494550 94e830b73e28a7513baf74f5e4071cd4cd373d5b
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1494992
milestone64.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
Bug 1494992 - Record reference count changes for nsJARInputThunk, r=froydnj.
modules/libjar/nsJARChannel.cpp
--- a/modules/libjar/nsJARChannel.cpp
+++ b/modules/libjar/nsJARChannel.cpp
@@ -58,17 +58,19 @@ static LazyLogModule gJarProtocolLog("ns
 // nsJARInputThunk
 //
 // this class allows us to do some extra work on the stream transport thread.
 //-----------------------------------------------------------------------------
 
 class nsJARInputThunk : public nsIInputStream
 {
 public:
-    NS_DECL_THREADSAFE_ISUPPORTS
+    // Preserve refcount changes when record/replaying, as otherwise the thread
+    // which destroys the thunk may vary between recording and replaying.
+    NS_DECL_THREADSAFE_ISUPPORTS_WITH_RECORDING(recordreplay::Behavior::Preserve)
     NS_DECL_NSIINPUTSTREAM
 
     nsJARInputThunk(nsIZipReader *zipReader,
                     nsIURI* fullJarURI,
                     const nsACString &jarEntry,
                     bool usingJarCache)
         : mUsingJarCache(usingJarCache)
         , mJarReader(zipReader)