Changeset 34457 in webkit for trunk/JavaScriptCore/kjs/nodes.cpp


Ignore:
Timestamp:
Jun 8, 2008, 5:57:28 PM (17 years ago)
Author:
[email protected]
Message:

2008-06-08 Cameron Zwarich <[email protected]>

Reviewed by Darin.

Bug 19346: REGRESSION: Mootools 1.2 Class inheritance broken in post-SquirrelFish merge
<https://bugs.webkit.org/show_bug.cgi?id=19346>

A check for whether a function's caller is eval code accidentally included
the case where the caller's caller is native code. Add a CodeType field to
CodeBlock and use this for the eval caller test instead.

JavaScriptCore:

  • VM/CodeBlock.h: (KJS::CodeBlock::CodeBlock): (KJS::ProgramCodeBlock::ProgramCodeBlock): (KJS::EvalCodeBlock::EvalCodeBlock):
  • VM/Machine.cpp: (KJS::getCallerFunctionOffset):
  • kjs/nodes.cpp: (KJS::FunctionBodyNode::generateCode): (KJS::ProgramNode::generateCode):

LayoutTests:

  • fast/js/function-dot-arguments-and-caller-expected.txt:
  • fast/js/function-dot-arguments-and-caller.html:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/nodes.cpp

    r34412 r34457  
    18181818    JSGlobalObject* globalObject = scopeChain.globalObject();
    18191819
    1820     m_code.set(new CodeBlock(this));
     1820    m_code.set(new CodeBlock(this, FunctionCode));
    18211821
    18221822    CodeGenerator generator(this, globalObject->debugger(), scopeChain, &m_symbolTable, m_code.get());
     
    18541854    JSGlobalObject* globalObject = scopeChain.globalObject();
    18551855   
    1856     m_code.set(new ProgramCodeBlock(this, globalObject));
     1856    m_code.set(new ProgramCodeBlock(this, GlobalCode, globalObject));
    18571857   
    18581858    CodeGenerator generator(this, globalObject->debugger(), scopeChain, &globalObject->symbolTable(), m_code.get(), m_varStack, m_functionStack, canCreateGlobals);
Note: See TracChangeset for help on using the changeset viewer.