Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(649)

Unified Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothUUID.cpp

Issue 2380843002: Throw a TypeError instead of a SyntaxError on invalid UUIDs. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/bluetooth/BluetoothUUID.cpp
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothUUID.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothUUID.cpp
index 77b1ac583398ad021cc2339548c713e38de9691b..7a8a3ac17b38ace94eab356f2f40448ba27b30bf 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothUUID.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothUUID.cpp
@@ -327,8 +327,8 @@ String getUUIDForGATTAttribute(GATTAttribute attribute, StringOrUnsignedLong nam
" e.g. 'gatt.characteristic_presentation_format'.");
break;
}
- // Otherwise, throw a SyntaxError.
- exceptionState.throwDOMException(SyntaxError, errorMessage.toString());
+ // Otherwise, throw a TypeError.
+ exceptionState.throwDOMException(V8TypeError, errorMessage.toString());
return String();
}

Powered by Google App Engine
This is Rietveld 408576698