Commit 42d9cab1 authored by abarth@webkit.org's avatar abarth@webkit.org

2011-02-13 Adam Barth <abarth@webkit.org>

        Reviewed by Sam Weinig.

        crypto.getRandomValues should throw TYPE_MISMATCH_ERR
        https://bugs.webkit.org/show_bug.cgi?id=54346

        * security/crypto-random-values-types-expected.txt:
2011-02-13  Adam Barth  <abarth@webkit.org>

        Reviewed by Sam Weinig.

        crypto.getRandomValues should throw TYPE_MISMATCH_ERR
        https://bugs.webkit.org/show_bug.cgi?id=54346

        As requested by Sam.

        * page/Crypto.cpp:
        (WebCore::Crypto::getRandomValues):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78435 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7f38bfec
2011-02-13 Adam Barth <abarth@webkit.org>
Reviewed by Sam Weinig.
crypto.getRandomValues should throw TYPE_MISMATCH_ERR
https://bugs.webkit.org/show_bug.cgi?id=54346
* security/crypto-random-values-types-expected.txt:
2011-02-13 Shinichiro Hamaji <hamaji@chromium.org>
Update chromium's test expectations for fast/inline/inline-box-background-*
......@@ -11,7 +11,7 @@ PASS crypto.getRandomValues(new Uint16Array(3)) is undefined.
PASS crypto.getRandomValues(new Int16Array(3)) is undefined.
PASS crypto.getRandomValues(new Uint32Array(3)) is undefined.
PASS crypto.getRandomValues(new Int32Array(3)) is undefined.
PASS crypto.getRandomValues(new Float32Array(3)) threw exception Error: VALIDATION_ERR: DOM Exception 16.
PASS crypto.getRandomValues(new Float32Array(3)) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS successfullyParsed is true
TEST COMPLETE
......
2011-02-13 Adam Barth <abarth@webkit.org>
Reviewed by Sam Weinig.
crypto.getRandomValues should throw TYPE_MISMATCH_ERR
https://bugs.webkit.org/show_bug.cgi?id=54346
As requested by Sam.
* page/Crypto.cpp:
(WebCore::Crypto::getRandomValues):
2011-02-13 Alexey Proskuryakov <ap@apple.com>
Reviewed by Dan Bernstein.
......@@ -58,7 +58,7 @@ void Crypto::getRandomValues(ArrayBufferView* array, ExceptionCode& ec)
{
#if USE(OS_RANDOMNESS)
if (!array || !isIntegerArray(array)) {
ec = VALIDATION_ERR;
ec = TYPE_MISMATCH_ERR;
return;
}
cryptographicallyRandomValues(array->baseAddress(), array->byteLength());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment