| Index: third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js
|
| index 30316e2572210c8b439622bb56c7c1da5537444e..5b8888679ee865e76c3d34e12b5d0ea568549658 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js
|
| @@ -810,33 +810,24 @@ WebInspector.EventListener.prototype = {
|
| {
|
| if (!this._removeFunction)
|
| return Promise.resolve();
|
| - return new Promise(promiseConstructor.bind(this));
|
| -
|
| - /**
|
| - * @param {function()} success
|
| - * @this {WebInspector.EventListener}
|
| - */
|
| - function promiseConstructor(success)
|
| - {
|
| - this._removeFunction.callFunction(callCustomRemove, [
|
| - WebInspector.RemoteObject.toCallArgument(this._removeFunction),
|
| + return this._removeFunction.callFunctionPromise(callCustomRemove, [
|
| WebInspector.RemoteObject.toCallArgument(this._type),
|
| WebInspector.RemoteObject.toCallArgument(this._originalHandler),
|
| WebInspector.RemoteObject.toCallArgument(this._useCapture),
|
| WebInspector.RemoteObject.toCallArgument(this._passive),
|
| - ], success);
|
| + ]).then(() => undefined);
|
|
|
| - /**
|
| - * @param {function(string, function(), boolean, boolean)} func
|
| - * @param {string} type
|
| - * @param {function()} listener
|
| - * @param {boolean} useCapture
|
| - * @param {boolean} passive
|
| - */
|
| - function callCustomRemove(func, type, listener, useCapture, passive)
|
| - {
|
| - func.call(null, type, listener, useCapture, passive);
|
| - }
|
| + /**
|
| + * @param {string} type
|
| + * @param {function()} listener
|
| + * @param {boolean} useCapture
|
| + * @param {boolean} passive
|
| + * @this {Function}
|
| + * @suppressReceiverCheck
|
| + */
|
| + function callCustomRemove(type, listener, useCapture, passive)
|
| + {
|
| + this.call(null, type, listener, useCapture, passive);
|
| }
|
| },
|
|
|
|
|