fix: use message handle api specific to embedders

This commit is contained in:
deepak1556
2020-05-18 15:15:39 -07:00
parent 698c66f7f9
commit 23d01dc8e0
4 changed files with 1 additions and 28 deletions

View File

@@ -362,7 +362,6 @@ source_set("electron_lib") {
"//services/viz/privileged/mojom/compositing",
"//skia",
"//third_party/blink/public:blink",
"//third_party/blink/renderer/core/execution_context",
"//third_party/boringssl",
"//third_party/electron_node:node_lib",
"//third_party/inspector_protocol:crdtp",

View File

@@ -90,7 +90,6 @@ fix_account_for_print_preview_disabled_when_printing_to_pdf.patch
web_contents.patch
ui_gtk_public_header.patch
refactor_expose_cursor_changes_to_the_webcontentsobserver.patch
expose_blink_renderer_execution_context.patch
crash_allow_setting_more_options.patch
breakpad_treat_node_processes_as_browser_processes.patch
upload_list_add_loadsync_method.patch

View File

@@ -1,23 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Andy Locascio <andy@slack-corp.com>
Date: Fri, 15 May 2020 12:20:08 -0700
Subject: expose blink/renderer/execution_context
Refs: https://github.com/electron/electron/pull/23379/commits/b67334e781d2c8c01972f65e2d574e621ac79964#, https://chromium-review.googlesource.com/c/chromium/src/+/1952124
diff --git a/third_party/blink/renderer/core/execution_context/BUILD.gn b/third_party/blink/renderer/core/execution_context/BUILD.gn
index 88dfb8a31e1640f5add7a34f983bdd1b5ae6e345..d71ef2f3784d16b603f2dbaf64279db990efb314 100644
--- a/third_party/blink/renderer/core/execution_context/BUILD.gn
+++ b/third_party/blink/renderer/core/execution_context/BUILD.gn
@@ -5,6 +5,11 @@
import("//third_party/blink/renderer/core/core.gni")
blink_core_sources("execution_context") {
+ visibility = [
+ "//third_party/blink/renderer/core/*",
+ "//electron:*",
+ ]
+
sources = [
"agent.cc",
"agent.h",

View File

@@ -21,7 +21,6 @@
#include "third_party/blink/public/common/messaging/transferable_message.h"
#include "third_party/blink/public/common/messaging/transferable_message_mojom_traits.h"
#include "third_party/blink/public/mojom/messaging/transferable_message.mojom.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
namespace electron {
@@ -126,8 +125,7 @@ void MessagePort::Entangle(blink::MessagePortDescriptor port) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::HandleScope scope(isolate);
connector_ = std::make_unique<mojo::Connector>(
port_.TakeHandleToEntangle(
blink::ExecutionContext::From(isolate->GetCurrentContext())),
port_.TakeHandleToEntangleWithEmbedder(),
mojo::Connector::SINGLE_THREADED_SEND,
base::ThreadTaskRunnerHandle::Get());
connector_->PauseIncomingMethodCallProcessing();