Require config when task shell starts

Config adds to the require paths so it needs to be required
before the handler starts so that web worker handlers have the
same require semantics as the main window.
This commit is contained in:
Kevin Sawicki
2013-01-29 10:28:55 -08:00
parent b675e5b4ba
commit 9b4d570989

View File

@@ -20,8 +20,10 @@ self.callTaskMethod = (method, args...) ->
# The worker's initial handler replaces itself when `start` is invoked
self.handler =
start: ({resourcePath, requirePath, handlerPath}) ->
self.resourcePath = resourcePath
window.resourcePath = resourcePath
importScripts(requirePath)
require 'config'
self.handler = require(handlerPath)
callTaskMethod 'started'