Changeset 221711 in webkit


Ignore:
Timestamp:
Sep 6, 2017 5:57:35 PM (7 years ago)
Author:
mark.lam@apple.com
Message:

constructGenericTypedArrayViewWithArguments() is missing an exception check.
https://bugs.webkit.org/show_bug.cgi?id=176485
<rdar://problem/33898874>

Reviewed by Keith Miller.

JSTests:

  • stress/regress-176485.js: Added.

Source/JavaScriptCore:

  • runtime/JSGenericTypedArrayViewConstructorInlines.h:

(JSC::constructGenericTypedArrayViewWithArguments):

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r221657 r221711  
     12017-09-06  Mark Lam  <mark.lam@apple.com>
     2
     3        constructGenericTypedArrayViewWithArguments() is missing an exception check.
     4        https://bugs.webkit.org/show_bug.cgi?id=176485
     5        <rdar://problem/33898874>
     6
     7        Reviewed by Keith Miller.
     8
     9        * stress/regress-176485.js: Added.
     10
    1112017-09-05  Saam Barati  <sbarati@apple.com>
    212
  • trunk/Source/JavaScriptCore/ChangeLog

    r221703 r221711  
     12017-09-06  Mark Lam  <mark.lam@apple.com>
     2
     3        constructGenericTypedArrayViewWithArguments() is missing an exception check.
     4        https://bugs.webkit.org/show_bug.cgi?id=176485
     5        <rdar://problem/33898874>
     6
     7        Reviewed by Keith Miller.
     8
     9        * runtime/JSGenericTypedArrayViewConstructorInlines.h:
     10        (JSC::constructGenericTypedArrayViewWithArguments):
     11
    1122017-09-06  Saam Barati  <sbarati@apple.com>
    213
  • trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h

    r218082 r221711  
    186186            }
    187187
    188             length = lengthSlot.isUnset() ? 0 : lengthSlot.getValue(exec, vm.propertyNames->length).toUInt32(exec);
    189             RETURN_IF_EXCEPTION(scope, nullptr);
     188            if (lengthSlot.isUnset())
     189                length = 0;
     190            else {
     191                JSValue value = lengthSlot.getValue(exec, vm.propertyNames->length);
     192                RETURN_IF_EXCEPTION(scope, nullptr);
     193                length = value.toUInt32(exec);
     194                RETURN_IF_EXCEPTION(scope, nullptr);
     195            }
    190196        }
    191197
Note: See TracChangeset for help on using the changeset viewer.