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

Unified Diff: runtime/bin/loader.cc

Issue 2651633002: VM: [Kernel] Fix bootstraping when Kernel isolate is used. (Closed)
Patch Set: Landing issue Created 3 years, 11 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/loader.h ('k') | runtime/bin/main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/loader.cc
diff --git a/runtime/bin/loader.cc b/runtime/bin/loader.cc
index 70ee44471d6628f2a7a1892515fe274d6a771c2b..f92d13dfd88f519de169407c44f13157403dbd87 100644
--- a/runtime/bin/loader.cc
+++ b/runtime/bin/loader.cc
@@ -34,7 +34,8 @@ Loader::Loader(IsolateData* isolate_data)
payload_length_(0) {
monitor_ = new Monitor();
ASSERT(isolate_data_ != NULL);
- port_ = Dart_NewNativePort("Loader", Loader::NativeMessageHandler, false);
+ port_ =
+ Dart_NewNativePort("Loader", Loader::NativeMessageHandler, false, this);
isolate_data_->set_loader(this);
AddLoader(port_, isolate_data_);
}
@@ -817,13 +818,10 @@ Loader* Loader::LoaderFor(Dart_Port port) {
void Loader::NativeMessageHandler(Dart_Port dest_port_id,
- Dart_CObject* message) {
+ Dart_CObject* message,
+ void* peer) {
MutexLocker ml(loader_infos_lock_);
- Loader* loader = LoaderForLocked(dest_port_id);
- if (loader == NULL) {
- return;
- }
- loader->QueueMessage(message);
+ static_cast<Loader*>(peer)->QueueMessage(message);
}
} // namespace bin
« no previous file with comments | « runtime/bin/loader.h ('k') | runtime/bin/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698