Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/platform/utilities.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/platform/utilities.js b/third_party/WebKit/Source/devtools/front_end/platform/utilities.js |
| index 1edf9b970a48ff10343a6efb4712211a02eae093..9c1413b14de30afac067a9ccff5de744e3af35a2 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/platform/utilities.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/platform/utilities.js |
| @@ -1367,7 +1367,8 @@ function suppressUnused(value) { |
| * @return {number} |
| */ |
| self.setImmediate = function(callback) { |
|
PhistucK
2017/01/07 11:29:29
Why not callback, ...args?
It removes the need for
|
| - Promise.resolve().then(callback); |
| + const args = [...arguments].slice(1); |
| + Promise.resolve().then(() => callback(...args)); |
| return 0; |
| }; |