electron/patches/chromium/feat_expose_documentloader_setdefersloading_on_webdocumentloader.patch
electron-roller[bot] 5953dca8be
chore: bump chromium to 138.0.7204.15 (37-x-y) (#46980)
* chore: bump chromium in DEPS to 138.0.7166.1

* chore: bump chromium in DEPS to 138.0.7166.2

* chore: bump chromium in DEPS to 138.0.7168.1

* chore: bump chromium in DEPS to 138.0.7169.2

* chore: bump chromium in DEPS to 138.0.7170.1

* chore: bump chromium in DEPS to 138.0.7172.1

* chore: bump chromium in DEPS to 138.0.7173.0

* chore: bump chromium in DEPS to 138.0.7175.0

* chore: bump chromium in DEPS to 138.0.7177.1

* chore: bump chromium in DEPS to 138.0.7178.2

* chore: bump chromium in DEPS to 138.0.7180.1

* chore: bump chromium in DEPS to 138.0.7181.0

* chore: bump chromium in DEPS to 138.0.7182.2

* chore: bump chromium in DEPS to 138.0.7184.0

* chore: bump chromium in DEPS to 138.0.7186.0

* chore: bump chromium in DEPS to 138.0.7188.0

* chore: bump chromium in DEPS to 138.0.7190.1

* chore: bump chromium in DEPS to 138.0.7192.0

* chore: bump chromium in DEPS to 138.0.7194.1

* chore: bump chromium in DEPS to 138.0.7196.1

* chore: bump chromium in DEPS to 138.0.7198.1

* chore: bump chromium in DEPS to 138.0.7200.0

* chore: bump chromium in DEPS to 138.0.7202.0

* chore: bump chromium in DEPS to 138.0.7204.0

* chore: bump chromium in DEPS to 138.0.7204.5

* chore: bump chromium in DEPS to 138.0.7204.4

* 6543986: Mac: decouple deserializing and applying sandbox policy

Refs 6543986

(cherry picked from commit d386063e9d2414a35c91c4fa017665d950de5882)

* 6566111: Change UtilityProcessHost to manage its instance internally
Refs 6566111

(cherry picked from commit 93a0a91d447c118de33efec079365f5d0e8363db)

* chore: update patches

* 6577970: Remove superfluous includes for base/strings/stringprintf.h in headers
Refs 6577970

(cherry picked from commit 9ba045f3715d85792e4aa12139e7e05e0b772634)

* 6568811: Add FunctionCall structured metrics event for DevTools
Refs 6568811

(cherry picked from commit 79ae6f2c8b53568b6277998cfe9a91e3a1ee595b)

* [PDF Ink Signatures] Support PdfAnnotationsEnabled policy

6558970

* Mac: Switch to Xcode 16.3 (16E140) and SDK 15.4 (24E241)

6431799

* chore: bump chromium in DEPS to 138.0.7204.15

* chore: update patches

* fixup Mac: decouple deserializing and applying sandbox policy

6543986

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-06-09 09:32:23 -04:00

42 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 bcf51f743caa1e7da6cb80f2e219661cde0efab6..ddb36c1757ec7e0a3a1f19a2687a1f3e3d590b6e 100644
--- a/third_party/blink/renderer/core/loader/document_loader.h
+++ b/third_party/blink/renderer/core/loader/document_loader.h
@@ -325,7 +325,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
soft_navigation_heuristics_task_id,
bool should_skip_screenshot);
- void SetDefersLoading(LoaderFreezeMode);
+ void SetDefersLoading(LoaderFreezeMode) override;
DocumentLoadTiming& GetTiming() { return document_load_timing_; }