| Index: runtime/vm/dart_entry.cc
|
| ===================================================================
|
| --- runtime/vm/dart_entry.cc (revision 14694)
|
| +++ runtime/vm/dart_entry.cc (working copy)
|
| @@ -99,6 +99,14 @@
|
| return error.raw();
|
| }
|
| }
|
| + // Set up arguments to include the closure as the first argument.
|
| + const int num_arguments = arguments.length() + 1;
|
| + GrowableArray<const Object*> args(num_arguments);
|
| + const Object& arg0 = Object::ZoneHandle(closure.raw());
|
| + args.Add(&arg0);
|
| + for (int i = 1; i < num_arguments; i++) {
|
| + args.Add(arguments[i - 1]);
|
| + }
|
| // Now Call the invoke stub which will invoke the closure.
|
| invokestub entrypoint = reinterpret_cast<invokestub>(
|
| StubCode::InvokeDartCodeEntryPoint());
|
| @@ -107,8 +115,8 @@
|
| ASSERT(!code.IsNull());
|
| return entrypoint(
|
| code.EntryPoint(),
|
| - ArgumentsDescriptor(arguments.length(), optional_arguments_names),
|
| - arguments.data(),
|
| + ArgumentsDescriptor(num_arguments, optional_arguments_names),
|
| + args.data(),
|
| context);
|
| }
|
|
|
|
|