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

Unified Diff: chrome/browser/extensions/api/messaging/message_service.cc

Issue 1625993002: Mark opener extension port as opened after creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « no previous file | chrome/test/data/extensions/api_test/messaging/connect/page.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/messaging/message_service.cc
diff --git a/chrome/browser/extensions/api/messaging/message_service.cc b/chrome/browser/extensions/api/messaging/message_service.cc
index 0cc7aa2e2433fa9ad16a7f48c459306d79318856..06cd62891ffd04c1cbb6c7031f6878ba33356be2 100644
--- a/chrome/browser/extensions/api/messaging/message_service.cc
+++ b/chrome/browser/extensions/api/messaging/message_service.cc
@@ -449,6 +449,7 @@ void MessageService::OpenChannelToNativeApp(
source_extension_id, source, false));
if (!channel->opener->IsValidPort())
return;
+ channel->opener->OpenPort(source_process_id, source_routing_id);
// Get handle of the native view and pass it to the native messaging host.
gfx::NativeView native_view = source ? source->GetNativeView() : nullptr;
@@ -575,6 +576,7 @@ void MessageService::OpenChannelImpl(BrowserContext* browser_context,
params->source_extension_id, source, false));
if (!opener->IsValidPort())
return;
+ opener->OpenPort(params->source_process_id, params->source_routing_id);
params->receiver->RemoveCommonFrames(*opener);
if (!params->receiver->IsValidPort()) {
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/messaging/connect/page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698