Changeset 35651 in webkit for trunk/JavaScriptCore


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.
Location:
trunk/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r35644 r35651  
     12008-08-08  Cameron Zwarich  <[email protected]>
     2
     3        Reviewed by Oliver.
     4
     5        Bug 20330: JSCore crash loading any filehurricane media page
     6        <https://bugs.webkit.org/show_bug.cgi?id=20330>
     7
     8        Fix a typo in the constant loading patch. Also, add a case for
     9        op_unexpected_load to CodeBlock::dump().
     10
     11        * VM/CodeBlock.cpp:
     12        (KJS::CodeBlock::dump):
     13        * VM/CodeGenerator.cpp:
     14        (KJS::CodeGenerator::addUnexpectedConstant):
     15
    1162008-08-08  Matt Lilek  <[email protected]>
    217
  • 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;
  • trunk/JavaScriptCore/VM/CodeGenerator.cpp

    r35593 r35651  
    541541unsigned CodeGenerator::addUnexpectedConstant(JSValue* v)
    542542{
    543     int index = m_codeBlock->regexps.size();
     543    int index = m_codeBlock->unexpectedConstants.size();
    544544    m_codeBlock->unexpectedConstants.append(v);
    545545    return index;
Note: See TracChangeset for help on using the changeset viewer.