Bug 1199643 - Fix unsafe use of PerformanceGroup. r=jandem
authorDavid Rajchenbach-Teller <dteller@mozilla.com>
Fri, 28 Aug 2015 15:31:20 +0200
changeset 259873 99439a497979be5acda1c17a11a597b228d0dff1
parent 259827 7db14bebae9196d780b1d64d2fd32d1bda26828b
child 259874 1a6139dad4b195e854561aef275ac81765124516
push id29296
push userryanvm@gmail.com
push dateSun, 30 Aug 2015 19:45:10 +0000
treeherdermozilla-central@2ad5077d86ba [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1199643
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
Bug 1199643 - Fix unsafe use of PerformanceGroup. r=jandem
js/src/jsapi.cpp
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -328,17 +328,17 @@ IterPerformanceStats(JSContext* cx,
             // reporting them doesn't really make sense.
             continue;
         }
         if (!c->performanceMonitoring.hasSharedGroup()) {
             // Don't report compartments that do not even have a PerformanceGroup.
             continue;
         }
         js::AutoCompartment autoCompartment(cx, compartment);
-        PerformanceGroup* group = compartment->performanceMonitoring.getSharedGroup(cx);
+        mozilla::RefPtr<PerformanceGroup> group = compartment->performanceMonitoring.getSharedGroup(cx);
         if (group->data.ticks == 0) {
             // Don't report compartments that have never been used.
             continue;
         }
 
         Set::AddPtr ptr = set.lookupForAdd(group);
         if (ptr) {
             // Don't report the same group twice.