electron/patches/chromium/dcheck.patch

51 строка
2.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Thu, 20 Sep 2018 17:44:38 -0700
Subject: dcheck.patch
This disables some debug checks which currently fail when running the Electron
test suite. In general there should be sustained effort to have all debug checks
enabled. If you want to help, choose one of the diffs below and remove it. Then
build Electron (debug configuration) and make sure all tests pass on the CI
systems. Unfortunately the tests don't always cover the check failures, so it's
good to also run some non-trivial Electron app to verify.
Apart from getting rid of a whole diff, you may also be able to replace one diff
with another which enables at least some of the previously disabled checks. For
example, the checks might be disabled for a whole build target, but actually
only one or two specific checks fail. Then it's better to simply comment out the
failing checks and allow the rest of the target to have them enabled.
diff --git a/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc b/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc
index 8a68c53e35dafce5fced1ad2c7ff5dad83ffbf3c..ee615d3eb03232b34f5acbb58490c7de9ad08cfd 100644
--- a/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc
+++ b/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc
@@ -495,8 +495,7 @@ void MobileFriendlinessChecker::NotifyInvalidatePaint(
->GetPageScaleConstraintsSet()
.FinalConstraints()
.initial_scale;
- DCHECK_GT(initial_scale, 0);
-
+ // DCHECK_GT(initial_scale, 0);
double actual_font_size =
style.FontSize() * initial_scale / viewport_scalar;
double area = text->PhysicalAreaSize();
diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
index fe8d191217e24b08d36339dbf047beaeb6bd6538..870db0552544e3e89d9498c22ec3db81b46df741 100644
--- a/ui/base/clipboard/clipboard_win.cc
+++ b/ui/base/clipboard/clipboard_win.cc
@@ -891,10 +891,10 @@ SkBitmap ClipboardWin::ReadBitmapInternal(ClipboardBuffer buffer) const {
void ClipboardWin::WriteToClipboard(ClipboardFormatType format, HANDLE handle) {
UINT cf_format = format.ToFormatEtc().cfFormat;
- DCHECK_NE(clipboard_owner_->hwnd(), nullptr);
+ // DCHECK_NE(clipboard_owner_->hwnd(), nullptr);
if (handle && !::SetClipboardData(cf_format, handle)) {
- DCHECK_NE(GetLastError(),
- static_cast<unsigned long>(ERROR_CLIPBOARD_NOT_OPEN));
+ // DCHECK_NE(GetLastError(),
+ // static_cast<unsigned long>(ERROR_CLIPBOARD_NOT_OPEN));
::GlobalFree(handle);
}
}