Skip to content

all chrome.tabs.sendMessage errors ignored #90

@dvisztempacct

Description

@dvisztempacct

In trying to fix a bug in reason-tools, I eventually found a page whitelist here:

let getWhitelist = () => [];

So I whitelisted the local test HTML file I had created and then, because I had stopped checking the background window console, spent a long time scratching my head and double-checking assumptions. Finally, I guessed there might be a permissions issue, and sure enough, there was.

Can't whitelist local files: "Cannot access contents of page"

I realize that this whitelist is not an end-user feature, but it would be nice if this error didn't get swallowed nearly silently into the background window console.

So I took a look at where errors were being handled:

let sendTab = (id, type_, message) => Chrome.Tabs.sendMessage(id, {type_, message}, noop);

noop certainly won't be handling any errors!

Any plans on improving this?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions