2018-10-24 18:24:11 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2018-09-21 00:30:26 +00:00
|
|
|
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.
|
|
|
|
|
2020-09-21 08:00:36 +00:00
|
|
|
diff --git a/content/browser/renderer_host/navigation_controller_impl.cc b/content/browser/renderer_host/navigation_controller_impl.cc
|
2021-03-04 23:46:13 +00:00
|
|
|
index 7cd8a4d740413a9d1d4687a7a05e98d432ba58c0..335d5b6f9a296f793a8b5e6ca08b3585d28582fe 100644
|
2020-09-21 08:00:36 +00:00
|
|
|
--- a/content/browser/renderer_host/navigation_controller_impl.cc
|
|
|
|
+++ b/content/browser/renderer_host/navigation_controller_impl.cc
|
2021-03-04 23:46:13 +00:00
|
|
|
@@ -1326,8 +1326,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
|
2018-09-14 05:02:16 +00:00
|
|
|
return NAVIGATION_TYPE_NEW_SUBFRAME;
|
|
|
|
}
|
2018-10-24 18:24:11 +00:00
|
|
|
|
2021-01-25 16:46:00 +00:00
|
|
|
- // We only clear the session history in tests when navigating to a new entry.
|
2018-09-14 05:02:16 +00:00
|
|
|
- DCHECK(!params.history_list_was_cleared);
|
|
|
|
+ // Electron does its own book keeping of navigation entries and we
|
|
|
|
+ // expect content to not track any, by clearing history list for
|
|
|
|
+ // all navigations.
|
|
|
|
+ // DCHECK(!params.history_list_was_cleared);
|
2018-10-24 18:24:11 +00:00
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
if (rfh->GetParent()) {
|
|
|
|
// All manual subframes would be did_create_new_entry and handled above, so
|
2021-03-04 23:46:13 +00:00
|
|
|
@@ -1618,7 +1620,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewEntry(
|
2018-09-14 05:02:16 +00:00
|
|
|
new_entry->GetFavicon() = GetLastCommittedEntry()->GetFavicon();
|
|
|
|
}
|
2018-10-24 18:24:11 +00:00
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
- DCHECK(!params.history_list_was_cleared || !replace_entry);
|
|
|
|
+ // Electron does its own book keeping of navigation entries and we
|
|
|
|
+ // expect content to not track any, by clearing history list for
|
|
|
|
+ // all navigations.
|
|
|
|
+ // DCHECK(!params.history_list_was_cleared || !replace_entry);
|
|
|
|
// The browser requested to clear the session history when it initiated the
|
|
|
|
// navigation. Now we know that the renderer has updated its state accordingly
|
|
|
|
// and it is safe to also clear the browser side history.
|
|
|
|
diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
|
2021-03-04 23:46:13 +00:00
|
|
|
index 84071dbb29c4394d9199132c403a416745a9adfa..10e895128ba8f32768e3aa5a2386fc91a02a8771 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/ui/base/clipboard/clipboard_win.cc
|
|
|
|
+++ b/ui/base/clipboard/clipboard_win.cc
|
2021-03-04 23:46:13 +00:00
|
|
|
@@ -924,10 +924,10 @@ SkBitmap ClipboardWin::ReadImageInternal(ClipboardBuffer buffer) const {
|
2018-10-24 18:24:11 +00:00
|
|
|
|
2020-03-03 21:35:05 +00:00
|
|
|
void ClipboardWin::WriteToClipboard(ClipboardFormatType format, HANDLE handle) {
|
|
|
|
UINT cf_format = format.ToFormatEtc().cfFormat;
|
2020-01-17 18:41:52 +00:00
|
|
|
- DCHECK_NE(clipboard_owner_->hwnd(), nullptr);
|
2020-03-03 21:35:05 +00:00
|
|
|
+ // DCHECK_NE(clipboard_owner_->hwnd(), nullptr);
|
|
|
|
if (handle && !::SetClipboardData(cf_format, handle)) {
|
2020-01-17 18:41:52 +00:00
|
|
|
- DCHECK_NE(GetLastError(),
|
|
|
|
- static_cast<unsigned long>(ERROR_CLIPBOARD_NOT_OPEN));
|
2020-03-03 21:35:05 +00:00
|
|
|
+ // DCHECK_NE(GetLastError(),
|
|
|
|
+ // static_cast<unsigned long>(ERROR_CLIPBOARD_NOT_OPEN));
|
|
|
|
FreeData(cf_format, handle);
|
2018-09-14 05:02:16 +00:00
|
|
|
}
|
|
|
|
}
|