Title: [172766] branches/safari-600.1-branch/Source/WebInspectorUI
- Revision
- 172766
- Author
- [email protected]
- Date
- 2014-08-19 15:25:00 -0700 (Tue, 19 Aug 2014)
Log Message
Merged r172606. <rdar://problem/18022467>
Modified Paths
Diff
Modified: branches/safari-600.1-branch/Source/WebInspectorUI/ChangeLog (172765 => 172766)
--- branches/safari-600.1-branch/Source/WebInspectorUI/ChangeLog 2014-08-19 22:18:32 UTC (rev 172765)
+++ branches/safari-600.1-branch/Source/WebInspectorUI/ChangeLog 2014-08-19 22:25:00 UTC (rev 172766)
@@ -1,5 +1,22 @@
2014-08-19 Dana Burkart <[email protected]>
+ Merge r172606
+
+ 2014-08-14 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Avoid re-binding the same function over and over
+ https://bugs.webkit.org/show_bug.cgi?id=135949
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Controllers/TimelineManager.js:
+ (WebInspector.TimelineManager.prototype._startAutoCapturing):
+ (WebInspector.TimelineManager.prototype._stopAutoRecordingSoon):
+ (WebInspector.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
+ Stash a bound copy of the function once, and reuse it.
+
+2014-08-19 Dana Burkart <[email protected]>
+
Merge r172601
2014-08-14 Joseph Pecoraro <[email protected]>
Modified: branches/safari-600.1-branch/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js (172765 => 172766)
--- branches/safari-600.1-branch/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js 2014-08-19 22:18:32 UTC (rev 172765)
+++ branches/safari-600.1-branch/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js 2014-08-19 22:25:00 UTC (rev 172766)
@@ -33,6 +33,8 @@
this._activeRecording = new WebInspector.TimelineRecording;
this._isCapturing = false;
+
+ this._boundStopCapturing = this.stopCapturing.bind(this);
};
WebInspector.TimelineManager.Event = {
@@ -413,7 +415,7 @@
if (this._stopCapturingTimeout)
clearTimeout(this._stopCapturingTimeout);
- this._stopCapturingTimeout = setTimeout(this.stopCapturing.bind(this), WebInspector.TimelineManager.MaximumAutoRecordDuration);
+ this._stopCapturingTimeout = setTimeout(this._boundStopCapturing, WebInspector.TimelineManager.MaximumAutoRecordDuration);
return true;
},
@@ -426,7 +428,7 @@
if (this._stopCapturingTimeout)
clearTimeout(this._stopCapturingTimeout);
- this._stopCapturingTimeout = setTimeout(this.stopCapturing.bind(this), WebInspector.TimelineManager.MaximumAutoRecordDurationAfterLoadEvent);
+ this._stopCapturingTimeout = setTimeout(this._boundStopCapturing, WebInspector.TimelineManager.MaximumAutoRecordDurationAfterLoadEvent);
},
_resetAutoRecordingDeadTimeTimeout: function()
@@ -437,7 +439,7 @@
if (this._deadTimeTimeout)
clearTimeout(this._deadTimeTimeout);
- this._deadTimeTimeout = setTimeout(this.stopCapturing.bind(this), WebInspector.TimelineManager.DeadTimeRequiredToStopAutoRecordingEarly);
+ this._deadTimeTimeout = setTimeout(this._boundStopCapturing, WebInspector.TimelineManager.DeadTimeRequiredToStopAutoRecordingEarly);
},
_mainResourceDidChange: function(event)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes