⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 235540 in webkit


Ignore:
Timestamp:
Aug 31, 2018, 1:40:35 AM (8 years ago)
Author:
mark.lam@apple.com
Message:

Add missing exception check in arrayProtoFuncLastIndexOf().
https://bugs.webkit.org/show_bug.cgi?id=189184
<rdar://problem/39785959>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/regress-189184.js: Added.

Source/JavaScriptCore:

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncLastIndexOf):

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r235538 r235540  
     12018-08-31  Mark Lam  <mark.lam@apple.com>
     2
     3        Add missing exception check in arrayProtoFuncLastIndexOf().
     4        https://bugs.webkit.org/show_bug.cgi?id=189184
     5        <rdar://problem/39785959>
     6
     7        Reviewed by Yusuke Suzuki.
     8
     9        * stress/regress-189184.js: Added.
     10
    1112018-08-31  Saam barati  <sbarati@apple.com>
    212
  • trunk/Source/JavaScriptCore/ChangeLog

    r235538 r235540  
     12018-08-31  Mark Lam  <mark.lam@apple.com>
     2
     3        Add missing exception check in arrayProtoFuncLastIndexOf().
     4        https://bugs.webkit.org/show_bug.cgi?id=189184
     5        <rdar://problem/39785959>
     6
     7        Reviewed by Yusuke Suzuki.
     8
     9        * runtime/ArrayPrototype.cpp:
     10        (JSC::arrayProtoFuncLastIndexOf):
     11
    1122018-08-31  Saam barati  <sbarati@apple.com>
    213
  • trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp

    r235356 r235540  
    12161216        if (!e)
    12171217            continue;
    1218         if (JSValue::strictEqual(exec, searchElement, e))
     1218        bool isEqual = JSValue::strictEqual(exec, searchElement, e);
     1219        RETURN_IF_EXCEPTION(scope, encodedJSValue());
     1220        if (isEqual)
    12191221            return JSValue::encode(jsNumber(index));
    1220         RETURN_IF_EXCEPTION(scope, encodedJSValue());
    12211222    } while (index--);
    12221223
Note: See TracChangeset for help on using the changeset viewer.