diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/modules/bluetooth/bluetooth_error.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/modules/bluetooth/bluetooth_error.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/chromium/third_party/blink/renderer/modules/bluetooth/bluetooth_error.cc b/chromium/third_party/blink/renderer/modules/bluetooth/bluetooth_error.cc index 842bc68ed05..fec96c7e663 100644 --- a/chromium/third_party/blink/renderer/modules/bluetooth/bluetooth_error.cc +++ b/chromium/third_party/blink/renderer/modules/bluetooth/bluetooth_error.cc @@ -19,7 +19,7 @@ const char kGATTServerNotConnectedBase[] = } // namespace // static -DOMException* BluetoothError::CreateNotConnectedException( +String BluetoothError::CreateNotConnectedExceptionMessage( BluetoothOperation operation) { const char* operation_string = nullptr; switch (operation) { @@ -36,10 +36,15 @@ DOMException* BluetoothError::CreateNotConnectedException( operation_string = "perform GATT operations"; break; } + return String::Format(kGATTServerNotConnectedBase, operation_string); +} +// static +DOMException* BluetoothError::CreateNotConnectedException( + BluetoothOperation operation) { return MakeGarbageCollected<DOMException>( DOMExceptionCode::kNetworkError, - String::Format(kGATTServerNotConnectedBase, operation_string)); + CreateNotConnectedExceptionMessage(operation)); } // static |