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

Unified Diff: include/v8.h

Issue 13977018: Add Value::Is* methods for typed arrays and ArrayBuffer (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 | src/api.cc » ('j') | src/api.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index ee49ca4349d804a15020c98d5c573012d35f2e7e..0da1fa6af168c0b8926881c222a4262a6a8236c2 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1108,6 +1108,67 @@ class V8EXPORT Value : public Data {
*/
bool IsRegExp() const;
+
+ /**
+ * Returns true if this value is an ArrayBuffer.
+ * This is an experimental feature.
+ */
+ bool IsArrayBuffer() const;
+
+ /**
+ * Returns true if this value is one of TypedArrays.
+ * This is an experimental feature.
+ */
+ bool IsTypedArray() const;
+
+ /**
+ * Returns true if this value is an Uint8Array.
+ * This is an experimental feature.
+ */
+ bool IsUint8Array() const;
+
+ /**
+ * Returns true if this value is an Int8Array.
+ * This is an experimental feature.
+ */
+ bool IsInt8Array() const;
+
+ /**
+ * Returns true if this value is an Uint16Array.
+ * This is an experimental feature.
+ */
+ bool IsUint16Array() const;
+
+ /**
+ * Returns true if this value is an Int16Array.
+ * This is an experimental feature.
+ */
+ bool IsInt16Array() const;
+
+ /**
+ * Returns true if this value is an Uint32Array.
+ * This is an experimental feature.
+ */
+ bool IsUint32Array() const;
+
+ /**
+ * Returns true if this value is an Int32Array.
+ * This is an experimental feature.
+ */
+ bool IsInt32Array() const;
+
+ /**
+ * Returns true if this value is a Float32Array.
+ * This is an experimental feature.
+ */
+ bool IsFloat32Array() const;
+
+ /**
+ * Returns true if this value is a Float64Array.
+ * This is an experimental feature.
+ */
+ bool IsFloat64Array() const;
+
Local<Boolean> ToBoolean() const;
Local<Number> ToNumber() const;
Local<String> ToString() const;
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698