Chromium Code Reviews| Index: third_party/WebKit/Source/modules/push_messaging/PushManager.cpp |
| diff --git a/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp b/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp |
| index c6fd24f3058c81833a64378776ae5abfa7f115f3..9cc076a618b9882b06787a438ac22187164be6e7 100644 |
| --- a/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp |
| +++ b/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp |
| @@ -38,14 +38,14 @@ String bufferSourceToString(const ArrayBufferOrArrayBufferView& applicationServe |
| { |
| // Check the validity of the sender info. It must be a 65 byte unencrypted key, |
| // which has the byte 0x04 as the first byte as a marker. |
| - char* input; |
| + unsigned char* input; |
| int length; |
| if (applicationServerKey.isArrayBuffer()) { |
| - input = static_cast<char*>( |
| + input = static_cast<unsigned char*>( |
| applicationServerKey.getAsArrayBuffer()->data()); |
| length = applicationServerKey.getAsArrayBuffer()->byteLength(); |
| } else if (applicationServerKey.isArrayBufferView()) { |
| - input = static_cast<char*>( |
| + input = static_cast<unsigned char*>( |
| applicationServerKey.getAsArrayBufferView()->buffer()->data()); |
| length = applicationServerKey.getAsArrayBufferView()->buffer()->byteLength(); |
| } else { |
| @@ -54,7 +54,7 @@ String bufferSourceToString(const ArrayBufferOrArrayBufferView& applicationServe |
| } |
| if (length == 65 && input[0] == 0x04) |
| - return WebString::fromUTF8(input, length); |
| + return WebString::fromLatin1(input, length); |
|
Michael van Ouwerkerk
2016/03/30 09:50:04
Or maybe only here. Maybe find a single best place
harkness
2016/03/30 10:51:49
I documented it all three places. Documentation is
|
| exceptionState.throwDOMException(InvalidAccessError, "The provided applicationServerKey is not valid."); |
| return String(); |
| } |