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/NodesCodegen.cpp

    r63244 r63515  
    20372037
    20382038    // If there is a return statment, and it is the only statement in the function, check if this is a numeric compare.
    2039     if (returnNode && static_cast<BlockNode*>(singleStatement)->singleStatement()) {
     2039    if (static_cast<BlockNode*>(singleStatement)->singleStatement()) {
    20402040        ExpressionNode* returnValueExpression = returnNode->value();
    20412041        if (returnValueExpression && returnValueExpression->isSubtract()) {
Note: See TracChangeset for help on using the changeset viewer.