Changeset 278438 in webkit


Ignore:
Timestamp:
Jun 3, 2021 5:41:01 PM (3 years ago)
Author:
mark.lam@apple.com
Message:

Fix an ASSERT in objectPrototypeHasOwnProperty() to account for TerminationException.
https://bugs.webkit.org/show_bug.cgi?id=226609
rdar://78465046

Reviewed by Robin Morisset.

JSTests:

  • stress/termination-exception-in-objectPrototypeHasOwnProperty.js: Added.

Source/JavaScriptCore:

  • runtime/ObjectPrototype.cpp:

(JSC::objectPrototypeHasOwnProperty):

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r278434 r278438  
     12021-06-03  Mark Lam  <mark.lam@apple.com>
     2
     3        Fix an ASSERT in objectPrototypeHasOwnProperty() to account for TerminationException.
     4        https://bugs.webkit.org/show_bug.cgi?id=226609
     5        rdar://78465046
     6
     7        Reviewed by Robin Morisset.
     8
     9        * stress/termination-exception-in-objectPrototypeHasOwnProperty.js: Added.
     10
    1112021-06-03  Yusuke Suzuki  <ysuzuki@apple.com>
    212
  • trunk/Source/JavaScriptCore/ChangeLog

    r278434 r278438  
     12021-06-03  Mark Lam  <mark.lam@apple.com>
     2
     3        Fix an ASSERT in objectPrototypeHasOwnProperty() to account for TerminationException.
     4        https://bugs.webkit.org/show_bug.cgi?id=226609
     5        rdar://78465046
     6
     7        Reviewed by Robin Morisset.
     8
     9        * runtime/ObjectPrototype.cpp:
     10        (JSC::objectPrototypeHasOwnProperty):
     11
    1122021-06-03  Yusuke Suzuki  <ysuzuki@apple.com>
    213
  • trunk/Source/JavaScriptCore/runtime/ObjectPrototype.cpp

    r278253 r278438  
    103103    HasOwnPropertyCache* hasOwnPropertyCache = vm.ensureHasOwnPropertyCache();
    104104    if (std::optional<bool> result = hasOwnPropertyCache->get(structure, propertyName)) {
    105         ASSERT(*result == thisObject->hasOwnProperty(globalObject, propertyName));
    106105        scope.assertNoExceptionExceptTermination();
     106        ASSERT(*result == thisObject->hasOwnProperty(globalObject, propertyName) || vm.hasPendingTerminationException());
    107107        return *result;
    108108    }
Note: See TracChangeset for help on using the changeset viewer.