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.
|
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
|
2018-10-24 18:24:11 +00:00
|
|
|
index d8aca9e2cbffdfd0bbb0bd67e8adfb53547132bb..86224ab7a3c5637422559da25bc8c1040a03e937 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/content/browser/frame_host/navigation_controller_impl.cc
|
|
|
|
+++ b/content/browser/frame_host/navigation_controller_impl.cc
|
2018-09-21 00:30:26 +00:00
|
|
|
@@ -995,8 +995,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
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
- // We only clear the session history when navigating to a new page.
|
|
|
|
- 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
|
2018-09-21 00:30:26 +00:00
|
|
|
@@ -1233,7 +1235,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
|
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/third_party/blink/renderer/platform/wtf/text/string_impl.h b/third_party/blink/renderer/platform/wtf/text/string_impl.h
|
2018-10-24 23:25:48 +00:00
|
|
|
index be183011e7f4e0af6f7676ac8a343ef36d2e7bc2..8b40c554912754b05d3bc5dc4889667f87935a0a 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/third_party/blink/renderer/platform/wtf/text/string_impl.h
|
|
|
|
+++ b/third_party/blink/renderer/platform/wtf/text/string_impl.h
|
|
|
|
@@ -258,21 +258,21 @@ class WTF_EXPORT StringImpl {
|
|
|
|
}
|
2018-10-24 18:24:11 +00:00
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
ALWAYS_INLINE bool HasOneRef() const {
|
|
|
|
-#if DCHECK_IS_ON()
|
|
|
|
+#if 0
|
|
|
|
DCHECK(IsStatic() || verifier_.IsSafeToUse()) << AsciiForDebugging();
|
|
|
|
#endif
|
|
|
|
return ref_count_ == 1;
|
|
|
|
}
|
2018-10-24 18:24:11 +00:00
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
ALWAYS_INLINE void AddRef() const {
|
|
|
|
-#if DCHECK_IS_ON()
|
|
|
|
+#if 0
|
|
|
|
DCHECK(IsStatic() || verifier_.OnRef(ref_count_)) << AsciiForDebugging();
|
|
|
|
#endif
|
|
|
|
++ref_count_;
|
|
|
|
}
|
2018-10-24 18:24:11 +00:00
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
ALWAYS_INLINE void Release() const {
|
|
|
|
-#if DCHECK_IS_ON()
|
|
|
|
+#if 0
|
|
|
|
DCHECK(IsStatic() || verifier_.OnDeref(ref_count_))
|
|
|
|
<< AsciiForDebugging() << " " << CurrentThread();
|
|
|
|
#endif
|
|
|
|
diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
|
2018-10-24 18:24:11 +00:00
|
|
|
index e49dd8c81270cdd9794ddee11bad036c2f444af5..9e61c901cd2df168520b83a8522ca8c032f4c0ae 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/ui/base/clipboard/clipboard_win.cc
|
|
|
|
+++ b/ui/base/clipboard/clipboard_win.cc
|
2018-09-14 18:03:43 +00:00
|
|
|
@@ -905,9 +905,9 @@ void ClipboardWin::WriteBitmapFromHandle(HBITMAP source_hbitmap,
|
2018-09-14 05:02:16 +00:00
|
|
|
}
|
2018-10-24 18:24:11 +00:00
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
void ClipboardWin::WriteToClipboard(unsigned int format, HANDLE handle) {
|
|
|
|
- DCHECK(clipboard_owner_->hwnd() != NULL);
|
|
|
|
+ // DCHECK(clipboard_owner_->hwnd() != NULL);
|
|
|
|
if (handle && !::SetClipboardData(format, handle)) {
|
|
|
|
- DCHECK(ERROR_CLIPBOARD_NOT_OPEN != GetLastError());
|
|
|
|
+ // DCHECK(ERROR_CLIPBOARD_NOT_OPEN != GetLastError());
|
|
|
|
FreeData(format, handle);
|
|
|
|
}
|
|
|
|
}
|