Ignore:
Timestamp:
May 23, 2008, 3:43:08 AM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2008-05-23 Maciej Stachowiak <[email protected]>

Reviewed by Oliver.


  • fixed <rdar://problem/5957662> REGRESSION(r33943-r33980): Can't send email , attach file or save as draft from hotmail.com
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::CodeGenerator): Delete any existing properties before creating the function (this should really be done at execution time not codegen time).

LayoutTests:

2008-05-23 Maciej Stachowiak <[email protected]>

Reviewed by Oliver.


  • test case <rdar://problem/5957662> REGRESSION(r33943-r33980): Can't send email , attach file or save as draft from hotmail.com
  • fast/js/function-redefinition-expected.txt: Added.
  • fast/js/function-redefinition.html: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/VM/CodeGenerator.cpp

    r34032 r34073  
    207207        for (size_t i = 0; i < functionStack.size(); ++i) {
    208208            FuncDeclNode* funcDecl = functionStack[i];
     209            if (globalObject->hasProperty(exec, funcDecl->m_ident) || symbolTable->contains(funcDecl->m_ident.ustring().rep())) {
     210                globalObject->putWithAttributes(exec, funcDecl->m_ident, jsUndefined(), 0);
     211                globalObject->deleteProperty(exec, funcDecl->m_ident);
     212            }
    209213            emitNewFunction(addVar(funcDecl->m_ident, false), funcDecl);
    210214        }
Note: See TracChangeset for help on using the changeset viewer.