dcheck.patch 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: deepak1556 <[email protected]>
  3. Date: Thu, 20 Sep 2018 17:44:38 -0700
  4. Subject: dcheck.patch
  5. This disables some debug checks which currently fail when running the Electron
  6. test suite. In general there should be sustained effort to have all debug checks
  7. enabled. If you want to help, choose one of the diffs below and remove it. Then
  8. build Electron (debug configuration) and make sure all tests pass on the CI
  9. systems. Unfortunately the tests don't always cover the check failures, so it's
  10. good to also run some non-trivial Electron app to verify.
  11. Apart from getting rid of a whole diff, you may also be able to replace one diff
  12. with another which enables at least some of the previously disabled checks. For
  13. example, the checks might be disabled for a whole build target, but actually
  14. only one or two specific checks fail. Then it's better to simply comment out the
  15. failing checks and allow the rest of the target to have them enabled.
  16. 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
  17. index 21e7b1cbada3856a7d91040c259be80ae95df07e..b19206ba58725f949403469a3e1d221b12833581 100644
  18. --- a/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc
  19. +++ b/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc
  20. @@ -542,8 +542,7 @@ void MobileFriendlinessChecker::NotifyInvalidatePaint(
  21. ->GetPageScaleConstraintsSet()
  22. .FinalConstraints()
  23. .initial_scale;
  24. - DCHECK_GT(initial_scale, 0);
  25. -
  26. + // DCHECK_GT(initial_scale, 0);
  27. double actual_font_size =
  28. style.FontSize() * initial_scale / viewport_scalar;
  29. double area = text->PhysicalAreaSize();
  30. diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
  31. index fe8d191217e24b08d36339dbf047beaeb6bd6538..870db0552544e3e89d9498c22ec3db81b46df741 100644
  32. --- a/ui/base/clipboard/clipboard_win.cc
  33. +++ b/ui/base/clipboard/clipboard_win.cc
  34. @@ -891,10 +891,10 @@ SkBitmap ClipboardWin::ReadBitmapInternal(ClipboardBuffer buffer) const {
  35. void ClipboardWin::WriteToClipboard(ClipboardFormatType format, HANDLE handle) {
  36. UINT cf_format = format.ToFormatEtc().cfFormat;
  37. - DCHECK_NE(clipboard_owner_->hwnd(), nullptr);
  38. + // DCHECK_NE(clipboard_owner_->hwnd(), nullptr);
  39. if (handle && !::SetClipboardData(cf_format, handle)) {
  40. - DCHECK_NE(GetLastError(),
  41. - static_cast<unsigned long>(ERROR_CLIPBOARD_NOT_OPEN));
  42. + // DCHECK_NE(GetLastError(),
  43. + // static_cast<unsigned long>(ERROR_CLIPBOARD_NOT_OPEN));
  44. ::GlobalFree(handle);
  45. }
  46. }