From 09c1cd935596517e97c77bf4e1bbdcd51f3a9125 Mon Sep 17 00:00:00 2001 From: c9jenkinsv3 Date: Thu, 22 Mar 2018 04:56:49 +0100 Subject: [PATCH] Thu Mar 22 04:56:49 CET 2018 --- build/standalone/config/default.js | 11 +-- build/standalone/modules/ace/ext/textarea.js | 2 +- build/standalone/modules/ace/mode/coffee.js | 2 +- .../standalone/modules/ace/mode/coldfusion.js | 2 +- build/standalone/modules/ace/mode/css.js | 2 +- build/standalone/modules/ace/mode/curly.js | 2 +- build/standalone/modules/ace/mode/django.js | 2 +- build/standalone/modules/ace/mode/ejs.js | 2 +- .../standalone/modules/ace/mode/gobstones.js | 2 +- build/standalone/modules/ace/mode/groovy.js | 2 +- .../standalone/modules/ace/mode/handlebars.js | 2 +- build/standalone/modules/ace/mode/html.js | 2 +- .../modules/ace/mode/html_elixir.js | 2 +- .../standalone/modules/ace/mode/html_ruby.js | 2 +- build/standalone/modules/ace/mode/java.js | 2 +- .../standalone/modules/ace/mode/javascript.js | 2 +- build/standalone/modules/ace/mode/json.js | 2 +- build/standalone/modules/ace/mode/jsoniq.js | 2 +- build/standalone/modules/ace/mode/lua.js | 2 +- build/standalone/modules/ace/mode/luapage.js | 2 +- build/standalone/modules/ace/mode/markdown.js | 2 +- build/standalone/modules/ace/mode/php.js | 2 +- build/standalone/modules/ace/mode/razor.js | 2 +- build/standalone/modules/ace/mode/rhtml.js | 2 +- build/standalone/modules/ace/mode/scala.js | 2 +- build/standalone/modules/ace/mode/sjs.js | 2 +- build/standalone/modules/ace/mode/smarty.js | 2 +- .../modules/ace/mode/soy_template.js | 2 +- build/standalone/modules/ace/mode/svg.js | 2 +- build/standalone/modules/ace/mode/tsx.js | 2 +- build/standalone/modules/ace/mode/twig.js | 2 +- .../standalone/modules/ace/mode/typescript.js | 2 +- build/standalone/modules/ace/mode/velocity.js | 2 +- build/standalone/modules/ace/mode/wollok.js | 2 +- build/standalone/modules/ace/mode/xml.js | 2 +- build/standalone/modules/ace/mode/xquery.js | 2 +- .../plugins/c9.ide.language.core/worker.js | 73 +++++++++---------- .../glob/node_modules/inherits/package.json | 3 +- lib/tern/package.json | 2 +- lib/tern_from_ts/package.json | 2 +- .../node_modules/inherits/package.json | 2 +- node_modules/nak/package.json | 2 +- .../glob/node_modules/inherits/package.json | 3 +- node_modules/tern/package.json | 2 +- node_modules/tern_from_ts/package.json | 2 +- package.json | 2 +- .../node_modules/ace/lib/ace/worker/worker.js | 15 ++++ .../ace/lib/ace/worker/worker_client.js | 2 +- version | 2 +- 49 files changed, 99 insertions(+), 94 deletions(-) diff --git a/build/standalone/config/default.js b/build/standalone/config/default.js index 2acda761..555c6a37 100644 --- a/build/standalone/config/default.js +++ b/build/standalone/config/default.js @@ -104655,7 +104655,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); @@ -105244,13 +105244,8 @@ define("plugins/c9.ide.language/language",[], function(require, exports, module) } function updateRequireConfig(modulePath, worker) { - var path = window.requirejs.toUrl(modulePath, "", true); - var url = require.toUrl(path); - if (/^\w+:/.test(url)) { - var paths = {}; - paths[path] = url; - worker.call("initBaseUrls", [paths]); - } + var config = window.requirejs.getConfig(); + worker.call("updateRequireConfig", [config]); } plugin.on("load", function() { diff --git a/build/standalone/modules/ace/ext/textarea.js b/build/standalone/modules/ace/ext/textarea.js index cbcc971c..b43b8a7b 100644 --- a/build/standalone/modules/ace/ext/textarea.js +++ b/build/standalone/modules/ace/ext/textarea.js @@ -3572,7 +3572,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/coffee.js b/build/standalone/modules/ace/mode/coffee.js index 353d5fa0..66fa4745 100644 --- a/build/standalone/modules/ace/mode/coffee.js +++ b/build/standalone/modules/ace/mode/coffee.js @@ -593,7 +593,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/coldfusion.js b/build/standalone/modules/ace/mode/coldfusion.js index 321a876c..a0fcd19c 100644 --- a/build/standalone/modules/ace/mode/coldfusion.js +++ b/build/standalone/modules/ace/mode/coldfusion.js @@ -738,7 +738,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/css.js b/build/standalone/modules/ace/mode/css.js index 4648e8f6..7756e0e5 100644 --- a/build/standalone/modules/ace/mode/css.js +++ b/build/standalone/modules/ace/mode/css.js @@ -407,7 +407,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/curly.js b/build/standalone/modules/ace/mode/curly.js index b69f0059..975beff5 100644 --- a/build/standalone/modules/ace/mode/curly.js +++ b/build/standalone/modules/ace/mode/curly.js @@ -738,7 +738,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/django.js b/build/standalone/modules/ace/mode/django.js index f46f10e1..1d1115d3 100644 --- a/build/standalone/modules/ace/mode/django.js +++ b/build/standalone/modules/ace/mode/django.js @@ -738,7 +738,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/ejs.js b/build/standalone/modules/ace/mode/ejs.js index 2b0c961f..f7261fa9 100644 --- a/build/standalone/modules/ace/mode/ejs.js +++ b/build/standalone/modules/ace/mode/ejs.js @@ -1214,7 +1214,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/gobstones.js b/build/standalone/modules/ace/mode/gobstones.js index 2dfd49f3..ab967ece 100644 --- a/build/standalone/modules/ace/mode/gobstones.js +++ b/build/standalone/modules/ace/mode/gobstones.js @@ -738,7 +738,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/groovy.js b/build/standalone/modules/ace/mode/groovy.js index c249ebdc..5d7c40d3 100644 --- a/build/standalone/modules/ace/mode/groovy.js +++ b/build/standalone/modules/ace/mode/groovy.js @@ -738,7 +738,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/handlebars.js b/build/standalone/modules/ace/mode/handlebars.js index e9744ff6..848e9f07 100644 --- a/build/standalone/modules/ace/mode/handlebars.js +++ b/build/standalone/modules/ace/mode/handlebars.js @@ -738,7 +738,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/html.js b/build/standalone/modules/ace/mode/html.js index 0eaccce8..c23db121 100644 --- a/build/standalone/modules/ace/mode/html.js +++ b/build/standalone/modules/ace/mode/html.js @@ -738,7 +738,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/html_elixir.js b/build/standalone/modules/ace/mode/html_elixir.js index 565aa5d6..0b72242f 100644 --- a/build/standalone/modules/ace/mode/html_elixir.js +++ b/build/standalone/modules/ace/mode/html_elixir.js @@ -1653,7 +1653,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/html_ruby.js b/build/standalone/modules/ace/mode/html_ruby.js index 96fb1ecd..2c38ac91 100644 --- a/build/standalone/modules/ace/mode/html_ruby.js +++ b/build/standalone/modules/ace/mode/html_ruby.js @@ -1561,7 +1561,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/java.js b/build/standalone/modules/ace/mode/java.js index bbc9bb56..ce5d1d8c 100644 --- a/build/standalone/modules/ace/mode/java.js +++ b/build/standalone/modules/ace/mode/java.js @@ -738,7 +738,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/javascript.js b/build/standalone/modules/ace/mode/javascript.js index 850a80dc..82d9577e 100644 --- a/build/standalone/modules/ace/mode/javascript.js +++ b/build/standalone/modules/ace/mode/javascript.js @@ -738,7 +738,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/json.js b/build/standalone/modules/ace/mode/json.js index 6d247476..2b4e2e4a 100644 --- a/build/standalone/modules/ace/mode/json.js +++ b/build/standalone/modules/ace/mode/json.js @@ -521,7 +521,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/jsoniq.js b/build/standalone/modules/ace/mode/jsoniq.js index 5943ee84..011b4be1 100644 --- a/build/standalone/modules/ace/mode/jsoniq.js +++ b/build/standalone/modules/ace/mode/jsoniq.js @@ -176,7 +176,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/lua.js b/build/standalone/modules/ace/mode/lua.js index 817dcc05..fb74dca5 100644 --- a/build/standalone/modules/ace/mode/lua.js +++ b/build/standalone/modules/ace/mode/lua.js @@ -558,7 +558,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/luapage.js b/build/standalone/modules/ace/mode/luapage.js index 1fa5780c..52d13510 100644 --- a/build/standalone/modules/ace/mode/luapage.js +++ b/build/standalone/modules/ace/mode/luapage.js @@ -738,7 +738,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/markdown.js b/build/standalone/modules/ace/mode/markdown.js index 1726690b..cc570115 100644 --- a/build/standalone/modules/ace/mode/markdown.js +++ b/build/standalone/modules/ace/mode/markdown.js @@ -738,7 +738,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/php.js b/build/standalone/modules/ace/mode/php.js index d0f18de4..8604cf7f 100644 --- a/build/standalone/modules/ace/mode/php.js +++ b/build/standalone/modules/ace/mode/php.js @@ -2273,7 +2273,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/razor.js b/build/standalone/modules/ace/mode/razor.js index b4c212e8..69660696 100644 --- a/build/standalone/modules/ace/mode/razor.js +++ b/build/standalone/modules/ace/mode/razor.js @@ -738,7 +738,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/rhtml.js b/build/standalone/modules/ace/mode/rhtml.js index 5850b368..86a5b307 100644 --- a/build/standalone/modules/ace/mode/rhtml.js +++ b/build/standalone/modules/ace/mode/rhtml.js @@ -738,7 +738,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/scala.js b/build/standalone/modules/ace/mode/scala.js index af739ea9..7f91b390 100644 --- a/build/standalone/modules/ace/mode/scala.js +++ b/build/standalone/modules/ace/mode/scala.js @@ -738,7 +738,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/sjs.js b/build/standalone/modules/ace/mode/sjs.js index 0c1b8fec..ccfc4587 100644 --- a/build/standalone/modules/ace/mode/sjs.js +++ b/build/standalone/modules/ace/mode/sjs.js @@ -738,7 +738,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/smarty.js b/build/standalone/modules/ace/mode/smarty.js index 3072a0d6..5cd4c0c6 100644 --- a/build/standalone/modules/ace/mode/smarty.js +++ b/build/standalone/modules/ace/mode/smarty.js @@ -738,7 +738,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/soy_template.js b/build/standalone/modules/ace/mode/soy_template.js index ac5810b8..b7baca5d 100644 --- a/build/standalone/modules/ace/mode/soy_template.js +++ b/build/standalone/modules/ace/mode/soy_template.js @@ -738,7 +738,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/svg.js b/build/standalone/modules/ace/mode/svg.js index 8a270dbd..001099b3 100644 --- a/build/standalone/modules/ace/mode/svg.js +++ b/build/standalone/modules/ace/mode/svg.js @@ -889,7 +889,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/tsx.js b/build/standalone/modules/ace/mode/tsx.js index ac879642..18d8012c 100644 --- a/build/standalone/modules/ace/mode/tsx.js +++ b/build/standalone/modules/ace/mode/tsx.js @@ -738,7 +738,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/twig.js b/build/standalone/modules/ace/mode/twig.js index 8c2e1cdd..d96efc7a 100644 --- a/build/standalone/modules/ace/mode/twig.js +++ b/build/standalone/modules/ace/mode/twig.js @@ -738,7 +738,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/typescript.js b/build/standalone/modules/ace/mode/typescript.js index 6d56a5bf..21c4e8d6 100644 --- a/build/standalone/modules/ace/mode/typescript.js +++ b/build/standalone/modules/ace/mode/typescript.js @@ -738,7 +738,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/velocity.js b/build/standalone/modules/ace/mode/velocity.js index fc15f973..1d6db9b5 100644 --- a/build/standalone/modules/ace/mode/velocity.js +++ b/build/standalone/modules/ace/mode/velocity.js @@ -738,7 +738,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/wollok.js b/build/standalone/modules/ace/mode/wollok.js index 838ee090..643aadc6 100644 --- a/build/standalone/modules/ace/mode/wollok.js +++ b/build/standalone/modules/ace/mode/wollok.js @@ -738,7 +738,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/xml.js b/build/standalone/modules/ace/mode/xml.js index d803f4c7..1a36c11a 100644 --- a/build/standalone/modules/ace/mode/xml.js +++ b/build/standalone/modules/ace/mode/xml.js @@ -889,7 +889,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/modules/ace/mode/xquery.js b/build/standalone/modules/ace/mode/xquery.js index 6698e757..02cd049b 100644 --- a/build/standalone/modules/ace/mode/xquery.js +++ b/build/standalone/modules/ace/mode/xquery.js @@ -176,7 +176,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/build/standalone/worker/plugins/c9.ide.language.core/worker.js b/build/standalone/worker/plugins/c9.ide.language.core/worker.js index 939a36df..d7cea62f 100644 --- a/build/standalone/worker/plugins/c9.ide.language.core/worker.js +++ b/build/standalone/worker/plugins/c9.ide.language.core/worker.js @@ -18,6 +18,17 @@ if (!window.console) { window.window = window; window.ace = window; +window.onerror = function(message, file, line, col, err) { + postMessage({type: "error", data: { + message: message, + data: err.data, + file: file, + line: line, + col: col, + stack: err.stack + }}); +}; + window.initSender = function initSender() { var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter; @@ -53,6 +64,10 @@ window.initSender = function initSender() { var main = window.main = null; var sender = window.sender = null; +window.updateRequireConfig = function(config) { + window.require.config(config); +}; + window.onmessage = function(e) { var msg = e.data; if (msg.event && sender) { @@ -10615,29 +10630,18 @@ function endTime(t, message, indent) { throw e; } } - var handler; - try { - handler = require(path); - if (!handler) - throw new Error("Unable to load required module: " + path); - } catch (e) { - if (isInWebWorker) { - console.error("Could not load language handler " + path + ": " + e); - _self.sender.emit("registered", { path: path, err: e.message }); - callback && callback(e); - throw e; + require([path], function(handler) { + if (!handler) { + _self.sender.emit("registered", { path: path, err: "Could not load" }); + callback && callback("Could not load"); + throw new Error("Could not load language handler " + path); } - require([path], function(handler) { - if (!handler) { - _self.sender.emit("registered", { path: path, err: "Could not load" }); - callback && callback("Could not load"); - throw new Error("Could not load language handler " + path); - } - onRegistered(handler); - }); - return; - } - onRegistered(handler); + onRegistered(handler); + }, function(e) { + console.error("Could not load language handler " + path + ": " + e); + _self.sender.emit("registered", { path: path, err: e.message }); + callback && callback(e); + }); }; this.$createEmitter = function(path) { @@ -10663,11 +10667,11 @@ function endTime(t, message, indent) { }; this.unregister = function(modulePath, callback) { - if (window.require) - window.require.modules[modulePath] = null; this.handlers = this.handlers.filter(function(h) { return h.$source !== modulePath; }); + if (window.require) + window.require.undef(modulePath, true); callback && callback(); }; @@ -15114,21 +15118,14 @@ worker.loadPlugin = function(modulePath, contents, callback) { return callback("Could not load language handler " + modulePath + ": " + e); } } - var handler; - try { - handler = require(modulePath); + + require([modulePath], function(handler) { if (!handler) - throw new Error("Unable to load required module: " + modulePath); - } catch (e) { - if (isInWebWorker) - return callback("Could not load language handler " + modulePath + ": " + e); - return require([modulePath], function(handler) { - if (!handler) - return callback("Could not load language handler " + modulePath); - callback(null, handler); - }); - } - callback(null, handler); + return callback("Could not load language handler " + modulePath); + callback(null, handler); + }, function(err) { + callback(err); + }); }; worker.handlesLanguage = function(language, part) { diff --git a/lib/tern/node_modules/glob/node_modules/inherits/package.json b/lib/tern/node_modules/glob/node_modules/inherits/package.json index ecb5a350..fd63bd6d 100644 --- a/lib/tern/node_modules/glob/node_modules/inherits/package.json +++ b/lib/tern/node_modules/glob/node_modules/inherits/package.json @@ -58,6 +58,5 @@ "tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" } diff --git a/lib/tern/package.json b/lib/tern/package.json index 498a4178..2be24fdc 100644 --- a/lib/tern/package.json +++ b/lib/tern/package.json @@ -248,7 +248,7 @@ }, "homepage": "https://github.com/ternjs/tern#readme", "_id": "tern@0.16.1", - "_shasum": "c70e3d1aee6a22c539c4733d9ca9f7ea8c83a2a5", + "_shasum": "37530ed600eee84bad9d5f894206e032f09fdb2e", "_from": "git+https://github.com/cloud9ide/tern.git#39015d544d4c00c7899fea4c95c2e5bc2720e68e", "_resolved": "git+https://github.com/cloud9ide/tern.git#39015d544d4c00c7899fea4c95c2e5bc2720e68e" } diff --git a/lib/tern_from_ts/package.json b/lib/tern_from_ts/package.json index 0737bd55..83a0ce88 100644 --- a/lib/tern_from_ts/package.json +++ b/lib/tern_from_ts/package.json @@ -20,7 +20,7 @@ "readme": "# tern_from_ts\n\nTern signatures extracted from typescript signatures.\n\nLicense: MIT\n\nSee also https://github.com/marijnh/tern and https://github.com/borisyankov/DefinitelyTyped\n", "readmeFilename": "README.md", "_id": "tern_from_ts@0.0.1", - "_shasum": "bc0ac28960a201c500f57003c9507d929d48c366", + "_shasum": "10ae5479694bf3e02e121a65b7fea3e6981df0b7", "_from": "git+https://github.com/cloud9ide/tern_from_ts.git#66df507986bbdd63f3bc4f0c53edb39169ce4f1c", "_resolved": "git+https://github.com/cloud9ide/tern_from_ts.git#66df507986bbdd63f3bc4f0c53edb39169ce4f1c" } diff --git a/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/inherits/package.json b/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/inherits/package.json index f0e62d3c..fd63bd6d 100644 --- a/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/inherits/package.json +++ b/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/inherits/package.json @@ -36,7 +36,7 @@ "homepage": "https://github.com/isaacs/inherits#readme", "_id": "inherits@2.0.3", "_shasum": "633c2c83e3da42a502f52466022480f4208261de", - "_from": "inherits@>=2.0.1 <2.1.0", + "_from": "inherits@>=2.0.0 <3.0.0", "_npmVersion": "3.10.7", "_nodeVersion": "6.5.0", "_npmUser": { diff --git a/node_modules/nak/package.json b/node_modules/nak/package.json index 43f056b5..693b31f6 100644 --- a/node_modules/nak/package.json +++ b/node_modules/nak/package.json @@ -52,7 +52,7 @@ }, "homepage": "https://github.com/gjtorikian/nak#readme", "_id": "nak@0.3.3", - "_shasum": "8ec4253160635cd6f3b39970b7d7e6ca85cbd26b", + "_shasum": "d62ee39ee75e83b237e5afb42439bfe2a8023cf8", "_from": "git+https://github.com/cloud9ide/nak.git#6deef931594", "_resolved": "git+https://github.com/cloud9ide/nak.git#6deef931594787edd167040f7352e3e7533430e4" } diff --git a/node_modules/tern/node_modules/glob/node_modules/inherits/package.json b/node_modules/tern/node_modules/glob/node_modules/inherits/package.json index ecb5a350..fd63bd6d 100644 --- a/node_modules/tern/node_modules/glob/node_modules/inherits/package.json +++ b/node_modules/tern/node_modules/glob/node_modules/inherits/package.json @@ -58,6 +58,5 @@ "tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" } diff --git a/node_modules/tern/package.json b/node_modules/tern/package.json index 498a4178..2be24fdc 100644 --- a/node_modules/tern/package.json +++ b/node_modules/tern/package.json @@ -248,7 +248,7 @@ }, "homepage": "https://github.com/ternjs/tern#readme", "_id": "tern@0.16.1", - "_shasum": "c70e3d1aee6a22c539c4733d9ca9f7ea8c83a2a5", + "_shasum": "37530ed600eee84bad9d5f894206e032f09fdb2e", "_from": "git+https://github.com/cloud9ide/tern.git#39015d544d4c00c7899fea4c95c2e5bc2720e68e", "_resolved": "git+https://github.com/cloud9ide/tern.git#39015d544d4c00c7899fea4c95c2e5bc2720e68e" } diff --git a/node_modules/tern_from_ts/package.json b/node_modules/tern_from_ts/package.json index 0737bd55..83a0ce88 100644 --- a/node_modules/tern_from_ts/package.json +++ b/node_modules/tern_from_ts/package.json @@ -20,7 +20,7 @@ "readme": "# tern_from_ts\n\nTern signatures extracted from typescript signatures.\n\nLicense: MIT\n\nSee also https://github.com/marijnh/tern and https://github.com/borisyankov/DefinitelyTyped\n", "readmeFilename": "README.md", "_id": "tern_from_ts@0.0.1", - "_shasum": "bc0ac28960a201c500f57003c9507d929d48c366", + "_shasum": "10ae5479694bf3e02e121a65b7fea3e6981df0b7", "_from": "git+https://github.com/cloud9ide/tern_from_ts.git#66df507986bbdd63f3bc4f0c53edb39169ce4f1c", "_resolved": "git+https://github.com/cloud9ide/tern_from_ts.git#66df507986bbdd63f3bc4f0c53edb39169ce4f1c" } diff --git a/package.json b/package.json index 0cb975b9..1c169951 100644 --- a/package.json +++ b/package.json @@ -49,5 +49,5 @@ }, "devDependencies": {}, "licenses": [], - "revision": "131091a73f77b55ce93a89493dc78ac5b6910386" + "revision": "904c80f4e91fd72c1cf7b21be617dbfb9fc3161e" } diff --git a/plugins/node_modules/ace/lib/ace/worker/worker.js b/plugins/node_modules/ace/lib/ace/worker/worker.js index 1557956b..7c0f39a8 100644 --- a/plugins/node_modules/ace/lib/ace/worker/worker.js +++ b/plugins/node_modules/ace/lib/ace/worker/worker.js @@ -18,6 +18,17 @@ if (!window.console) { window.window = window; window.ace = window; +window.onerror = function(message, file, line, col, err) { + postMessage({type: "error", data: { + message: message, + data: err.data, + file: file, + line: line, + col: col, + stack: err.stack + }}); +}; + window.initSender = function initSender() { var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter; @@ -53,6 +64,10 @@ window.initSender = function initSender() { var main = window.main = null; var sender = window.sender = null; +window.updateRequireConfig = function(config) { + window.require.config(config); +}; + window.onmessage = function(e) { var msg = e.data; if (msg.event && sender) { diff --git a/plugins/node_modules/ace/lib/ace/worker/worker_client.js b/plugins/node_modules/ace/lib/ace/worker/worker_client.js index 84d05b87..7df8f01b 100644 --- a/plugins/node_modules/ace/lib/ace/worker/worker_client.js +++ b/plugins/node_modules/ace/lib/ace/worker/worker_client.js @@ -213,7 +213,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { var processNext = function() { var msg = _self.messageBuffer.shift(); - if (msg.command) + if (msg.command && main[msg.command]) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); diff --git a/version b/version index fa45af00..dc99d9c9 100644 --- a/version +++ b/version @@ -1 +1 @@ -1521604590 +1521691005