Chromium Code Reviews| Index: third_party/WebKit/Source/modules/bluetooth/Bluetooth.cpp |
| diff --git a/third_party/WebKit/Source/modules/bluetooth/Bluetooth.cpp b/third_party/WebKit/Source/modules/bluetooth/Bluetooth.cpp |
| index 81b5ceffa4f5e877a6088340952e82a1fe195b6c..0525ead76b4b47a3856fa82fcc388b6f43fcb650 100644 |
| --- a/third_party/WebKit/Source/modules/bluetooth/Bluetooth.cpp |
| +++ b/third_party/WebKit/Source/modules/bluetooth/Bluetooth.cpp |
| @@ -25,14 +25,6 @@ |
| namespace blink { |
| namespace { |
| -// A name coming from an adv packet is max 29 bytes (adv packet max size |
| -// 31 bytes - 2 byte length field), but the name can also be acquired via |
| -// gap.device_name, so it is limited to the max EIR packet size of 240 bytes. |
| -// See Core Spec 5.0, vol 3, C, 8.1.2. |
| -const size_t kMaxFilterNameLength = 240; |
| -const char kFilterNameTooLong[] = |
| - "A 'name' or 'namePrefix' longer than 240 bytes results in no devices " |
| - "being found, because a device can't acquire a name longer than 240 bytes."; |
| // Per the Bluetooth Spec: The name is a user-friendly name associated with the |
| // device and consists of a maximum of 248 bytes coded according to the UTF-8 |
| // standard. |
| @@ -73,10 +65,6 @@ static void canonicalizeFilter( |
| exceptionState.throwTypeError(kDeviceNameTooLong); |
| return; |
| } |
| - if (nameLength > kMaxFilterNameLength) { |
| - exceptionState.throwDOMException(NotFoundError, kFilterNameTooLong); |
| - return; |
| - } |
|
jeffcarp
2017/01/21 00:14:05
Because of this change and the one below, the layo
jeffcarp
2017/01/21 00:20:34
The WebBluetooth spec doesn't seem to explicitly m
Jeffrey Yasskin
2017/01/23 17:16:14
Yep, as discussed in https://github.com/WebBluetoo
scheib
2017/01/23 18:31:47
Thanks Jeffrey. So Jeff, please just update these
scheib
2017/01/23 18:31:47
Switching the expectations to TypeError looks corr
Jeffrey Yasskin
2017/01/23 18:55:21
I think TypeError is correct when nameLength > kMa
scheib
2017/01/23 20:10:25
Jeffrey, I'm left confused by what you think is be
|
| canonicalizedFilter->name = filter.name(); |
| } |
| @@ -86,10 +74,6 @@ static void canonicalizeFilter( |
| exceptionState.throwTypeError(kDeviceNameTooLong); |
| return; |
| } |
| - if (namePrefixLength > kMaxFilterNameLength) { |
| - exceptionState.throwDOMException(NotFoundError, kFilterNameTooLong); |
| - return; |
| - } |
| if (filter.namePrefix().length() == 0) { |
| exceptionState.throwTypeError( |
| "'namePrefix', if present, must me non-empty."); |