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

Unified Diff: vm/isolate.cc

Issue 11613009: Changed the API in DartEntry for invoking dart code from C++ to make it more compatible with the re… (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
« vm/dart_entry.h ('K') | « vm/debugger.cc ('k') | vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/isolate.cc
===================================================================
--- vm/isolate.cc (revision 16285)
+++ vm/isolate.cc (working copy)
@@ -169,17 +169,15 @@
ASSERT(exception.IsInstance());
// Invoke script's callback function.
- GrowableArray<const Object*> callback_args(0);
- callback_args.Add(&exception);
- const Array& kNoArgumentNames = Array::Handle(isolate_);
Object& function = Object::Handle(isolate_, ResolveCallbackFunction());
if (function.IsNull() || function.IsError()) {
return false;
}
+ const Array& callback_args = Array::Handle(Array::New(1));
+ callback_args.SetAt(0, exception);
const Object& result =
Object::Handle(DartEntry::InvokeStatic(Function::Cast(function),
- callback_args,
- kNoArgumentNames));
+ callback_args));
if (result.IsError()) {
const Error& err = Error::Cast(result);
OS::PrintErr("failed calling unhandled exception callback: %s\n",
« vm/dart_entry.h ('K') | « vm/debugger.cc ('k') | vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698