Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #3011 from mozilla-services/2955-startup-errors
Browse files Browse the repository at this point in the history
2955 startup errors
  • Loading branch information
ianb authored Jun 12, 2017
2 parents 7cfe335 + 9db01b7 commit 4cbc17c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
16 changes: 10 additions & 6 deletions addon/webextension/background/senderror.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

"use strict";

const startTime = Date.now();

this.senderror = (function() {
let exports = {};

Expand Down Expand Up @@ -73,12 +75,14 @@ this.senderror = (function() {
message = error.message;
}
}
browser.notifications.create(id, {
type: "basic",
// FIXME: need iconUrl for an image, see #2239
title,
message
});
if (Date.now() - startTime > 5 * 1000) {
browser.notifications.create(id, {
type: "basic",
// FIXME: need iconUrl for an image, see #2239
title,
message
});
}
};

exports.reportError = function(e) {
Expand Down
3 changes: 1 addition & 2 deletions addon/webextension/manifest.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
"catcher.js",
"selector/callBackground.js",
"sitehelper.js"
],
"run_at": "document_start"
]
}
],
"web_accessible_resources": [
Expand Down

0 comments on commit 4cbc17c

Please sign in to comment.