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

Unified Diff: lib/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
« no previous file with comments | « lib/invocation_mirror.cc ('k') | tests/vm/vm.status » ('j') | vm/dart_entry.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/isolate.cc
===================================================================
--- lib/isolate.cc (revision 16285)
+++ lib/isolate.cc (working copy)
@@ -62,17 +62,16 @@
String::Handle(Symbols::New("_get_or_create"));
const int kNumArguments = 1;
const Array& kNoArgumentNames = Array::Handle();
- const Function& function = Function::Handle(
+ const Function& func = Function::Handle(
Resolver::ResolveStatic(isolate_lib,
class_name,
function_name,
kNumArguments,
kNoArgumentNames,
Resolver::kIsQualified));
- GrowableArray<const Object*> arguments(kNumArguments);
- arguments.Add(&Integer::Handle(Integer::New(port_id)));
- const Object& result = Object::Handle(
- DartEntry::InvokeStatic(function, arguments, kNoArgumentNames));
+ const Array& args = Array::Handle(Array::New(kNumArguments));
+ args.SetAt(0, Integer::Handle(Integer::New(port_id)));
+ const Object& result = Object::Handle(DartEntry::InvokeStatic(func, args));
if (!result.IsError()) {
PortMap::SetLive(port_id);
}
@@ -374,9 +373,8 @@
ASSERT(result.IsFunction());
Function& func = Function::Handle(isolate);
func ^= result.raw();
- GrowableArray<const Object*> args(0);
- const Array& kNoArgNames = Array::Handle();
- result = DartEntry::InvokeStatic(func, args, kNoArgNames);
+ const Array& args = Array::Handle(Object::empty_array());
+ result = DartEntry::InvokeStatic(func, args);
if (result.IsError()) {
StoreError(isolate, result);
return false;
« no previous file with comments | « lib/invocation_mirror.cc ('k') | tests/vm/vm.status » ('j') | vm/dart_entry.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698