| Index: third_party/WebKit/Source/devtools/front_end/profiler/ProfilesPanel.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/profiler/ProfilesPanel.js b/third_party/WebKit/Source/devtools/front_end/profiler/ProfilesPanel.js
|
| index 739d9bdbd6af34bfc4154ae4d5c10dcdce485123..d30c0f9054a8fa68232cf5100f2ec63c15272683 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/profiler/ProfilesPanel.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/profiler/ProfilesPanel.js
|
| @@ -431,6 +431,9 @@ Profiler.ProfilesPanel = class extends UI.PanelWithSidebar {
|
| this.clearResultsButton = new UI.ToolbarButton(Common.UIString('Clear all profiles'), 'largeicon-clear');
|
| this.clearResultsButton.addEventListener('click', this._reset, this);
|
| toolbar.appendToolbarItem(this.clearResultsButton);
|
| + toolbar.appendSeparator();
|
| + toolbar.appendToolbarItem(
|
| + /** @type {!UI.ToolbarItem} */ (UI.Toolbar.createActionButtonForId('profiler.collect-garbage')));
|
|
|
| this._profileTypeToolbar = new UI.Toolbar('', this._toolbarElement);
|
| this._profileViewToolbar = new UI.Toolbar('', this._toolbarElement);
|
| @@ -1260,3 +1263,21 @@ Profiler.ProfilesPanel.RecordActionDelegate = class {
|
| return true;
|
| }
|
| };
|
| +
|
| +/**
|
| + * @implements {UI.ActionDelegate}
|
| + * @unrestricted
|
| + */
|
| +Profiler.ProfilesPanel.GCActionDelegate = class {
|
| + /**
|
| + * @override
|
| + * @param {!UI.Context} context
|
| + * @param {string} actionId
|
| + * @return {boolean}
|
| + */
|
| + handleAction(context, actionId) {
|
| + for (var target of SDK.targetManager.targets())
|
| + target.heapProfilerAgent().collectGarbage();
|
| + return true;
|
| + }
|
| +};
|
|
|