jdalton/qunit-clib — Issue #3: Cannot read property "parsers" from undefined
Author: mathiasbynens
Created: 2012-02-21 12:52:04+00:00
State: open

Since updating to the latest version of the qunit-clib submodule for Punycode.js, testing under Narwhal throws errors.

The stack trace refers to this line: https://github.com/jdalton/qunit-clib/blob/4ff13811252dca88835c80e92714178321641631/qunit-clib.js#L117

Full log below.

```
$ export NARWHAL_OPTIMIZATION=-1; narwhal tests.js
org.mozilla.javascript.EcmaError: TypeError: Cannot read property "parsers" from undefined (/Users/Mathias/Projects/punycode.js/vendor/qunit-clib/qunit-clib.js#117)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3753)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3731)
at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3759)
at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3778)
at org.mozilla.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3791)
at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1487)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1399)
at script(/Users/Mathias/Projects/punycode.js/vendor/qunit-clib/qunit-clib.js:117)
at script(/Users/Mathias/Projects/punycode.js/vendor/qunit-clib/qunit-clib.js:116)
at script(/Users/Mathias/Projects/punycode.js/vendor/qunit-clib/qunit-clib.js:7)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:845)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2504)
at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:294)
at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
at org.mozilla.javascript.gen._usr_local_Cellar_narwhal_0_3_2_libexec_engines_rhino_bootstrap_js_1._c_anonymous_6(Unknown Source)
at org.mozilla.javascript.gen._usr_local_Cellar_narwhal_0_3_2_libexec_engines_rhino_bootstrap_js_1.call(Unknown Source)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1702)
at script(/usr/local/Cellar/narwhal/0.3.2/libexec/packages/narwhal-lib/lib/narwhal/sandbox.js:118)
at script(/Users/Mathias/Projects/punycode.js/tests/tests.js:4)
at script(/Users/Mathias/Projects/punycode.js/tests/tests.js:1)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:845)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2504)
at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:294)
at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
at org.mozilla.javascript.gen._usr_local_Cellar_narwhal_0_3_2_libexec_engines_rhino_bootstrap_js_1._c_anonymous_6(Unknown Source)
at org.mozilla.javascript.gen._usr_local_Cellar_narwhal_0_3_2_libexec_engines_rhino_bootstrap_js_1.call(Unknown Source)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1702)
at script(/usr/local/Cellar/narwhal/0.3.2/libexec/packages/narwhal-lib/lib/narwhal/sandbox.js:118)
at script(/usr/local/Cellar/narwhal/0.3.2/libexec/packages/narwhal-lib/lib/narwhal/sandbox.js:241)
at script.narwhal(/usr/local/Cellar/narwhal/0.3.2/libexec/narwhal.js:290)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:845)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
at org.mozilla.javascript.gen._usr_local_Cellar_narwhal_0_3_2_libexec_engines_rhino_bootstrap_js_1._c_anonymous_1(Unknown Source)
at org.mozilla.javascript.gen._usr_local_Cellar_narwhal_0_3_2_libexec_engines_rhino_bootstrap_js_1.call(Unknown Source)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
at org.mozilla.javascript.gen._usr_local_Cellar_narwhal_0_3_2_libexec_engines_rhino_bootstrap_js_1._c_script_0(Unknown Source)
at org.mozilla.javascript.gen._usr_local_Cellar_narwhal_0_3_2_libexec_engines_rhino_bootstrap_js_1.call(Unknown Source)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3157)
at org.mozilla.javascript.gen._usr_local_Cellar_narwhal_0_3_2_libexec_engines_rhino_bootstrap_js_1.call(Unknown Source)
at org.mozilla.javascript.gen._usr_local_Cellar_narwhal_0_3_2_libexec_engines_rhino_bootstrap_js_1.exec(Unknown Source)
at org.mozilla.javascript.tools.shell.Main.evaluateScript(Main.java:563)
at org.mozilla.javascript.tools.shell.Main.processFileSecure(Main.java:485)
at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:451)
at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:443)
at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:196)
at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:117)
at org.mozilla.javascript.Context.call(Context.java:521)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:535)
at org.mozilla.javascript.tools.shell.Main.exec(Main.java:179)
at org.mozilla.javascript.tools.shell.Main.main(Main.java:157)
TypeError: Cannot read property "parsers" from undefined
```

I’m not sure what changed, but it sure was working fine before.