An issue about redefining TypeError
See original GitHub issueVersion
chakra-9e2f198
Test case
TypeError.prototype.toString = function() {
return Error;
};
var a = 1;
a();
Execution steps
./ChakraCore/out/Release/ch testcase.js
Output
Expected behavior
TypeError: a is not a function
Description
In the above test case, we redefine TypeError
, but there is an exception in the redefined function (line 2). When executing the code, since a
is not a function, TypeError
will be thrown in line 5. Other engines seem to ignore the exception when redefining TypeError
(line 2) when executing, and throw a TypeError
exception normally, but chakra didn’t . This seems to be incorrect.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12
Top Results From Across the Web
TypeError: can't redefine non-configurable property "x"
The JavaScript exception "can't redefine non-configurable property" occurs when it was attempted to redefine a property, but that property is non-configurable.
Read more >TypeError: Cannot redefine property: default #1974 - GitHub
I fixed it by keeping the package-lock in the repo. It's probably caused by conflicting dependencies. All reactions.
Read more >javascript - Street View error - Stack Overflow
We were facing the very same error string, but seen when loading just the embedded map itself. It appeared that we were redefining...
Read more >Ask Question - Salesforce Stack Exchange
Uncaught TypeError: Cannot redefine property: title throws at .../aura_prod.js (Lightning Locker) · Ask Question. Asked 6 years, 5 months ago.
Read more >Can't redefine non-configurable property "x" - GeeksforGeeks
JavaScript TypeError – Can't redefine non-configurable property “x” ... This JavaScript exception can't redefine non-configurable property occurs ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So my conclusion is chakracore functions correctly on this but
ch
’s behaviour is unhelpful We could updatech
to output something here which may make testing some fringe issues easier.I understand. Thanks for your reply.