Nashorn: Uint8ClampedArray - Incorrect ToUint8Clamp implementation

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: 9
    • Component/s: core-libs
    • b10
    • linux_ubuntu

        FULL PRODUCT VERSION :


        A DESCRIPTION OF THE PROBLEM :
        The ToUint8Clamp implementation for Uint8ClampedArray instances does not correctly clamp input values to [0, 255].

        Nashorn version: hg tip 18edd7a1b166

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        jjs> ta = new Uint8ClampedArray(1), ta[0] = 4294967296, ta[0]

        Expected: 255
        Actual: 0


        REPRODUCIBILITY :
        This bug can be reproduced always.

              Assignee:
              Hannes Wallnoefer
              Reporter:
              Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: