Changeset 243391 in webkit


Ignore:
Timestamp:
Mar 22, 2019, 10:59:07 AM (6 years ago)
Author:
mark.lam@apple.com
Message:

Placate exception check validation in genericTypedArrayViewProtoFuncLastIndexOf().
https://bugs.webkit.org/show_bug.cgi?id=196154
<rdar://problem/49145307>

Reviewed by Filip Pizlo.

JSTests:

Also added @ runDefault constraint to web-assembly-link-error-exception-check.js.
There's no need to run this test on more than 1 test configuration.

  • stress/typed-array-lastIndexOf-exception-check.js: Added.
  • stress/web-assembly-link-error-exception-check.js:

Source/JavaScriptCore:

  • runtime/JSGenericTypedArrayViewPrototypeFunctions.h:

(JSC::genericTypedArrayViewProtoFuncLastIndexOf):

Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r243386 r243391  
     12019-03-22  Mark Lam  <mark.lam@apple.com>
     2
     3        Placate exception check validation in genericTypedArrayViewProtoFuncLastIndexOf().
     4        https://bugs.webkit.org/show_bug.cgi?id=196154
     5        <rdar://problem/49145307>
     6
     7        Reviewed by Filip Pizlo.
     8
     9        Also added //@ runDefault constraint to web-assembly-link-error-exception-check.js.
     10        There's no need to run this test on more than 1 test configuration.
     11
     12        * stress/typed-array-lastIndexOf-exception-check.js: Added.
     13        * stress/web-assembly-link-error-exception-check.js:
     14
    1152019-03-22  Mark Lam  <mark.lam@apple.com>
    216
  • trunk/JSTests/stress/web-assembly-link-error-exception-check.js

    r243386 r243391  
     1//@ runDefault
     2
    13new WebAssembly.LinkError([]);
  • trunk/Source/JavaScriptCore/ChangeLog

    r243386 r243391  
     12019-03-22  Mark Lam  <mark.lam@apple.com>
     2
     3        Placate exception check validation in genericTypedArrayViewProtoFuncLastIndexOf().
     4        https://bugs.webkit.org/show_bug.cgi?id=196154
     5        <rdar://problem/49145307>
     6
     7        Reviewed by Filip Pizlo.
     8
     9        * runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
     10        (JSC::genericTypedArrayViewProtoFuncLastIndexOf):
     11
    1122019-03-22  Mark Lam  <mark.lam@apple.com>
    213
  • trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h

    r236697 r243391  
    11/*
    2  * Copyright (C) 2015-2017 Apple Inc. All rights reserved.
     2 * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    318318        JSValue fromValue = exec->uncheckedArgument(1);
    319319        double fromDouble = fromValue.toInteger(exec);
     320        RETURN_IF_EXCEPTION(scope, encodedJSValue());
    320321        if (fromDouble < 0) {
    321322            fromDouble += length;
     
    326327            index = static_cast<unsigned>(fromDouble);
    327328    }
    328 
    329     RETURN_IF_EXCEPTION(scope, encodedJSValue());
    330329
    331330    if (thisObject->isNeutered())
Note: See TracChangeset for help on using the changeset viewer.