2010-10-18  Oliver Hunt  <oliver@apple.com>

        Reviewed by Darin Adler.

        Strict mode: |this| should be undefined if it is not explicitly provided
        https://bugs.webkit.org/show_bug.cgi?id=47833

        To make strict mode behave correctly we want to pass undefined instead of null
        as the default this value.  This has no impact on behaviour outside of strict
        mode as both values are replaced with the global object if necessary.

        * bytecompiler/NodesCodegen.cpp:
        (JSC::FunctionCallValueNode::emitBytecode):
        (JSC::FunctionCallResolveNode::emitBytecode):
        (JSC::CallFunctionCallDotNode::emitBytecode):
        (JSC::ApplyFunctionCallDotNode::emitBytecode):

2010-10-18  Oliver Hunt  <oliver@apple.com>

        Reviewed by Darin Adler.

        Strict mode: |this| should be undefined if it is not explicitly provided
        https://bugs.webkit.org/show_bug.cgi?id=47833

        Add tests to ensure that |this| is undefined rather than null when it has
        not been explicitly provided.

        * fast/js/basic-strict-mode-expected.txt:
        * fast/js/script-tests/basic-strict-mode.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
5 files changed