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

Unified Diff: runtime/lib/growable_array.cc

Issue 1056353004: Add List.unmodifiable constructor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove left-over debug coide. Created 5 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
Index: runtime/lib/growable_array.cc
diff --git a/runtime/lib/growable_array.cc b/runtime/lib/growable_array.cc
index 1a3a94bca3b90f77b411befd8058c5c843a88a34..9f4ff630dabbf8472dbfffb90e9684b9f3250f97 100644
--- a/runtime/lib/growable_array.cc
+++ b/runtime/lib/growable_array.cc
@@ -95,4 +95,10 @@ DEFINE_NATIVE_ENTRY(Internal_makeListFixedLength, 1) {
return Array::MakeArray(array);
}
+DEFINE_NATIVE_ENTRY(Internal_makeFixedListUnmodifiable, 1) {
+ const Array& array = Array::CheckedHandle(arguments->NativeArgAt(0));
+ array.MakeImmutable();
+ return array.raw();
+}
+
} // namespace dart

Powered by Google App Engine
This is Rietveld 408576698