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

Side by Side Diff: runtime/lib/growable_array.cc

Issue 1072193006: Ensure that native function throws on bad argument instead of aborting. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/assert.h" 5 #include "platform/assert.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/bootstrap_natives.h" 8 #include "vm/bootstrap_natives.h"
9 #include "vm/exceptions.h" 9 #include "vm/exceptions.h"
10 #include "vm/native_entry.h" 10 #include "vm/native_entry.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 89 }
90 90
91 91
92 DEFINE_NATIVE_ENTRY(Internal_makeListFixedLength, 1) { 92 DEFINE_NATIVE_ENTRY(Internal_makeListFixedLength, 1) {
93 GET_NON_NULL_NATIVE_ARGUMENT(GrowableObjectArray, array, 93 GET_NON_NULL_NATIVE_ARGUMENT(GrowableObjectArray, array,
94 arguments->NativeArgAt(0)); 94 arguments->NativeArgAt(0));
95 return Array::MakeArray(array); 95 return Array::MakeArray(array);
96 } 96 }
97 97
98 DEFINE_NATIVE_ENTRY(Internal_makeFixedListUnmodifiable, 1) { 98 DEFINE_NATIVE_ENTRY(Internal_makeFixedListUnmodifiable, 1) {
99 const Array& array = Array::CheckedHandle(arguments->NativeArgAt(0)); 99 GET_NON_NULL_NATIVE_ARGUMENT(Array, array, arguments->NativeArgAt(0));
100 array.MakeImmutable(); 100 array.MakeImmutable();
101 return array.raw(); 101 return array.raw();
102 } 102 }
103 103
104 } // namespace dart 104 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698