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

Unified Diff: lib/isolate.cc

Issue 10874072: Use the return value of vm native methods to set the return value, (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 4 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
Index: lib/isolate.cc
===================================================================
--- lib/isolate.cc (revision 11327)
+++ lib/isolate.cc (working copy)
@@ -129,13 +129,14 @@
if (port.IsError()) {
Exceptions::PropagateError(Error::Cast(port));
}
- arguments->SetReturn(port);
+ return port.raw();
}
DEFINE_NATIVE_ENTRY(ReceivePortImpl_closeInternal, 1) {
GET_NATIVE_ARGUMENT(Smi, id, arguments->At(0));
PortMap::ClosePort(id.Value());
+ return Object::null();
}
@@ -149,6 +150,7 @@
// TODO(turnidge): Throw an exception when the return value is false?
PortMap::PostMessage(new Message(
send_id.Value(), reply_id.Value(), data, Message::kNormalPriority));
+ return Object::null();
}
@@ -371,7 +373,7 @@
}
-static void Spawn(NativeArguments* arguments, SpawnState* state) {
+static RawObject* Spawn(NativeArguments* arguments, SpawnState* state) {
// Create a new isolate.
char* error = NULL;
if (!CreateIsolate(state, &error)) {
@@ -396,7 +398,7 @@
Dart::thread_pool(), RunIsolate, ShutdownIsolate,
reinterpret_cast<uword>(state->isolate()));
- arguments->SetReturn(port);
+ return port.raw();
}
@@ -416,7 +418,7 @@
ASSERT(ctx.num_variables() == 0);
#endif
- Spawn(arguments, new SpawnState(func));
+ return Spawn(arguments, new SpawnState(func));
}
@@ -435,7 +437,7 @@
ThrowIsolateSpawnException(msg);
}
- Spawn(arguments, new SpawnState(canonical_uri));
+ return Spawn(arguments, new SpawnState(canonical_uri));
}
@@ -444,7 +446,7 @@
if (port.IsError()) {
Exceptions::PropagateError(Error::Cast(port));
}
- arguments->SetReturn(port);
+ return port.raw();
}
} // namespace dart

Powered by Google App Engine
This is Rietveld 408576698