Repository: electron/electron (language: cpp)

Issue:
Remove revert_mojo_force_blink_headers_to_only_be_included_in_blink.patch
Refs https://github.com/electron/electron/pull/44360/commits/435323678cae493158dae3e3c2ac33b5d2987c8e

Lets try with `disable_variants = true` as first step



Discussion / hints:

Fix patch:
diff --git a/BUILD.gn b/BUILD.gn
index 38c67abbdf03f..aacd4bde194a8 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -518,7 +518,10 @@ source_set("electron_lib") {
     "//third_party/blink/renderer",
   ]
 
-  defines = [ "V8_DEPRECATION_WARNINGS" ]
+  defines = [
+    "BLINK_MOJO_IMPL=1",
+    "V8_DEPRECATION_WARNINGS",
+  ]
   libs = []
 
   if (is_linux) {
diff --git a/patches/chromium/.patches b/patches/chromium/.patches
index 4fe947f0a77a7..b76c37f09b541 100644
--- a/patches/chromium/.patches
+++ b/patches/chromium/.patches
@@ -133,4 +133,3 @@ osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch
 feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch
 chore_partial_revert_of.patch
 fix_software_compositing_infinite_loop.patch
-revert_mojo_force_blink_headers_to_only_be_included_in_blink.patch
diff --git a/patches/chromium/revert_mojo_force_blink_headers_to_only_be_included_in_blink.patch b/patches/chromium/revert_mojo_force_blink_headers_to_only_be_included_in_blink.patch
deleted file mode 100644
index 207376b4e8519..0000000000000
--- a/patches/chromium/revert_mojo_force_blink_headers_to_only_be_included_in_blink.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: David Sanders <dsanders11@ucsbalum.com>
-Date: Wed, 30 Oct 2024 23:28:24 -0700
-Subject: Revert "[mojo] Force blink headers to only be included in blink"
-
-This reverts commit 83b7fc2ecb7341531fdd346a905618f6fab06d12.
-
-Revert this change until we determine the best way to land it in Electron.
-
-Refs: https://chromium-review.googlesource.com/c/chromium/src/+/5962696
-
-diff --git a/mojo/public/cpp/bindings/tests/BUILD.gn b/mojo/public/cpp/bindings/tests/BUILD.gn
-index 3395ffb932df565798b91229fe1fecf94f07ee86..763053a2a2b80a5d335c3459f4f2dfa55e363d82 100644
---- a/mojo/public/cpp/bindings/tests/BUILD.gn
-+++ b/mojo/public/cpp/bindings/tests/BUILD.gn
-@@ -110,7 +110,6 @@ source_set("tests") {
-       ":struct_with_traits_impl",
-       "//mojo/public/interfaces/bindings/tests:test_interfaces_blink",
-     ]
--    defines = [ "BLINK_MOJO_IMPL=1" ]
-   }
- }
- 
-@@ -132,8 +131,6 @@ if (use_blink) {
-       "wtf_types_unittest.cc",
-     ]
- 
--    defines = [ "BLINK_MOJO_IMPL=1" ]
--
-     deps = [
-       "//base/test:test_support",
-       "//mojo/public/cpp/bindings",
-diff --git a/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl
-index da123a97ef4f13258600cd9af461dc20dea0b2aa..9a86c5b47d3254cb6b5af5d609fa9eaaed0befd7 100644
---- a/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl
-+++ b/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl
-@@ -81,12 +81,6 @@
- #include "{{export_header}}"
- {%- endif %}
- 
--{%- if for_blink %}
--#if !BLINK_MOJO_IMPL && !INSIDE_BLINK
--#error "File must only be imported inside blink"
--#endif
--{%- endif %}
--
- {% if enable_kythe_annotations -%}
- #ifdef KYTHE_IS_RUNNING
- #pragma kythe_inline_metadata "Metadata comment"
-diff --git a/mojo/public/tools/bindings/mojom.gni b/mojo/public/tools/bindings/mojom.gni
-index 4a2e48024d5c56ed6accd93bc6b4827cac2e6257..8fe64783c2a443c194ad146a5399ce41d1a7663c 100644
---- a/mojo/public/tools/bindings/mojom.gni
-+++ b/mojo/public/tools/bindings/mojom.gni
-@@ -1368,9 +1368,6 @@ template("mojom") {
-           "base/component_export.h",
-         ]
-       }
--      if (defined(variant) && variant == "blink") {
--        export_defines += [ "BLINK_MOJO_IMPL=1" ]
--      }
- 
-       generator_cpp_output_suffixes = []
-       variant_dash_suffix = ""


Test patch: