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

Unified Diff: Source/modules/bluetooth/BluetoothError.cpp

Issue 1179963002: bluetooth: Add DOMErrors in WebBluetooth Spec to WebBluetooth interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@bluetooth-read-value-impl
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | public/platform/modules/bluetooth/WebBluetoothError.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/bluetooth/BluetoothError.cpp
diff --git a/Source/modules/bluetooth/BluetoothError.cpp b/Source/modules/bluetooth/BluetoothError.cpp
index f5176d6ecf073cc5fad3b826bc0dd934d0330603..f2c599320907c0c7a072b60ef920ac370ef0dfc7 100644
--- a/Source/modules/bluetooth/BluetoothError.cpp
+++ b/Source/modules/bluetooth/BluetoothError.cpp
@@ -16,12 +16,22 @@ DOMException* BluetoothError::take(ScriptPromiseResolver*, WebBluetoothError* we
{
OwnPtr<WebBluetoothError> webError = adoptPtr(webErrorRawPointer);
switch (webError->errorType) {
+ case WebBluetoothError::AbortError:
+ return DOMException::create(AbortError, webError->message);
+ case WebBluetoothError::InvalidModificationError:
+ return DOMException::create(InvalidModificationError, webError->message);
+ case WebBluetoothError::InvalidStateError:
+ return DOMException::create(InvalidStateError, webError->message);
case WebBluetoothError::NetworkError:
return DOMException::create(NetworkError, webError->message);
- case WebBluetoothError::SecurityError:
- return DOMException::create(SecurityError, webError->message);
case WebBluetoothError::NotFoundError:
return DOMException::create(NotFoundError, webError->message);
+ case WebBluetoothError::NotSupportedError:
+ return DOMException::create(NotSupportedError, webError->message);
+ case WebBluetoothError::SecurityError:
+ return DOMException::create(SecurityError, webError->message);
+ case WebBluetoothError::SyntaxError:
+ return DOMException::create(SyntaxError, webError->message);
}
ASSERT_NOT_REACHED();
return DOMException::create(UnknownError);
« no previous file with comments | « no previous file | public/platform/modules/bluetooth/WebBluetoothError.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698