title: simple thread code always crashes firefox extension (nsIThreadManager)
body: <p>While creating a simple thread in firefox (Aurora 30) this always crashes.
  <br/>
  All this does is execute function "task" from the thread</p>
  
  <p>any idea what's going wrong?</p>
  
  <pre><code>function task(a, b) {
      alert(a);
      alert(b);
  }
  
  thread_job = {
  
      init: function(func, param1, param2) {
          this.func = func
          this.param1 = param1
          this.param2 = param2
          alert("inside init");
      },
  
      run: function(){
          this.func(this.param1, this.param2);
      }
  }
  
  var thread = Components.classes["@mozilla.org/thread-manager;1"] // create thread
                  .getService(Components.interfaces.nsIThreadManager)
                  .newThread(0);
  
  // init the object "thread_job" to a simple function
  thread_job.init(task,1,2);
  
  //extension code 
  thread.dispatch(thread_job, thread.DISPATCH_NORMAL);//dispatch the thread
  </code></pre>