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

Unified Diff: Source/wtf/ArrayBufferView.cpp

Issue 87963002: Improve Crypto::getRandomValues exception messages. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: DEBUG. Created 7 years, 1 month 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 | « Source/wtf/ArrayBufferView.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/ArrayBufferView.cpp
diff --git a/Source/wtf/ArrayBufferView.cpp b/Source/wtf/ArrayBufferView.cpp
index a9d3eba457a57240408795e472d2c98bdb924f4b..2587b92dce8af44467983c9364639a27ca80e46d 100644
--- a/Source/wtf/ArrayBufferView.cpp
+++ b/Source/wtf/ArrayBufferView.cpp
@@ -55,4 +55,42 @@ void ArrayBufferView::neuter()
m_byteOffset = 0;
}
+const char* ArrayBufferView::typeName()
+{
+ switch (getType()) {
+ case TypeInt8:
+ return "Int8";
+ break;
+ case TypeUint8:
+ return "UInt8";
+ break;
+ case TypeUint8Clamped:
+ return "UInt8Clamped";
+ break;
+ case TypeInt16:
+ return "Int16";
+ break;
+ case TypeUint16:
+ return "UInt16";
+ break;
+ case TypeInt32:
+ return "Int32";
+ break;
+ case TypeUint32:
+ return "Uint32";
+ break;
+ case TypeFloat32:
+ return "Float32";
+ break;
+ case TypeFloat64:
+ return "Float64";
+ break;
+ case TypeDataView:
+ return "DataView";
+ break;
+ }
+ ASSERT_NOT_REACHED();
+ return "Unknown";
+}
+
}
« no previous file with comments | « Source/wtf/ArrayBufferView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698