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

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
« no previous file with comments | « lib/integers.cc ('k') | lib/math.cc » ('j') | vm/bootstrap_natives.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/isolate.cc
===================================================================
--- lib/isolate.cc (revision 11528)
+++ lib/isolate.cc (working copy)
@@ -120,13 +120,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();
}
@@ -144,6 +145,7 @@
PortMap::PostMessage(new Message(send_id.Value(), reply_id.Value(),
data, writer.BytesWritten(),
Message::kNormalPriority));
+ return Object::null();
}
@@ -366,7 +368,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)) {
@@ -391,7 +393,7 @@
Dart::thread_pool(), RunIsolate, ShutdownIsolate,
reinterpret_cast<uword>(state->isolate()));
- arguments->SetReturn(port);
+ return port.raw();
}
@@ -411,7 +413,7 @@
ASSERT(ctx.num_variables() == 0);
#endif
- Spawn(arguments, new SpawnState(func));
+ return Spawn(arguments, new SpawnState(func));
}
@@ -430,7 +432,7 @@
ThrowIsolateSpawnException(msg);
}
- Spawn(arguments, new SpawnState(canonical_uri));
+ return Spawn(arguments, new SpawnState(canonical_uri));
}
@@ -439,7 +441,7 @@
if (port.IsError()) {
Exceptions::PropagateError(Error::Cast(port));
}
- arguments->SetReturn(port);
+ return port.raw();
}
} // namespace dart
« no previous file with comments | « lib/integers.cc ('k') | lib/math.cc » ('j') | vm/bootstrap_natives.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698