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

Unified Diff: runtime/vm/isolate.cc

Issue 312123002: Revert "Ensure that failure to start an isolate all end up in the future." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 months 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 | « runtime/lib/isolate_patch.dart ('k') | tests/isolate/isolate.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 523633ec5c49d1f1abb16b83e6d54c30823d3498..076c369b6a8196f3f005cdae5821be1c48c542ff 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -606,24 +606,14 @@ static bool RunIsolate(uword parameter) {
Object& result = Object::Handle();
result = state->ResolveFunction();
bool is_spawn_uri = state->is_spawn_uri();
-
- Instance& entryFunc = Instance::Handle(isolate);
if (result.IsError()) {
- if (is_spawn_uri) {
- // Report failure to look up "main" in isolate when we have a
- // port to reply it to.
- entryFunc ^= Object::null_instance().raw();
- } else {
- StoreError(isolate, result);
- return false;
- }
- } else {
- ASSERT(result.IsFunction());
- Function& function = Function::Handle(isolate);
- function ^= result.raw();
- function = function.ImplicitClosureFunction();
- entryFunc ^= function.ImplicitStaticClosure();
+ StoreError(isolate, result);
+ return false;
}
+ ASSERT(result.IsFunction());
+ Function& func = Function::Handle(isolate);
+ func ^= result.raw();
+ func = func.ImplicitClosureFunction();
// Instead of directly invoking the entry point we call '_startIsolate' with
// the entry point as argument. The '_startIsolate' function will
@@ -634,7 +624,7 @@ static bool RunIsolate(uword parameter) {
// "_startIsolate" function can act corresponding to how the isolate was
// created.
const Array& args = Array::Handle(Array::New(2));
- args.SetAt(0, entryFunc);
+ args.SetAt(0, Instance::Handle(func.ImplicitStaticClosure()));
args.SetAt(1, is_spawn_uri ? Bool::True() : Bool::False());
const Library& lib = Library::Handle(Library::IsolateLibrary());
« no previous file with comments | « runtime/lib/isolate_patch.dart ('k') | tests/isolate/isolate.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698