Commit fc11b2dc authored by Yiming Zhou's avatar Yiming Zhou Committed by Commit Bot

Convert the Action Recorder Extension code to use async functions.

Chrome extension API methods are asynchronous and use callbacks. Much of the Action Recorder Extension background script wrap Chrome Extension API methods inside functions that return promises. Prior to this change, the background script handles sequential asynchronous calls using promise chains. Promise chains are cumbersome to write and difficult to debug. This change replaces promise chains with async functions and sequential await calls.

Bug: 855284
Change-Id: Ic73608d9e6a207505f2d21a8a6005ce7418344a4
Reviewed-on: https://chromium-review.googlesource.com/1179312
Commit-Queue: Yiming Zhou <uwyiming@google.com>
Reviewed-by: default avatarJared Saul <jsaul@google.com>
Cr-Commit-Position: refs/heads/master@{#585315}
parent 2e7b930c
......@@ -523,7 +523,7 @@
if (iframe.name) {
return Promise.resolve(iframe.name);
} else {
return Promise.resolve('');
return Promise.resolve(false);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment