  }
  
  buildflag_header("accessibility_flags") {
+diff --git a/content/child/BUILD.gn b/content/child/BUILD.gn
+index db74c7691680..29e5895304be 100644
+--- a/content/child/BUILD.gn
++++ b/content/child/BUILD.gn
+@@ -293,6 +293,13 @@ target(link_target_type, "child") {
+     "//content:content_implementation",
+     "//build/config/compiler:no_size_t_to_int_warning",
+   ]
++
++  if (is_electron_build) {
++    if (!defined(defines)) {
++      defines = []
++    }
++    defines += [ "ELECTRON_NO_DCHECK" ]
++  }
+ }
+ 
+ # See comment at the top of //content/BUILD.gn for how this works.
 diff --git a/device/geolocation/BUILD.gn b/device/geolocation/BUILD.gn
 index 27069c5f9700..8a4bb3842a42 100644
 --- a/device/geolocation/BUILD.gn

 }
 
 grit("net_resources") {
diff --git a/third_party/WebKit/Source/platform/BUILD.gn b/third_party/WebKit/Source/platform/BUILD.gn
index 7806a71..4550819 100644
--- a/third_party/WebKit/Source/platform/BUILD.gn

@@ -1707,6 +1707,10 @@ component("platform") {
     configs -= [ "//build/config/compiler:default_symbols" ]
     configs += remove_webcore_symbols_config
   }
+
+  if (is_electron_build) {
+    defines += [ "ELECTRON_NO_DCHECK" ]
+  }
 }
 
 static_library("test_support") {
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index 119d0fab47c9..7f9110f8b197 100644
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -647,6 +647,10 @@ component("base") {
   if (is_android || is_ios) {
     sources -= [ "device_form_factor_desktop.cc" ]
   }
+
+  if (is_electron_build) {
