• Daniel Clark's avatar
    Allow casting to Primitive types from Data · a8f6c061
    Daniel Clark authored
    Although every Primitive is a Data, the Cast operations for the
    subclasses of Primitive do not allow casting directly from Data to the
    subclasses without first going through Value.  Because of this,
    Primitives extracted from a V8::FixedArray require two casts to get to
    the "real" type.
    
    Thus, as a convenience to embedders, this change makes it possible to
    cast directly from Data to all the subtypes of Primitive.
    
    Also, this change makes the parameter names in the declarations match
    those in the definitions, though there does not seem to be a universally
    followed convention regarding these.
    
    Bug: v8:10958
    Change-Id: I18dc3fbb9a9bccb2cb3b75efd829af64d46d8eb9
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2573816Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
    Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
    Commit-Queue: Dan Clark <daniec@microsoft.com>
    Cr-Commit-Position: refs/heads/master@{#71649}
    a8f6c061
test-modules.cc 48.1 KB