update chromium and v8 patches
This commit is contained in:
parent
aefb8911ec
commit
ef12492d6c
78 changed files with 2816 additions and 7025 deletions
|
@ -1,27 +1,82 @@
|
|||
From 0a8757b6650df0e762cc4ec400ecb7ee8ca7be4a 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.
|
||||
|
||||
Please keep the following lists updated.
|
||||
|
||||
The ELECTRON_NO_DCHECK build flag disables debug checks universally.
|
||||
This patch applies the flag to the following GN targets:
|
||||
|
||||
third_party/blink/renderer/core/loader:loader
|
||||
url:url
|
||||
|
||||
These files have debug checks explicitly commented out:
|
||||
|
||||
base/memory/weak_ptr.cc
|
||||
base/process/kill_win.cc
|
||||
components/viz/service/display/program_binding.h
|
||||
components/viz/service/display_embedder/server_shared_bitmap_manager.cc
|
||||
content/browser/frame_host/navigation_controller_impl.cc
|
||||
content/browser/frame_host/render_frame_host_impl.cc
|
||||
content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
ppapi/host/ppapi_host.cc
|
||||
third_party/blink/renderer/core/dom/node.cc
|
||||
third_party/blink/renderer/platform/wtf/text/string_impl.cc
|
||||
ui/base/clipboard/clipboard_win.cc
|
||||
|
||||
diff --git a/base/logging.h b/base/logging.h
|
||||
index 29960599a5c6..7352201e7b66 100644
|
||||
index 08c1f0fc5967..7a758ce3ef90 100644
|
||||
--- a/base/logging.h
|
||||
+++ b/base/logging.h
|
||||
@@ -874,7 +874,7 @@ const LogSeverity LOG_DCHECK = LOG_FATAL;
|
||||
|
||||
|
||||
#else // !(defined(_PREFAST_) && defined(OS_WIN))
|
||||
|
||||
|
||||
-#if DCHECK_IS_ON()
|
||||
+#if DCHECK_IS_ON() && !defined(ELECTRON_NO_DCHECK)
|
||||
|
||||
|
||||
#define DCHECK(condition) \
|
||||
LAZY_STREAM(LOG_STREAM(DCHECK), !ANALYZER_ASSUME_TRUE(condition)) \
|
||||
diff --git a/base/memory/weak_ptr.cc b/base/memory/weak_ptr.cc
|
||||
index c993fcb8a13a..80a5b708d259 100644
|
||||
--- a/base/memory/weak_ptr.cc
|
||||
+++ b/base/memory/weak_ptr.cc
|
||||
@@ -25,8 +25,8 @@ void WeakReference::Flag::Invalidate() {
|
||||
}
|
||||
|
||||
bool WeakReference::Flag::IsValid() const {
|
||||
- DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_)
|
||||
- << "WeakPtrs must be checked on the same sequenced thread.";
|
||||
+ // DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_)
|
||||
+ // << "WeakPtrs must be checked on the same sequenced thread.";
|
||||
return !invalidated_.IsSet();
|
||||
}
|
||||
|
||||
diff --git a/base/process/kill_win.cc b/base/process/kill_win.cc
|
||||
index 7a664429bcd3..26f49dc3d1e7 100644
|
||||
--- a/base/process/kill_win.cc
|
||||
+++ b/base/process/kill_win.cc
|
||||
@@ -23,7 +23,7 @@ TerminationStatus GetTerminationStatus(ProcessHandle handle, int* exit_code) {
|
||||
DWORD tmp_exit_code = 0;
|
||||
|
||||
|
||||
if (!::GetExitCodeProcess(handle, &tmp_exit_code)) {
|
||||
- DPLOG(FATAL) << "GetExitCodeProcess() failed";
|
||||
+ // DPLOG(FATAL) << "GetExitCodeProcess() failed";
|
||||
|
||||
|
||||
// This really is a random number. We haven't received any
|
||||
// information about the exit code, presumably because this
|
||||
diff --git a/base/process/process_metrics_win.cc b/base/process/process_metrics_win.cc
|
||||
|
@ -43,10 +98,10 @@ index 18ef58a725c3..239f319c8b4c 100644
|
|||
}
|
||||
}
|
||||
diff --git a/components/viz/service/display/program_binding.h b/components/viz/service/display/program_binding.h
|
||||
index 8b28c57f854e..a0e7056af23f 100644
|
||||
index 2a8fb9f54847..2c318b310b2a 100644
|
||||
--- a/components/viz/service/display/program_binding.h
|
||||
+++ b/components/viz/service/display/program_binding.h
|
||||
@@ -433,7 +433,7 @@ class VIZ_SERVICE_EXPORT Program : public ProgramBindingBase {
|
||||
@@ -434,7 +434,7 @@ class VIZ_SERVICE_EXPORT Program : public ProgramBindingBase {
|
||||
if (!ProgramBindingBase::Init(context_provider->ContextGL(),
|
||||
vertex_shader_.GetShaderString(),
|
||||
fragment_shader_.GetShaderString())) {
|
||||
|
@ -54,37 +109,37 @@ index 8b28c57f854e..a0e7056af23f 100644
|
|||
+ // DCHECK(IsContextLost(context_provider->ContextGL()));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -445,7 +445,7 @@ class VIZ_SERVICE_EXPORT Program : public ProgramBindingBase {
|
||||
|
||||
|
||||
@@ -446,7 +446,7 @@ class VIZ_SERVICE_EXPORT Program : public ProgramBindingBase {
|
||||
|
||||
// Link after binding uniforms
|
||||
if (!Link(context_provider->ContextGL())) {
|
||||
- DCHECK(IsContextLost(context_provider->ContextGL()));
|
||||
+ // DCHECK(IsContextLost(context_provider->ContextGL()));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
|
||||
index 74ff6b4286c2..02bf1c55d86f 100644
|
||||
index d8aca9e2cbff..86224ab7a3c5 100644
|
||||
--- a/content/browser/frame_host/navigation_controller_impl.cc
|
||||
+++ b/content/browser/frame_host/navigation_controller_impl.cc
|
||||
@@ -1083,8 +1083,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
|
||||
@@ -995,8 +995,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
|
||||
return NAVIGATION_TYPE_NEW_SUBFRAME;
|
||||
}
|
||||
|
||||
|
||||
- // 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);
|
||||
|
||||
|
||||
if (rfh->GetParent()) {
|
||||
// All manual subframes would be did_create_new_entry and handled above, so
|
||||
@@ -1305,7 +1307,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
|
||||
@@ -1233,7 +1235,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
|
||||
new_entry->GetFavicon() = GetLastCommittedEntry()->GetFavicon();
|
||||
}
|
||||
|
||||
|
||||
- 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
|
||||
|
@ -94,12 +149,12 @@ index 74ff6b4286c2..02bf1c55d86f 100644
|
|||
// 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/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
|
||||
index cd755cbc3f2c..321a12f74202 100644
|
||||
index 8e5af3e3b9c5..520dcffb5353 100644
|
||||
--- a/content/browser/frame_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/frame_host/render_frame_host_impl.cc
|
||||
@@ -2345,8 +2345,10 @@ void RenderFrameHostImpl::AllowBindings(int bindings_flags) {
|
||||
@@ -2416,8 +2416,10 @@ void RenderFrameHostImpl::AllowBindings(int bindings_flags) {
|
||||
}
|
||||
|
||||
|
||||
enabled_bindings_ |= bindings_flags;
|
||||
- if (GetParent())
|
||||
- DCHECK_EQ(GetParent()->GetEnabledBindings(), GetEnabledBindings());
|
||||
|
@ -107,43 +162,28 @@ index cd755cbc3f2c..321a12f74202 100644
|
|||
+ // Fix this when we use OOPIF in Electron.
|
||||
+ // if (GetParent())
|
||||
+ // DCHECK_EQ(GetParent()->GetEnabledBindings(), GetEnabledBindings());
|
||||
|
||||
|
||||
if (render_frame_created_) {
|
||||
if (!frame_bindings_control_)
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_cocoa.mm b/content/browser/renderer_host/render_widget_host_view_cocoa.mm
|
||||
index d86576cc36ac..5b4ae0732914 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_cocoa.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_cocoa.mm
|
||||
@@ -650,8 +650,8 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
if (EventIsReservedBySystem(theEvent))
|
||||
return;
|
||||
|
||||
- DCHECK(eventType != NSKeyDown ||
|
||||
- !equiv == !(modifierFlags & NSCommandKeyMask));
|
||||
+ // DCHECK(eventType != NSKeyDown ||
|
||||
+ // !equiv == !(modifierFlags & NSCommandKeyMask));
|
||||
|
||||
if (eventType == NSFlagsChanged) {
|
||||
// Ignore NSFlagsChanged events from the NumLock and Fn keys as
|
||||
diff --git a/ppapi/host/ppapi_host.cc b/ppapi/host/ppapi_host.cc
|
||||
index f3c68fab3de6..b8609daf3ef9 100644
|
||||
index 3f80e73535c8..bf40b94ad24c 100644
|
||||
--- a/ppapi/host/ppapi_host.cc
|
||||
+++ b/ppapi/host/ppapi_host.cc
|
||||
@@ -240,7 +240,7 @@ void PpapiHost::OnHostMsgResourceCreated(
|
||||
@@ -238,7 +238,7 @@ void PpapiHost::OnHostMsgResourceCreated(
|
||||
CreateResourceHost(params.pp_resource(), instance, nested_msg);
|
||||
|
||||
|
||||
if (!resource_host.get()) {
|
||||
- NOTREACHED();
|
||||
+ // NOTREACHED();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/dom/node.cc b/third_party/blink/renderer/core/dom/node.cc
|
||||
index ca47b2d09693..b4b6ce96209b 100644
|
||||
index 5629f8170851..bc773ac9b1e4 100644
|
||||
--- a/third_party/blink/renderer/core/dom/node.cc
|
||||
+++ b/third_party/blink/renderer/core/dom/node.cc
|
||||
@@ -2535,7 +2535,7 @@ StaticNodeList* Node::getDestinationInsertionPoints() {
|
||||
|
||||
@@ -2568,7 +2568,7 @@ StaticNodeList* Node::getDestinationInsertionPoints() {
|
||||
|
||||
HTMLSlotElement* Node::AssignedSlot() const {
|
||||
// assignedSlot doesn't need to call updateDistribution().
|
||||
- DCHECK(!IsPseudoElement());
|
||||
|
@ -152,10 +192,10 @@ index ca47b2d09693..b4b6ce96209b 100644
|
|||
return root->AssignedSlotFor(*this);
|
||||
return nullptr;
|
||||
diff --git a/third_party/blink/renderer/core/loader/BUILD.gn b/third_party/blink/renderer/core/loader/BUILD.gn
|
||||
index 82f6e8bc9d33..ccad95d61a4a 100644
|
||||
index 49b4ead3dc52..0083e5c8efb7 100644
|
||||
--- a/third_party/blink/renderer/core/loader/BUILD.gn
|
||||
+++ b/third_party/blink/renderer/core/loader/BUILD.gn
|
||||
@@ -129,4 +129,11 @@ blink_core_sources("loader") {
|
||||
@@ -135,4 +135,11 @@ blink_core_sources("loader") {
|
||||
public_deps = [
|
||||
"//third_party/blink/renderer/platform",
|
||||
]
|
||||
|
@ -168,12 +208,12 @@ index 82f6e8bc9d33..ccad95d61a4a 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/third_party/blink/renderer/platform/wtf/text/string_impl.h b/third_party/blink/renderer/platform/wtf/text/string_impl.h
|
||||
index 158d81ca9ba2..1b6aafecadef 100644
|
||||
index 0e7c40b732ec..7c513d95a586 100644
|
||||
--- 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 {
|
||||
}
|
||||
|
||||
|
||||
ALWAYS_INLINE bool HasOneRef() const {
|
||||
-#if DCHECK_IS_ON()
|
||||
+#if 0
|
||||
|
@ -181,7 +221,7 @@ index 158d81ca9ba2..1b6aafecadef 100644
|
|||
#endif
|
||||
return ref_count_ == 1;
|
||||
}
|
||||
|
||||
|
||||
ALWAYS_INLINE void AddRef() const {
|
||||
-#if DCHECK_IS_ON()
|
||||
+#if 0
|
||||
|
@ -189,7 +229,7 @@ index 158d81ca9ba2..1b6aafecadef 100644
|
|||
#endif
|
||||
++ref_count_;
|
||||
}
|
||||
|
||||
|
||||
ALWAYS_INLINE void Release() const {
|
||||
-#if DCHECK_IS_ON()
|
||||
+#if 0
|
||||
|
@ -202,7 +242,7 @@ index e49dd8c81270..9e61c901cd2d 100644
|
|||
+++ b/ui/base/clipboard/clipboard_win.cc
|
||||
@@ -905,9 +905,9 @@ void ClipboardWin::WriteBitmapFromHandle(HBITMAP source_hbitmap,
|
||||
}
|
||||
|
||||
|
||||
void ClipboardWin::WriteToClipboard(unsigned int format, HANDLE handle) {
|
||||
- DCHECK(clipboard_owner_->hwnd() != NULL);
|
||||
+ // DCHECK(clipboard_owner_->hwnd() != NULL);
|
||||
|
@ -213,7 +253,7 @@ index e49dd8c81270..9e61c901cd2d 100644
|
|||
}
|
||||
}
|
||||
diff --git a/url/BUILD.gn b/url/BUILD.gn
|
||||
index c4deb10db9ca..ecc068d7447a 100644
|
||||
index 57bbe16c15ea..07725187c595 100644
|
||||
--- a/url/BUILD.gn
|
||||
+++ b/url/BUILD.gn
|
||||
@@ -98,6 +98,10 @@ component("url") {
|
||||
|
@ -225,8 +265,7 @@ index c4deb10db9ca..ecc068d7447a 100644
|
|||
+ defines += [ "ELECTRON_NO_DCHECK" ]
|
||||
+ }
|
||||
}
|
||||
|
||||
if (is_android) {
|
||||
--
|
||||
2.17.0
|
||||
|
||||
if (is_android) {
|
||||
--
|
||||
2.17.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue