Ignore:
Timestamp:
Aug 8, 2008, 8:56:46 PM (17 years ago)
Author:
[email protected]
Message:

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

Reviewed by Oliver.

Bug 20330: JSCore crash loading any filehurricane media page
<https://bugs.webkit.org/show_bug.cgi?id=20330>

Fix a typo in the constant loading patch. Also, add a case for
op_unexpected_load to CodeBlock::dump().

JavaScriptCore:

  • VM/CodeBlock.cpp: (KJS::CodeBlock::dump):
  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::addUnexpectedConstant):

LayoutTests:

  • fast/js/resources/unexpected-constant-crash.js: Added.
  • fast/js/unexpected-constant-crash-expected.txt: Added.
  • fast/js/unexpected-constant-crash.html: Added.
File:
1 edited

Legend:

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

    r35593 r35651  
    260260    int location = it - begin;
    261261    switch (exec->machine()->getOpcodeID(it->u.opcode)) {
     262        case op_unexpected_load: {
     263            int r0 = (++it)->u.operand;
     264            int k0 = (++it)->u.operand;
     265            printf("[%4d] unexpected_load\t %s, %s\n", location, registerName(r0).c_str(), constantName(exec, k0, unexpectedConstants[k0]).c_str());
     266            break;
     267        }
    262268        case op_new_object: {
    263269            int r0 = (++it)->u.operand;
Note: See TracChangeset for help on using the changeset viewer.