| Index: runtime/vm/isolate.cc
|
| diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
|
| index d8ab9a53852f0d8d4789fda623e5a59226beacad..f540b60cd0ce39cc4362ee461f42003bfd286b77 100644
|
| --- a/runtime/vm/isolate.cc
|
| +++ b/runtime/vm/isolate.cc
|
| @@ -519,7 +519,18 @@ static bool RunIsolate(uword parameter) {
|
| ASSERT(result.IsFunction());
|
| Function& func = Function::Handle(isolate);
|
| func ^= result.raw();
|
| - result = DartEntry::InvokeFunction(func, Object::empty_array());
|
| + func = func.ImplicitClosureFunction();
|
| +
|
| + const Array& args = Array::Handle(Array::New(1));
|
| + args.SetAt(0, Instance::Handle(func.ImplicitStaticClosure()));
|
| +
|
| + const Library& lib = Library::Handle(Library::IsolateLibrary());
|
| + const String& entry_name = String::Handle(String::New("_startIsolate"));
|
| + const Function& entry_point =
|
| + Function::Handle(lib.LookupLocalFunction(entry_name));
|
| + ASSERT(entry_point.IsFunction() && !entry_point.IsNull());
|
| +
|
| + result = DartEntry::InvokeFunction(entry_point, args);
|
| if (result.IsError()) {
|
| StoreError(isolate, result);
|
| return false;
|
| @@ -977,8 +988,7 @@ static char* GetRootScriptUri(Isolate* isolate) {
|
| }
|
|
|
|
|
| -IsolateSpawnState::IsolateSpawnState(const Function& func,
|
| - const Function& callback_func)
|
| +IsolateSpawnState::IsolateSpawnState(const Function& func)
|
| : isolate_(NULL),
|
| script_url_(NULL),
|
| library_url_(NULL),
|
| @@ -993,12 +1003,7 @@ IsolateSpawnState::IsolateSpawnState(const Function& func,
|
|
|
| const String& func_name = String::Handle(func.name());
|
| function_name_ = strdup(func_name.ToCString());
|
| - if (!callback_func.IsNull()) {
|
| - const String& callback_name = String::Handle(callback_func.name());
|
| - exception_callback_name_ = strdup(callback_name.ToCString());
|
| - } else {
|
| - exception_callback_name_ = strdup("_unhandledExceptionCallback");
|
| - }
|
| + exception_callback_name_ = strdup("_unhandledExceptionCallback");
|
| }
|
|
|
|
|
|
|