Ignore:
Timestamp:
Jul 15, 2010, 9:58:30 PM (15 years ago)
Author:
[email protected]
Message:

2010-07-15 Geoffrey Garen <[email protected]>

Reviewed by Maciej Stachowiak.

Crash entering mail.yahoo.com
https://bugs.webkit.org/show_bug.cgi?id=42394


  • bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::argumentNumberFor): Added a NULL check. If the identifier we're resolving is not a local variable, registerFor returns NULL.
  • bytecompiler/NodesCodegen.cpp: (JSC::FunctionBodyNode::emitBytecode): Unrelated to the crash, but I noticed this while working on it: No need to NULL-check returnNode, since an early return has already done so.

2010-07-15 Geoffrey Garen <[email protected]>

Reviewed by Maciej Stachowiak.

Test for https://bugs.webkit.org/show_bug.cgi?id=42394
Crash entering mail.yahoo.com

  • fast/js/numeric-compare.html: Added.
  • fast/js/script-tests/numeric-compare.js: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp

    r63244 r63515  
    20522052{
    20532053    int parameterCount = m_parameters.size(); // includes 'this'
    2054     int index = registerFor(ident)->index() + RegisterFile::CallFrameHeaderSize + parameterCount;
     2054    RegisterID* registerID = registerFor(ident);
     2055    if (!registerID)
     2056        return 0;
     2057    int index = registerID->index() + RegisterFile::CallFrameHeaderSize + parameterCount;
    20552058    return (index > 0 && index < parameterCount) ? index : 0;
    20562059}
Note: See TracChangeset for help on using the changeset viewer.