-
Notifications
You must be signed in to change notification settings - Fork 422
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error handling when injecting the sidebar
If the mini-script injected into the page to determine the content type failed to execute, the returned 'frameResults' value will be null. Unfortunately Chrome does not expose the actual exception details. Additionally, several Chrome async APIs were used without checking chrome.extension.lastError in the callback. - Handle the case where frameResults is null or not an array. - Use utils.promisify() to wrap several Chrome async APIs. This checks chrome.extension.lastError and rejects the promise if it fails.
- Loading branch information
1 parent
590b6a8
commit 2073cc1
Showing
1 changed file
with
31 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters