Skip to content

Commit

Permalink
core(devtools-model): fix missing Runtime.experiments object (#3514)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish authored Oct 9, 2017
1 parent 87c3acf commit b98e8a3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lighthouse-core/lib/traces/devtools-timeline-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,14 @@ class TimelineModel {
// populate with events
this._tracingModel.reset();

ConsoleQuieter.mute({prefix: 'timelineModel'});
this._tracingModel.addEvents(events);
this._tracingModel.tracingComplete();
this._timelineModel.setEvents(this._tracingModel);
ConsoleQuieter.unmuteAndFlush();
try {
ConsoleQuieter.mute({prefix: 'timelineModel'});
this._tracingModel.addEvents(events);
this._tracingModel.tracingComplete();
this._timelineModel.setEvents(this._tracingModel);
} finally {
ConsoleQuieter.unmuteAndFlush();
}

return this;
}
Expand Down
4 changes: 4 additions & 0 deletions lighthouse-core/lib/web-inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ module.exports = (function() {

global.Runtime = global.Runtime || {};

// Required for devtools-timeline-model
global.Runtime.experiments = global.Runtime.experiments || {};
global.Runtime.experiments.isEnabled = global.Runtime.experiments.isEnabled || (_ => false);

const _queryParam = global.Runtime.queryParam;
global.Runtime.queryParam = function(arg) {
switch (arg) {
Expand Down

0 comments on commit b98e8a3

Please sign in to comment.