Closed Bug 1165885 Opened 9 years ago Closed 9 years ago

Clearing the recordings list while a console.profile is in progress produces errors

Categories

(DevTools :: Performance Tools (Profiler/Timeline), defect)

defect
Not set
normal

Tracking

(firefox40 verified, firefox41 fixed)

VERIFIED FIXED
Firefox 41
Tracking Status
firefox40 --- verified
firefox41 --- fixed

People

(Reporter: pbro, Assigned: jsantell)

References

Details

Attachments

(1 file)

STR: - open the perf tool - open the split console - enter 'console.profile("test")' in the console - click the "Clear" button in the perf tool's sidebar => the following exception is thrown: ************************* A coding exception was thrown and uncaught in a Task. Full message: TypeError: recording is null Full stack: OverviewView.render<@chrome://browser/content/devtools/performance/views/overview.js:177:5 TaskImpl_run@resource://gre/modules/Task.jsm:314:40 TaskImpl@resource://gre/modules/Task.jsm:275:3 createAsyncFunction/asyncFunction@resource://gre/modules/Task.jsm:249:14 OverviewView._onRecordingTick<@chrome://browser/content/devtools/performance/views/overview.js:189:11 TaskImpl_run@resource://gre/modules/Task.jsm:314:40 TaskImpl@resource://gre/modules/Task.jsm:275:3 createAsyncFunction/asyncFunction@resource://gre/modules/Task.jsm:249:14 ************************* - try to enter 'console.profile("test")' again in the console => nothing happens - enter 'console.profileEnd("test")' in the console => the following exception is thrown: TypeError: recordingItem is null: RecordingsView<._onRecordingWillStop@chrome://browser/content/devtools/performance/views/recordings.js:153:9 EventEmitter_emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/event-emitter.js:147:11 PerformanceController._onRecordingStateChange@chrome://browser/content/devtools/performance/performance-controller.js:464:9 EventEmitter_emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/event-emitter.js:147:11 PerformanceFront/</<@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/performance/front.js:452:84 EventEmitter_emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/event-emitter.js:147:11 PerformanceActorsConnection.prototype.stopRecording<@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/performance/front.js:368:5 TaskImpl_run@resource://gre/modules/Task.jsm:314:40 TaskImpl@resource://gre/modules/Task.jsm:275:3 createAsyncFunction/asyncFunction@resource://gre/modules/Task.jsm:249:14 PerformanceActorsConnection.prototype._onConsoleProfileEnd<@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/performance/front.js:271:11 TaskImpl_run@resource://gre/modules/Task.jsm:314:40 TaskImpl@resource://gre/modules/Task.jsm:275:3 createAsyncFunction/asyncFunction@resource://gre/modules/Task.jsm:249:14 EventEmitter_emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/event-emitter.js:147:11 ProfilerFrontFacade.prototype._onProfilerEvent@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/performance/actors.js:197:9 eventSource/aProto.emit@resource://gre/modules/devtools/dbg-client.jsm:193:9 DebuggerClient.prototype.onPacket@resource://gre/modules/devtools/dbg-client.jsm:1008:7 LocalDebuggerTransport.prototype.send/<@resource://gre/modules/devtools/dbg-client.jsm -> resource://gre/modules/devtools/transport/transport.js:561:11 makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14 makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14 Of course, if you're being nice with the tool and always end your console.profiles before clearing the list, then this does not happen, but it looks like we should handle that case better. I don't think the tool should auto end the console.profile, but it should at least not throw.
Thanks for the report, Patrick -- I think I know what's up with this
Assignee: nobody → jsantell
Status: NEW → ASSIGNED
Comment on attachment 8607784 [details] [diff] [review] 1165885-console-clear.patch Review of attachment 8607784 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me!
Attachment #8607784 - Flags: review?(pbrosset) → review+
Whiteboard: [fixed-in-fx-team]
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 41
Flags: qe-verify+
Comment on attachment 8607784 [details] [diff] [review] 1165885-console-clear.patch Approval Request Comment [Feature/regressing bug #]: 1167252, the new performance tool [User impact if declined]: Won't ship the performance tool [Describe test coverage new/current, TreeHerder]: There are try pushes in Bug 1167252 with all patches needing uplift [Risks and why]: Requesting uplift for the accumulated changes in the performance tool since the 40 merge date, so these changes haven't had the full 6 weeks to bake. Risks are generally contained within devtools, specifically within the performance panel. [String/UUID change made/needed]: None
Attachment #8607784 - Flags: approval-mozilla-aurora?
Note: I had verbal confirmation for these uplifts from Sylvestre even before he's flagged them as a+. See https://bugzilla.mozilla.org/show_bug.cgi?id=1167252#c26
Comment on attachment 8607784 [details] [diff] [review] 1165885-console-clear.patch Change approved to skip one train as part of the spring campaign.
Attachment #8607784 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Verified fixed on Aurora 40.0a2 (2015-06-04), using Windows 7 (x64), Ubuntu 14.04 (x64) and Mac OS X 10.8.5. Errors are no longer thrown in the Browser Console for these scenarios. Testing was based on the steps from Comment 0.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: