alankligman/gladius — Issue #69: Minification process breaks the thread pool
Author: alankligman
Created: 2011-11-30 17:08:12+00:00
State: open

In the code below, the function name `__thread` has been minified down to `c`:

```javascript
function c(a) {
var b = {log: function () {var a = Array.prototype.slice.call(arguments).join(" ");f("__log", {log: a});}}, c = function (a, b) {}, d = {}, e = function (a, b) {c(a.name || b);var e = a.name || b;d[e] = a;}, f = function (b, c) {c = c || {}, self.postMessage({method: b, thread: a, request: c});};
self.onmessage = function (a) {var c = a.data;d[c.method] ? d[c.method](c.request) : b.log("ignoring unknown method " + c.method + " from thread");}, self.onerror = function (a) {};
var g = function (a) {var d = new Function(["console", "assert", "parameters"], "var f = " + a.callable + "; return f.apply( null, parameters );"), e = d.apply(null, [b, c, a.parameters]);f("__result", {result: e}), f("__ready");};
e(g);
var h = function (a) {_id = a.id;};
e(h), f("__ready");
}__thread('D6DF818B-ACBB-47EF-8923-F15D3662D74B');
````

The thread pool fails when this function is called.