This commit is contained in:
nightwing 2013-03-29 14:53:29 +04:00
commit cf74db8e1d
3 changed files with 6 additions and 90 deletions

View file

@ -45,16 +45,10 @@ var WorkerClient = function(topLevelNamespaces, mod, classname) {
workerUrl = config.moduleUrl(mod, "worker");
} else {
var normalizePath = this.$normalizePath;
if (typeof require.supports !== "undefined" && require.supports.indexOf("ucjs2-pinf-0") >= 0) {
// We are running in the sourcemint loader.
workerUrl = require.nameToUrl("ace/worker/worker_sourcemint");
} else {
// We are running in RequireJS.
// nameToUrl is renamed to toUrl in requirejs 2
if (require.nameToUrl && !require.toUrl)
require.toUrl = require.nameToUrl;
workerUrl = normalizePath(require.toUrl("ace/worker/worker.js", null, "_"));
}
// nameToUrl is renamed to toUrl in requirejs 2
if (require.nameToUrl && !require.toUrl)
require.toUrl = require.nameToUrl;
workerUrl = normalizePath(require.toUrl("ace/worker/worker.js", null, "_"));
var tlns = {};
topLevelNamespaces.forEach(function(ns) {