Changeset 214143 in webkit


Ignore:
Timestamp:
Mar 19, 2017 8:41:36 AM (7 years ago)
Author:
Yusuke Suzuki
Message:

import(arg) crashes when ToString(arg) throws
https://bugs.webkit.org/show_bug.cgi?id=169778

Reviewed by Saam Barati.

JSTests:

  • stress/import-reject-with-exception.js: Added.

(shouldBe):
(let.x.get toString):

Source/JavaScriptCore:

JSPromiseDeferred should not be rejected with Exception*.

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncImportModule):

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r214069 r214143  
     12017-03-19  Yusuke Suzuki  <utatane.tea@gmail.com>
     2
     3        import(arg) crashes when ToString(arg) throws
     4        https://bugs.webkit.org/show_bug.cgi?id=169778
     5
     6        Reviewed by Saam Barati.
     7
     8        * stress/import-reject-with-exception.js: Added.
     9        (shouldBe):
     10        (let.x.get toString):
     11
    1122017-03-16  Filip Pizlo  <fpizlo@apple.com>
    213
  • trunk/Source/JavaScriptCore/ChangeLog

    r214138 r214143  
     12017-03-19  Yusuke Suzuki  <utatane.tea@gmail.com>
     2
     3        import(arg) crashes when ToString(arg) throws
     4        https://bugs.webkit.org/show_bug.cgi?id=169778
     5
     6        Reviewed by Saam Barati.
     7
     8        JSPromiseDeferred should not be rejected with Exception*.
     9
     10        * runtime/JSGlobalObjectFunctions.cpp:
     11        (JSC::globalFuncImportModule):
     12
    1132017-03-18  Oleksandr Skachkov  <gskachkov@gmail.com>
    214
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp

    r214038 r214143  
    758758    if (Exception* exception = catchScope.exception()) {
    759759        catchScope.clearException();
    760         promise->reject(exec, exception);
     760        promise->reject(exec, exception->value());
    761761        return JSValue::encode(promise->promise());
    762762    }
     
    765765    if (Exception* exception = catchScope.exception()) {
    766766        catchScope.clearException();
    767         promise->reject(exec, exception);
     767        promise->reject(exec, exception->value());
    768768        return JSValue::encode(promise->promise());
    769769    }
Note: See TracChangeset for help on using the changeset viewer.