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

Unified Diff: include/v8.h

Issue 6674034: Fix Array::New(length) in the API to return an array with the provided length. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments. Created 9 years, 9 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') | no next file with comments »
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 ad316ceca36b419cee3fb24a5c90a717b849973d..7875cfaf205e453b56a9d494c11351e159597267 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1706,7 +1706,12 @@ class Array : public Object {
*/
V8EXPORT Local<Object> CloneElementAt(uint32_t index);
+ /**
+ * Creates a JavaScript array with the given length. If the length
+ * is negative the returned array will have length 0.
+ */
V8EXPORT static Local<Array> New(int length = 0);
+
static inline Array* Cast(Value* obj);
private:
V8EXPORT Array();
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698