Files
electron/patches/chromium/feat_expose_documentloader_setdefersloading_on_webdocumentloader.patch
electron-roller[bot] b847299f19 chore: bump chromium to 146.0.7650.0 (main) (#49496)
* chore: bump chromium in DEPS to 146.0.7650.0

* 7496671: WaaP: Control hung delay for Initial WebUI

Refs https://chromium-review.googlesource.com/c/chromium/src/+/7496671

* 7494302: [//media] Rename renderable_gpu_memory_buffer_video_frame_pool*

Refs https://chromium-review.googlesource.com/c/chromium/src/+/7494302

* chore: update patches

* 7502996: [DevTools] Add ability to toggle Chromium feature flags from DevTools

Refs https://chromium-review.googlesource.com/c/chromium/src/+/7502996

* 7456200: Vectorize StringImpl::CopyChars and EqualIgnoringASCIICase using Highway.

Refs https://chromium-review.googlesource.com/c/chromium/src/+/7456200

* 7236627: spellcheck: supply full spelling marker info, incld. marker type

Refs https://chromium-review.googlesource.com/c/chromium/src/+/7236627

* chore: rm dependency on wtf::string from blink public headers

Refs https://chromium-review.googlesource.com/c/chromium/src/+/7456200
added a public dependency on //third_party/highway for
//third_party/blink/renderer/platform/wtf:wtf which will not be
inherited by //content/renderer since wtf is internal dependency of
blink leading to the following compilation error

```
In file included from ../../content/public/renderer/window_features_converter.cc:5:
In file included from ../../content/public/renderer/window_features_converter.h:10:
In file included from ../../third_party/blink/public/web/web_window_features.h:38:
In file included from ../../third_party/blink/renderer/platform/wtf/text/wtf_string.h:40:
../../third_party/blink/renderer/platform/wtf/text/string_impl.h:27:10: fatal error: 'hwy/highway.h' file not found
   27 | #include <hwy/highway.h>
      |          ^~~~~~~~~~~~~~~
1 error generated.
```

Use `gn desc out/Testing content/renderer:renderer_sources --blame`
to verify the inherited config and dependency list.

* 7493995: Restore directive part of wasm-eval error message

Refs https://chromium-review.googlesource.com/c/chromium/src/+/7493995

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2026-01-26 11:18:09 -08:00

43 lines
2.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <marshallofsound@electronjs.org>
Date: Thu, 9 Mar 2023 01:28:56 -0800
Subject: feat: expose DocumentLoader::SetDefersLoading on WebDocumentLoader
This allows embedders to call SetDefersLoading without reaching into Blink internals. Electron uses this to defer page loading until the preload scripts have finished executing.
This might be upstreamable?
diff --git a/third_party/blink/public/web/web_document_loader.h b/third_party/blink/public/web/web_document_loader.h
index 33e23680b927d417b0882c7572fe32dc2d2b90c3..9413492f8e0fd6c5371c66329e1ad6d4163ba670 100644
--- a/third_party/blink/public/web/web_document_loader.h
+++ b/third_party/blink/public/web/web_document_loader.h
@@ -38,6 +38,7 @@
#include "third_party/blink/public/platform/cross_variant_mojo_util.h"
#include "third_party/blink/public/platform/web_archive_info.h"
#include "third_party/blink/public/platform/web_common.h"
+#include "third_party/blink/public/platform/web_loader_freeze_mode.h"
#include "third_party/blink/public/platform/web_source_location.h"
#include "third_party/blink/public/web/web_navigation_type.h"
@@ -63,6 +64,8 @@ class BLINK_EXPORT WebDocumentLoader {
virtual std::unique_ptr<ExtraData> Clone() = 0;
};
+ virtual void SetDefersLoading(WebLoaderFreezeMode) = 0;
+
static bool WillLoadUrlAsEmpty(const WebURL&);
// Returns the http referrer of original request which initited this load.
diff --git a/third_party/blink/renderer/core/loader/document_loader.h b/third_party/blink/renderer/core/loader/document_loader.h
index 65e50de149ebc487eb10e0e1c1613ebc1b9005e8..020b0325d59907061319defc5ace6858a78be86f 100644
--- a/third_party/blink/renderer/core/loader/document_loader.h
+++ b/third_party/blink/renderer/core/loader/document_loader.h
@@ -322,7 +322,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
std::optional<scheduler::TaskAttributionId> task_state_id,
bool should_skip_screenshot);
- void SetDefersLoading(LoaderFreezeMode);
+ void SetDefersLoading(LoaderFreezeMode) override;
DocumentLoadTiming& GetTiming() { return document_load_timing_; }