calling methods off super in a class constructor should check for TDZ
https://bugs.webkit.org/show_bug.cgi?id=154060
Reviewed by Ryosuke Niwa.
In a class constructor we need to check for TDZ when calling a method
off the super class. This is because, for super method calls, we use
the derived class's newly constructed object as the super method's
this value.
* bytecompiler/NodesCodegen.cpp:
(JSC::FunctionCallDotNode::emitBytecode):
* tests/stress/super-method-calls-check-tdz.js: Added.
(Base):
(Derived):
(test):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@196361 268f45cc-cd09-0410-ab3c-d52691b4dbfc
3 files changed