Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
JSContext Inspector: Fix asserts and uncaught exception showing Timel…
…ine Tab

https://bugs.webkit.org/show_bug.cgi?id=156411

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-04-08
Reviewed by Timothy Hatcher.

* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView):
(WebInspector.OverviewTimelineView.prototype.closed):
Gracefully handle if we do not have a Network Timeline.

* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.prototype._changeViewMode):
This function is always called by the constructor, so the assert
is not useful since it can be called when FPS is not supported.

Canonical link: https://commits.webkit.org/174509@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199241 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
JosephPecoraro authored and webkit-commit-queue committed Apr 8, 2016
1 parent 8742edd commit b296be9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
17 changes: 17 additions & 0 deletions Source/WebInspectorUI/ChangeLog
@@ -1,3 +1,20 @@
2016-04-08 Joseph Pecoraro <pecoraro@apple.com>

JSContext Inspector: Fix asserts and uncaught exception showing Timeline Tab
https://bugs.webkit.org/show_bug.cgi?id=156411

Reviewed by Timothy Hatcher.

* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView):
(WebInspector.OverviewTimelineView.prototype.closed):
Gracefully handle if we do not have a Network Timeline.

* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.prototype._changeViewMode):
This function is always called by the constructor, so the assert
is not useful since it can be called when FPS is not supported.

2016-04-08 Matt Baker <mattbaker@apple.com>

Web Inspector: Attempting to dismiss a popover that is already being dismissed causes an error
Expand Down
Expand Up @@ -54,7 +54,8 @@ WebInspector.OverviewTimelineView = class OverviewTimelineView extends WebInspec
this.addSubview(this._dataGrid);

this._networkTimeline = recording.timelines.get(WebInspector.TimelineRecord.Type.Network);
this._networkTimeline.addEventListener(WebInspector.Timeline.Event.RecordAdded, this._networkTimelineRecordAdded, this);
if (this._networkTimeline)
this._networkTimeline.addEventListener(WebInspector.Timeline.Event.RecordAdded, this._networkTimelineRecordAdded, this);

recording.addEventListener(WebInspector.TimelineRecording.Event.SourceCodeTimelineAdded, this._sourceCodeTimelineAdded, this);
recording.addEventListener(WebInspector.TimelineRecording.Event.MarkerAdded, this._markerAdded, this);
Expand Down Expand Up @@ -85,7 +86,8 @@ WebInspector.OverviewTimelineView = class OverviewTimelineView extends WebInspec

closed()
{
this._networkTimeline.removeEventListener(null, null, this);
if (this._networkTimeline)
this._networkTimeline.removeEventListener(null, null, this);
this._recording.removeEventListener(null, null, this);
}

Expand Down
Expand Up @@ -496,8 +496,6 @@ WebInspector.TimelineTabContentView = class TimelineTabContentView extends WebIn

_changeViewMode(mode, selectedByUser)
{
console.assert(WebInspector.FPSInstrument.supported());

if (this._viewMode === mode)
return;

Expand Down

0 comments on commit b296be9

Please sign in to comment.