cjohansen/Sinon.JS — pull request #491 by pwnall (2014-06-10 03:24:18+00:00)
Title: Fix loading in Web Workers.

When sinon.js is loaded via an importScript in a Web Worker, "this" is
not set to the global object. This caused an exception in
fake_xml_http_request.js, which calls XMLHttpRequest.

The change fixes the global parameter passed to the
fake_xml_http_request module and adds a missing check before the
XMLHttpRequest constructor is called.