Permalink
Browse files

catch exceptions from js_beautifier. i haven't seen it error but bett…

…er be safe than sorry
  • Loading branch information...
1 parent fbc5ef1 commit e86299730483259e7aa112f2f43400e1733e97db @benmmurphy committed Nov 23, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 chrome/content/worker.js
View
@@ -1,7 +1,13 @@
onmessage = function(event) {
var old_js = event.data.join("");
- var new_js = js_beautify(old_js, null);
+ var new_js = old_js;
+ try {
+ new_js = js_beautify(old_js, null);
+ } catch (e) {
+ // we don't have Components.utils.reportError here :(
+ }
+
postMessage(new_js);
this.close();
}

0 comments on commit e862997

Please sign in to comment.