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

Unified Diff: vm/exceptions.cc

Issue 11639007: Cleanup the exceptions create code to use Arrays instead GrowableArrays so (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years 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 | « vm/exceptions.h ('k') | vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/exceptions.cc
===================================================================
--- vm/exceptions.cc (revision 16285)
+++ vm/exceptions.cc (working copy)
@@ -143,7 +143,7 @@
const Instance& existing_stacktrace) {
Instance& exception = Instance::Handle(incoming_exception.raw());
if (exception.IsNull()) {
- GrowableArray<const Object*> arguments;
+ const Array& arguments = Array::Handle(Object::empty_array());
exception ^= Exceptions::Create(Exceptions::kNullThrown, arguments);
}
uword handler_pc = 0;
@@ -378,8 +378,7 @@
}
-void Exceptions::ThrowByType(
- ExceptionType type, const GrowableArray<const Object*>& arguments) {
+void Exceptions::ThrowByType(ExceptionType type, const Array& arguments) {
const Object& result = Object::Handle(Create(type, arguments));
if (result.IsError()) {
// We got an error while constructing the exception object.
@@ -392,8 +391,7 @@
}
-RawObject* Exceptions::Create(
- ExceptionType type, const GrowableArray<const Object*>& arguments) {
+RawObject* Exceptions::Create(ExceptionType type, const Array& arguments) {
Library& library = Library::Handle();
String& class_name = String::Handle();
switch (type) {
« no previous file with comments | « vm/exceptions.h ('k') | vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698