DescriptionSimplify WTF::base64Decode() after r154538
r154538 increased the complexity of WTF::base64Decode() by introducing
a new Base64PaddingValidationPolicy parameter. This patch simplifies
the code a bit while achieving the same functionality and matching
the corresponding WebKit implementation:
http://trac.webkit.org/changeset/153904
Strictly validating padding does not make much sense unless we also
validate strictly invalid characters. Therefore, this patch replaces
the Base64PaddingValidationPolicy enum with an additional
Base64FailOnInvalidCharacterOrExcessPadding value in the
Base64DecodePolicy enum. The code is also improved to validate
the padding at the end of the decoding loop and also removes a
redundant check for the (dataLength % 4 == 1) case.
BUG=261200
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=155999
Patch Set 1 #Patch Set 2 : Restore the enum's original name #
Messages
Total messages: 4 (0 generated)
|