-
Notifications
You must be signed in to change notification settings - Fork 857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use core-js will throw error #346
Comments
A version of Rhino or a stand-alone script or command-line would make this
easier to figure out. Thanks.
…On Sat, Oct 14, 2017 at 9:57 AM, Janry ***@***.***> wrote:
this is core-js iobject
<https://github.com/zloirock/core-js/blob/master/modules/_iobject.js>
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
return cof(it) == 'String' ? it.split('') : Object(it);
};
Exception in thread "main" org.mozilla.javascript.EvaluatorException: Property 0 not found. (mozilla#9862)
at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:77)
at org.mozilla.javascript.Context.reportRuntimeError(Context.java:980)
at org.mozilla.javascript.Context.reportRuntimeError(Context.java:1035)
at org.mozilla.javascript.Context.reportRuntimeError1(Context.java:998)
at org.mozilla.javascript.ScriptableObject.findAttributeSlot(ScriptableObject.java:2922)
at org.mozilla.javascript.ScriptableObject.getAttributes(ScriptableObject.java:764)
at org.mozilla.javascript.NativeObject.execIdCall(NativeObject.java:189)
at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:101)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1479)
at script(mozilla:9862)
at script.__webpack_require__(mozilla:30)
at script(mozilla:1900)
at script.__webpack_require__(mozilla:30)
at script(mozilla:19927)
at script.__webpack_require__(mozilla:30)
at script(mozilla:3570)
at script.__webpack_require__(mozilla:30)
at script(mozilla:39407)
at script.__webpack_require__(mozilla:30)
at script(mozilla:39397)
at script.__webpack_require__(mozilla:30)
at script(mozilla:39386)
at script.__webpack_require__(mozilla:30)
at script(mozilla:348)
at script.__webpack_require__(mozilla:30)
at script(mozilla:39356)
at script.__webpack_require__(mozilla:30)
at script(mozilla:73)
at script(mozilla:11)
at script.webpackUniversalModuleDefinition(mozilla:9)
at script(mozilla:1)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:399)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3452)
at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:120)
at org.mozilla.javascript.Context.evaluateReader(Context.java:1275)
at com.alibaba.relim.App.invokeJsWithFile(App.java:24)
at com.alibaba.relim.App.main(App.java:13)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#346>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAf0a6997bqGjsz9oluG-7EUXuvvUev9ks5ssOf4gaJpZM4P5c16>
.
|
The crux of the issue is that Source: https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable The offending code is here in NativeObject. It seems to assume that if the If I manually patch core-js by replacing the offending expression with |
I wonder if maybe this is a bug in NativeString? It seems that if "has" returns true that "getAttributes" should not throw. (And if so, I wonder how many other subclasses need a similar fix?) |
Running |
Sounds like this is OK to close. |
this is my code
this is core-js iobject
The text was updated successfully, but these errors were encountered: