From 7a59e92b8d86e3aa29a3897e03551a323c03c959 Mon Sep 17 00:00:00 2001 From: Eric Vergnaud Date: Tue, 2 Feb 2016 21:01:28 +0800 Subject: [PATCH 1/2] latest version of honey-require --- runtime/JavaScript/src/lib/require.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/runtime/JavaScript/src/lib/require.js b/runtime/JavaScript/src/lib/require.js index 9a8069c35..d14210d24 100644 --- a/runtime/JavaScript/src/lib/require.js +++ b/runtime/JavaScript/src/lib/require.js @@ -62,7 +62,13 @@ // anchor element as parser in that case. Thes breaks web worker support, // but we don't care since these browsers also don't support web workers. - var parser = URL ? new URL(location.href) : document.createElement('A'); + try { + var parser = new URL(location.href); + } + catch (e) { + console.warn("Honey: falling back to DOM workaround for URL parser ("+e+")"); + parser = document.createElement('A'); + } // INFO Module cache // Contains getter functions for the exports objects of all the loaded @@ -81,7 +87,7 @@ delete cache.foo; } catch (e) { - console.warn("Honey: falling back to DOM workaround for defineProperty ("+e+")"); + console.warn("Honey: falling back to DOM workaround for cache object ("+e+")"); cache = document.createElement('DIV'); } From b0196bc86e1fb41e6f5064b4738dd52900653afc Mon Sep 17 00:00:00 2001 From: Eric Vergnaud Date: Tue, 9 Feb 2016 10:25:31 +0800 Subject: [PATCH 2/2] fixes #1108 --- runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js b/runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js index 9a262949f..b740ed92a 100644 --- a/runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js +++ b/runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js @@ -1258,10 +1258,10 @@ ParserATNSimulator.prototype.closureCheckingStopState = function(config, configs } continue; } - returnState = this.atn.states[config.context.getReturnState(i)]; - newContext = config.context.getParent(i); // "pop" return state + var returnState = this.atn.states[config.context.getReturnState(i)]; + var newContext = config.context.getParent(i); // "pop" return state var parms = {state:returnState, alt:config.alt, context:newContext, semanticContext:config.semanticContext}; - c = new ATNConfig(parms, null); + var c = new ATNConfig(parms, null); // While we have context to pop back from, we may have // gotten that context AFTER having falling off a rule. // Make sure we track that we are now out of context.