Changeset 245145 in webkit


Ignore:
Timestamp:
May 9, 2019 10:56:47 AM (5 years ago)
Author:
keith_miller@apple.com
Message:

REGRESSION (r245064): ASSERTION FAILED: m_ptr seen with wasm.yaml/wasm/js-api/test_Data.js.wasm-slow-memory
https://bugs.webkit.org/show_bug.cgi?id=197740

Reviewed by Saam Barati.

If a TypedArray constructor is called with just 0 as the first argument, we don't allocate a backing vector.
This means we need to handle null when calling vector() in ConstructionContext.

  • runtime/JSArrayBufferView.h:

(JSC::JSArrayBufferView::ConstructionContext::vector const):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r245127 r245145  
     12019-05-09  Keith Miller  <keith_miller@apple.com>
     2
     3        REGRESSION (r245064): ASSERTION FAILED: m_ptr seen with wasm.yaml/wasm/js-api/test_Data.js.wasm-slow-memory
     4        https://bugs.webkit.org/show_bug.cgi?id=197740
     5
     6        Reviewed by Saam Barati.
     7
     8        If a TypedArray constructor is called with just 0 as the first argument, we don't allocate a backing vector.
     9        This means we need to handle null when calling vector() in ConstructionContext.
     10
     11        * runtime/JSArrayBufferView.h:
     12        (JSC::JSArrayBufferView::ConstructionContext::vector const):
     13
    1142019-05-09  Xan López  <xan@igalia.com>
    215
  • trunk/Source/JavaScriptCore/runtime/JSArrayBufferView.h

    r245064 r245145  
    11/*
    2  * Copyright (C) 2013, 2016 Apple Inc. All rights reserved.
     2 * Copyright (C) 2013-2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    136136       
    137137        Structure* structure() const { return m_structure; }
    138         void* vector() const { return m_vector.get(m_length); }
     138        void* vector() const { return m_vector.getMayBeNull(m_length); }
    139139        uint32_t length() const { return m_length; }
    140140        TypedArrayMode mode() const { return m_mode; }
Note: See TracChangeset for help on using the changeset viewer.