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

Unified Diff: Source/modules/webmidi/MIDIOutput.cpp

Issue 23135009: Improve IDB module's SecurityError messages. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: test Created 7 years, 4 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: Source/modules/webmidi/MIDIOutput.cpp
diff --git a/Source/modules/webmidi/MIDIOutput.cpp b/Source/modules/webmidi/MIDIOutput.cpp
index d319c3b742d1df9e3c2d7a2fb615a534a24a8492..739d055ce9f4477d9d81503598f1baa01612c4d6 100644
--- a/Source/modules/webmidi/MIDIOutput.cpp
+++ b/Source/modules/webmidi/MIDIOutput.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "modules/webmidi/MIDIOutput.h"
+#include "bindings/v8/ExceptionMessages.h"
#include "bindings/v8/ExceptionState.h"
#include "core/dom/ExceptionCode.h"
#include "modules/webmidi/MIDIAccess.h"
@@ -65,7 +66,7 @@ void MIDIOutput::send(Uint8Array* array, double timestamp, ExceptionState& es)
// Filter out System Exclusive messages if we're not allowed.
// FIXME: implement more extensive filtering.
if (length > 0 && data[0] >= 0xf0 && !m_access->sysExEnabled()) {
- es.throwDOMException(SecurityError);
+ es.throwSecurityError(ExceptionMessages::failedToExecute("send", "MIDIOutput", "permission to send system exclusive messages is denied."));
return;
}

Powered by Google App Engine
This is Rietveld 408576698