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

Unified Diff: runtime/bin/builtin_common.cc

Issue 1998963003: Rework standalone to use a synchronous loader that does not invoke Dart code (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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/bin/builtin.dart ('k') | runtime/bin/builtin_impl_sources.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/builtin_common.cc
diff --git a/runtime/bin/builtin_common.cc b/runtime/bin/builtin_common.cc
index 678e48b7163fac199fded9d936144649417ac2a6..79713e10576609009babadce39dcfe7f6528193d 100644
--- a/runtime/bin/builtin_common.cc
+++ b/runtime/bin/builtin_common.cc
@@ -23,13 +23,18 @@ namespace dart {
namespace bin {
Dart_Handle Builtin::SetLoadPort(Dart_Port port) {
+ Dart_Handle builtin_lib =
+ Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary);
+ RETURN_IF_ERROR(builtin_lib);
+ // Set the _isolateId field.
+ Dart_Handle result = Dart_SetField(builtin_lib,
+ DartUtils::NewString("_isolateId"),
+ Dart_NewInteger(Dart_GetMainPortId()));
+ RETURN_IF_ERROR(result);
load_port_ = port;
ASSERT(load_port_ != ILLEGAL_PORT);
Dart_Handle field_name = DartUtils::NewString("_loadPort");
RETURN_IF_ERROR(field_name);
- Dart_Handle builtin_lib =
- Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary);
- RETURN_IF_ERROR(builtin_lib);
Dart_Handle send_port = Dart_GetField(builtin_lib, field_name);
RETURN_IF_ERROR(send_port);
if (!Dart_IsNull(send_port)) {
@@ -38,7 +43,7 @@ Dart_Handle Builtin::SetLoadPort(Dart_Port port) {
}
send_port = Dart_NewSendPort(load_port_);
RETURN_IF_ERROR(send_port);
- Dart_Handle result = Dart_SetField(builtin_lib, field_name, send_port);
+ result = Dart_SetField(builtin_lib, field_name, send_port);
RETURN_IF_ERROR(result);
return Dart_True();
}
« no previous file with comments | « runtime/bin/builtin.dart ('k') | runtime/bin/builtin_impl_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698