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

Unified Diff: include/v8.h

Issue 1157843006: Flatten the Arrays returned and consumed by the v8::Map API (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Reject FromArray args with odd lengths Created 5 years, 7 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 3bd3dfbbd83cdf82c195aff85e4ae9c04b13861f..3c399a47eb5219e035c01243251d8a422f31f0f4 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -2977,8 +2977,8 @@ class V8_EXPORT Map : public Object {
size_t Size() const;
/**
- * Returns an array of [key, value] arrays representing the contents
- * of this Map.
+ * Returns an array of length Size() * 2, where index N is the Nth key and
+ * index N + 1 is the Nth value.
*/
Local<Array> AsArray() const;
@@ -2988,8 +2988,8 @@ class V8_EXPORT Map : public Object {
static Local<Map> New(Isolate* isolate);
/**
- * Creates a new Map containing the elements of array, which must be comprised
- * of [key, value] arrays.
+ * Creates a new Map containing the elements of array, which must be formatted
+ * in the same manner as the array returned from AsArray().
* Guaranteed to be side-effect free if the array contains no holes.
*/
static V8_WARN_UNUSED_RESULT MaybeLocal<Map> FromArray(Local<Context> context,
« 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