Bug 1260838 - Assert that ScriptSource's reference count is zero upon destruction; r=jimb a=kwierso
authorNick Fitzgerald <fitzgen@gmail.com>
Thu, 31 Mar 2016 14:29:33 -0700
changeset 291112 7f27f1aa002929117dda91bbe774544d844db918
parent 291111 e1ed27db762457e2263c91d1bc050b8adc240894
child 291113 297e38fbff063b5d7f1289be4af164b8642d727b
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimb, kwierso
bugs1260838
milestone48.0a1
Bug 1260838 - Assert that ScriptSource's reference count is zero upon destruction; r=jimb a=kwierso MozReview-Commit-ID: 3TKvYlp2EW1
js/src/jsscript.cpp
--- a/js/src/jsscript.cpp
+++ b/js/src/jsscript.cpp
@@ -2211,16 +2211,17 @@ ScriptSource::~ScriptSource()
             p.parent->decref();
         }
 
         ReturnType match(Missing&) {
             // Nothing to do here.
         }
     };
 
+    MOZ_ASSERT(refs == 0);
     MOZ_ASSERT_IF(inCompressedSourceSet, data.is<Compressed>());
 
     DestroyMatcher dm(*this);
     data.match(dm);
 }
 
 void
 ScriptSource::addSizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf,