summaryrefslogtreecommitdiffstats
path: root/dom/push/test/error_worker.js
blob: a50f838045b9b63102c8828e088559419741fbe7 (plain)
1
2
3
4
5
6
7
8
9
10
this.onpush = function(event) {
  var request = event.data.json();
  if (request.type == "exception") {
    throw new Error("Uncaught exception");
  }
  if (request.type == "rejection") {
    event.waitUntil(Promise.reject(
      new Error("Unhandled rejection")));
  }
};