Changeset 154429 in webkit for trunk/Source/JavaScriptCore/jit


Ignore:
Timestamp:
Aug 21, 2013, 4:34:39 PM (12 years ago)
Author:
[email protected]
Message:

https://bugs.webkit.org/show_bug.cgi?id=119900
Exception in global setter doesn't unwind correctly

Patch by Yi Shen <[email protected]> on 2013-08-21
Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Call VM_THROW_EXCEPTION_AT_END in op_put_to_scope if the setter throws exception.

  • jit/JITStubs.cpp:

(JSC::DEFINE_STUB_FUNCTION):

LayoutTests:

Add test for calling global setter which throws exception.

  • fast/js/script-tests/throw-exception-in-global-setter.js: Added.

(g):

  • fast/js/throw-exception-in-global-setter-expected.txt: Added.
  • fast/js/throw-exception-in-global-setter.html: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/JITStubs.cpp

    r154426 r154429  
    22692269    PutPropertySlot slot(codeBlock->isStrictMode());
    22702270    scope->methodTable()->put(scope, exec, ident, value, slot);
     2271   
     2272    if (exec->vm().exception) {
     2273        VM_THROW_EXCEPTION_AT_END();
     2274        return;
     2275    }
    22712276
    22722277    // Covers implicit globals. Since they don't exist until they first execute, we didn't know how to cache them at compile time.
Note: See TracChangeset for help on using the changeset viewer.