mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Compare commits
8 Commits
v29.0.0-al
...
v30.0.0-ni
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
66b2f697ea | ||
|
|
83f15bd957 | ||
|
|
a6417cc265 | ||
|
|
08a51f3339 | ||
|
|
890a557eed | ||
|
|
5094cb4115 | ||
|
|
2eb13d377e | ||
|
|
93fdc8d33c |
16
.github/workflows/branch-created.yml
vendored
16
.github/workflows/branch-created.yml
vendored
@@ -1,6 +1,12 @@
|
||||
name: Branch Created
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch-name:
|
||||
description: Branch name (e.g. `29-x-y`)
|
||||
required: true
|
||||
type: string
|
||||
create:
|
||||
|
||||
permissions: {}
|
||||
@@ -8,7 +14,7 @@ permissions: {}
|
||||
jobs:
|
||||
release-branch-created:
|
||||
name: Release Branch Created
|
||||
if: ${{ github.event.ref_type == 'branch' && endsWith(github.event.ref, '-x-y') && !startsWith(github.event.ref, 'roller') }}
|
||||
if: ${{ github.event_name == 'workflow_dispatch' || (github.event.ref_type == 'branch' && endsWith(github.event.ref, '-x-y') && !startsWith(github.event.ref, 'roller')) }}
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
@@ -18,10 +24,10 @@ jobs:
|
||||
- name: Determine Major Version
|
||||
id: check-major-version
|
||||
run: |
|
||||
if [[ ${{ github.event.ref }} =~ ^([0-9]+)-x-y$ ]]; then
|
||||
if [[ ${{ github.event.inputs.branch-name || github.event.ref }} =~ ^([0-9]+)-x-y$ ]]; then
|
||||
echo "MAJOR=${BASH_REMATCH[1]}" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "Not a release branch: ${{ github.event.ref }}"
|
||||
echo "Not a release branch: ${{ github.event.inputs.branch-name || github.event.ref }}"
|
||||
fi
|
||||
- name: New Release Branch Tasks
|
||||
if: ${{ steps.check-major-version.outputs.MAJOR }}
|
||||
@@ -93,7 +99,9 @@ jobs:
|
||||
project-number: 64
|
||||
# TODO - Set to public once GitHub fixes their GraphQL bug
|
||||
# public: true
|
||||
link-to-repository: electron/electron
|
||||
# TODO - Enable once GitHub doesn't require overly broad, read
|
||||
# and write permission for repo "Contents" to link
|
||||
# link-to-repository: electron/electron
|
||||
template-view: ${{ steps.generate-project-metadata.outputs.template-view }}
|
||||
title: ${{ steps.generate-project-metadata.outputs.major }}-x-y
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
|
||||
4
DEPS
4
DEPS
@@ -2,9 +2,9 @@ gclient_gn_args_from = 'src'
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'121.0.6147.0',
|
||||
'121.0.6159.0',
|
||||
'node_version':
|
||||
'v20.9.0',
|
||||
'v20.10.0',
|
||||
'nan_version':
|
||||
'e14bdcd1f72d62bca1d541b66da43130384ec213',
|
||||
'squirrel.mac_version':
|
||||
|
||||
@@ -59,8 +59,14 @@ static_library("chrome") {
|
||||
"//chrome/browser/net/proxy_service_factory.h",
|
||||
"//chrome/browser/picture_in_picture/picture_in_picture_bounds_cache.cc",
|
||||
"//chrome/browser/picture_in_picture/picture_in_picture_bounds_cache.h",
|
||||
"//chrome/browser/picture_in_picture/picture_in_picture_occlusion_tracker.cc",
|
||||
"//chrome/browser/picture_in_picture/picture_in_picture_occlusion_tracker.h",
|
||||
"//chrome/browser/picture_in_picture/picture_in_picture_occlusion_tracker_observer.cc",
|
||||
"//chrome/browser/picture_in_picture/picture_in_picture_occlusion_tracker_observer.h",
|
||||
"//chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc",
|
||||
"//chrome/browser/picture_in_picture/picture_in_picture_window_manager.h",
|
||||
"//chrome/browser/picture_in_picture/scoped_picture_in_picture_occlusion_observation.cc",
|
||||
"//chrome/browser/picture_in_picture/scoped_picture_in_picture_occlusion_observation.h",
|
||||
"//chrome/browser/platform_util.cc",
|
||||
"//chrome/browser/platform_util.h",
|
||||
"//chrome/browser/predictors/preconnect_manager.cc",
|
||||
|
||||
@@ -14,10 +14,10 @@ process:
|
||||
|
||||
Electron will listen for V8 inspector protocol messages on the specified `port`,
|
||||
an external debugger will need to connect on this port. The default `port` is
|
||||
`5858`.
|
||||
`9229`.
|
||||
|
||||
```shell
|
||||
electron --inspect=5858 your/app
|
||||
electron --inspect=9229 your/app
|
||||
```
|
||||
|
||||
### `--inspect-brk=[port]`
|
||||
|
||||
@@ -9,7 +9,7 @@ check out our [Electron Versioning](./electron-versioning.md) doc.
|
||||
|
||||
| Electron | Alpha | Beta | Stable | EOL | Chrome | Node | Supported |
|
||||
| ------- | ----- | ------- | ------ | ------ | ---- | ---- | ---- |
|
||||
| 29.0.0 | 2023-Dec-07 | 2023-Jan-24 | 2023-Feb-20 | 2024-Aug-20 | M122 | v18.19 | ✅ |
|
||||
| 29.0.0 | 2023-Dec-07 | 2024-Jan-24 | 2024-Feb-20 | 2024-Aug-20 | M122 | v18.19 | ✅ |
|
||||
| 28.0.0 | 2023-Oct-11 | 2023-Nov-06 | 2023-Dec-05 | 2024-Jun-11 | M120 | v18.18 | ✅ |
|
||||
| 27.0.0 | 2023-Aug-17 | 2023-Sep-13 | 2023-Oct-10 | 2024-Apr-16 | M118 | v18.17 | ✅ |
|
||||
| 26.0.0 | 2023-Jun-01 | 2023-Jun-27 | 2023-Aug-15 | 2024-Feb-20 | M116 | v18.16 | ✅ |
|
||||
|
||||
@@ -88,6 +88,7 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__algorithm/pstl_backends/cpu_backends/transform_reduce.h",
|
||||
"//third_party/libc++/src/include/__algorithm/pstl_copy.h",
|
||||
"//third_party/libc++/src/include/__algorithm/pstl_count.h",
|
||||
"//third_party/libc++/src/include/__algorithm/pstl_equal.h",
|
||||
"//third_party/libc++/src/include/__algorithm/pstl_fill.h",
|
||||
"//third_party/libc++/src/include/__algorithm/pstl_find.h",
|
||||
"//third_party/libc++/src/include/__algorithm/pstl_for_each.h",
|
||||
@@ -851,6 +852,7 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__utility/integer_sequence.h",
|
||||
"//third_party/libc++/src/include/__utility/is_pointer_in_range.h",
|
||||
"//third_party/libc++/src/include/__utility/move.h",
|
||||
"//third_party/libc++/src/include/__utility/no_destroy.h",
|
||||
"//third_party/libc++/src/include/__utility/pair.h",
|
||||
"//third_party/libc++/src/include/__utility/piecewise_construct.h",
|
||||
"//third_party/libc++/src/include/__utility/priority_tag.h",
|
||||
@@ -921,23 +923,12 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/experimental/__simd/traits.h",
|
||||
"//third_party/libc++/src/include/experimental/__simd/utility.h",
|
||||
"//third_party/libc++/src/include/experimental/__simd/vec_ext.h",
|
||||
"//third_party/libc++/src/include/experimental/deque",
|
||||
"//third_party/libc++/src/include/experimental/forward_list",
|
||||
"//third_party/libc++/src/include/experimental/iterator",
|
||||
"//third_party/libc++/src/include/experimental/list",
|
||||
"//third_party/libc++/src/include/experimental/map",
|
||||
"//third_party/libc++/src/include/experimental/memory",
|
||||
"//third_party/libc++/src/include/experimental/memory_resource",
|
||||
"//third_party/libc++/src/include/experimental/propagate_const",
|
||||
"//third_party/libc++/src/include/experimental/regex",
|
||||
"//third_party/libc++/src/include/experimental/set",
|
||||
"//third_party/libc++/src/include/experimental/simd",
|
||||
"//third_party/libc++/src/include/experimental/string",
|
||||
"//third_party/libc++/src/include/experimental/type_traits",
|
||||
"//third_party/libc++/src/include/experimental/unordered_map",
|
||||
"//third_party/libc++/src/include/experimental/unordered_set",
|
||||
"//third_party/libc++/src/include/experimental/utility",
|
||||
"//third_party/libc++/src/include/experimental/vector",
|
||||
"//third_party/libc++/src/include/ext/__hash",
|
||||
"//third_party/libc++/src/include/ext/hash_map",
|
||||
"//third_party/libc++/src/include/ext/hash_set",
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
build_gn.patch
|
||||
dcheck.patch
|
||||
accelerator.patch
|
||||
blink_file_path.patch
|
||||
blink_local_frame.patch
|
||||
@@ -127,5 +126,4 @@ fix_activate_background_material_on_windows.patch
|
||||
feat_allow_passing_of_objecttemplate_to_objecttemplatebuilder.patch
|
||||
chore_remove_check_is_test_on_script_injection_tracker.patch
|
||||
fix_restore_original_resize_performance_on_macos.patch
|
||||
fix_font_flooding_in_dev_tools.patch
|
||||
feat_allow_code_cache_in_custom_schemes.patch
|
||||
|
||||
@@ -10,7 +10,7 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
|
||||
This should be upstreamed.
|
||||
|
||||
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
|
||||
index 8d9c853f7fe861ed7ff790fa2c02706b3a2c7264..fa9717eeb7a6f46aebf14d1fc00e2b19741b55a2 100644
|
||||
index 3f18e426a88127090a6f62a08a5e09185f704c35..a04b115c45a24936a5418af179d6e35312c6fd31 100644
|
||||
--- a/content/gpu/gpu_main.cc
|
||||
+++ b/content/gpu/gpu_main.cc
|
||||
@@ -264,6 +264,10 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
|
||||
@@ -10,10 +10,10 @@ DidCreateScriptContext is called, not all JS APIs are available in the
|
||||
context, which can cause some preload scripts to trip.
|
||||
|
||||
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
|
||||
index c302f3e672cea9b73591048cf581f3e81078d5cb..eb1d1b0b59e687b996e76c205a8712346089c04b 100644
|
||||
index 27d84a5d61f39dc039608b8a1e84bca47cb8d5d3..5a9bdc6593a9262bdcf6d9ad007f6e9388892086 100644
|
||||
--- a/content/public/renderer/render_frame_observer.h
|
||||
+++ b/content/public/renderer/render_frame_observer.h
|
||||
@@ -140,6 +140,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
|
||||
@@ -141,6 +141,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
|
||||
virtual void DidHandleOnloadEvents() {}
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
int32_t world_id) {}
|
||||
@@ -23,10 +23,10 @@ index c302f3e672cea9b73591048cf581f3e81078d5cb..eb1d1b0b59e687b996e76c205a871234
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 9bea02ba22dc601e57406513ed02c8704bf587de..ccd3c27b7537f9c1adce9d32137d0e596be7c545 100644
|
||||
index 7f9d758df761b1d7946d80900e35dec833dea48e..1443c3cbc7ad79fba2a3f42a172a97422a470170 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4565,6 +4565,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
@@ -4573,6 +4573,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
observer.DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ index 9bea02ba22dc601e57406513ed02c8704bf587de..ccd3c27b7537f9c1adce9d32137d0e59
|
||||
int world_id) {
|
||||
for (auto& observer : observers_)
|
||||
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
|
||||
index 6fa0c635d1080cf2d7dbc0c7bd2c9bb5c083b986..dee1c7e60a998fd1947b4ff542872de0eb8d87cd 100644
|
||||
index 05c969e5ae96170ed9cf99bba6bb52ef11f9d158..16c4e4ef47d928bb3abf8650dd8af17cee9aa3c0 100644
|
||||
--- a/content/renderer/render_frame_impl.h
|
||||
+++ b/content/renderer/render_frame_impl.h
|
||||
@@ -621,6 +621,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
@@ -620,6 +620,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
void DidObserveLayoutShift(double score, bool after_input_or_scroll) override;
|
||||
void DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
int world_id) override;
|
||||
@@ -53,10 +53,10 @@ index 6fa0c635d1080cf2d7dbc0c7bd2c9bb5c083b986..dee1c7e60a998fd1947b4ff542872de0
|
||||
int world_id) override;
|
||||
void DidChangeScrollOffset() override;
|
||||
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
|
||||
index ac82f8a9c14546d09e0181da93fbc361dc09dd78..94e177829c75ba3f4b33b4ca0802173e7faa1b92 100644
|
||||
index bc8e5ac55bd663ecd95b7d61e899a13ae7e0c5bd..f7ca98a8b04fec36b3ccd1a75068e41787b21431 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame_client.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame_client.h
|
||||
@@ -619,6 +619,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
@@ -634,6 +634,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) {}
|
||||
|
||||
@@ -79,7 +79,7 @@ index e22ccf32a9e3c596e44506244f284f1c2be86762..65ff494dc7c5676fbb534c1dd1854010
|
||||
if (World().IsMainWorld()) {
|
||||
probe::DidCreateMainWorldContext(GetFrame());
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
index e982a11fc5412a9dce2ecde8af2fdaab4b2d56e7..a2169ba91e8856667b300672ed1a64841bf9c3a6 100644
|
||||
index 98a8a2c427cc60408e1042ce6b2fcd58afa0150d..3e179d19ffd078ca85b5a6c050cc23b8c43cad30 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
@@ -302,6 +302,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
@@ -92,7 +92,7 @@ index e982a11fc5412a9dce2ecde8af2fdaab4b2d56e7..a2169ba91e8856667b300672ed1a6484
|
||||
int32_t world_id) = 0;
|
||||
virtual bool AllowScriptExtensions() = 0;
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
index 150f4280ec4c3829c14da8166ab2a4e9c043d551..b9dd77befa57677fa2b1f507c90cf0bedd09eafa 100644
|
||||
index 13a48fefbdf9eb1845522ace6c551fb7af7807db..41915ebed1e41970d8d61785a3aa89cedeb279d2 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
@@ -283,6 +283,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
@@ -110,7 +110,7 @@ index 150f4280ec4c3829c14da8166ab2a4e9c043d551..b9dd77befa57677fa2b1f507c90cf0be
|
||||
v8::Local<v8::Context> context,
|
||||
int32_t world_id) {
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
index 19b6d04a1dc5ae33fa1ede248fd580a4eb95ede6..2b238811b634f449a90ee7cf5d19c2e55343eb10 100644
|
||||
index 1c8f50ee733b4caba9a6ee4a7fe025dfb412a47a..29e8fdcb7d34f30674ed86a0024ee5c23dbb503e 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
@@ -84,6 +84,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
|
||||
@@ -7,10 +7,10 @@ Ensure that licenses for the dependencies introduced by Electron
|
||||
are included in `LICENSES.chromium.html`
|
||||
|
||||
diff --git a/tools/licenses/licenses.py b/tools/licenses/licenses.py
|
||||
index 71dbd96a807f338752dd45bbb81a4b0e7ff63ca2..659caaf9e1ab93954704b2e5dbe7ddedc11f6a6d 100755
|
||||
index 03015b85bdf0ef82991e2359f537ae92d5612073..be801e0a1b7797fca4c057326fae05ae5cc4c377 100755
|
||||
--- a/tools/licenses/licenses.py
|
||||
+++ b/tools/licenses/licenses.py
|
||||
@@ -415,6 +415,31 @@ SPECIAL_CASES = {
|
||||
@@ -419,6 +419,31 @@ SPECIAL_CASES = {
|
||||
"License": "Apache 2.0",
|
||||
"License File": ["//third_party/selenium-atoms/LICENSE.closure"],
|
||||
},
|
||||
|
||||
@@ -49,7 +49,7 @@ index a1732d9bf9267e52a74350483fa946b5a0a0662b..25d36b301309ac9f8c1a4d75545fa741
|
||||
// its owning reference back to our owning LocalFrame.
|
||||
client_->Detached(type);
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
index 5987aaa537ea37ef6c1145b606d5aee5b5511c0a..3d564401f00f9b65ea232470602d5215caf0d94f 100644
|
||||
index f0603331994109f168ebd163c3fb237bf6db000a..e436857b89266589986ed08857943339b3a48b98 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -674,10 +674,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
|
||||
@@ -11,7 +11,7 @@ if we ever align our .pak file generation with Chrome we can remove this
|
||||
patch.
|
||||
|
||||
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
|
||||
index cc22e9c43562086396509548a4fe7e2f0ae22f80..705b0e067d8b702a5306334ae9d68eef2c11106d 100644
|
||||
index 035a3b539c900e7d480488b0b650d565dad974e4..daa59a5e8200e29382b1aff9431bc68f4e8cbd38 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -200,11 +200,16 @@ if (!is_android && !is_mac) {
|
||||
@@ -33,7 +33,7 @@ index cc22e9c43562086396509548a4fe7e2f0ae22f80..705b0e067d8b702a5306334ae9d68eef
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index 8704f445741b416c7763d53440cb410bd72d0fc4..a708ee20c84ee2cb667bcae5fc493803b3f044b7 100644
|
||||
index 979638c93db4f9d4fecea6d7270ac198d6642c25..0f0a969d06a13434fc35aab8ea0c2330f27639d5 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4811,7 +4811,7 @@ static_library("browser") {
|
||||
@@ -46,10 +46,10 @@ index 8704f445741b416c7763d53440cb410bd72d0fc4..a708ee20c84ee2cb667bcae5fc493803
|
||||
sources += [ "certificate_viewer_stub.cc" ]
|
||||
}
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index cd439e952c39a02d326f114acf7da18eac404692..540ef46a5d7708d0385dd57c8e68579e52fb32d8 100644
|
||||
index 97e34eed359411cd829d17b809cbedf47b669356..a18aae470ee7a4c0507ffae60990d8467c0a767a 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -7156,7 +7156,6 @@ test("unit_tests") {
|
||||
@@ -7182,7 +7182,6 @@ test("unit_tests") {
|
||||
|
||||
deps += [
|
||||
"//chrome:other_version",
|
||||
@@ -57,7 +57,7 @@ index cd439e952c39a02d326f114acf7da18eac404692..540ef46a5d7708d0385dd57c8e68579e
|
||||
"//chrome//services/util_win:unit_tests",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
"//chrome/app:win_unit_tests",
|
||||
@@ -7177,6 +7176,10 @@ test("unit_tests") {
|
||||
@@ -7203,6 +7202,10 @@ test("unit_tests") {
|
||||
"//ui/resources",
|
||||
]
|
||||
|
||||
@@ -68,7 +68,7 @@ index cd439e952c39a02d326f114acf7da18eac404692..540ef46a5d7708d0385dd57c8e68579e
|
||||
ldflags = [
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll",
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
|
||||
@@ -8193,7 +8196,6 @@ test("unit_tests") {
|
||||
@@ -8224,7 +8227,6 @@ test("unit_tests") {
|
||||
}
|
||||
|
||||
deps += [
|
||||
@@ -76,7 +76,7 @@ index cd439e952c39a02d326f114acf7da18eac404692..540ef46a5d7708d0385dd57c8e68579e
|
||||
"//chrome/browser/apps:icon_standardizer",
|
||||
"//chrome/browser/apps/app_service",
|
||||
"//chrome/browser/apps/app_service:app_registry_cache_waiter",
|
||||
@@ -8285,6 +8287,10 @@ test("unit_tests") {
|
||||
@@ -8316,6 +8318,10 @@ test("unit_tests") {
|
||||
"//ui/webui/resources/js/browser_command:mojo_bindings",
|
||||
]
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@ potentially prevent a window from being created.
|
||||
TODO(loc): this patch is currently broken.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
index cddbb941507a880ac6e69955fca7f2a1b4fcd0e2..6b2c1207d3e226c095b84edf10e468d554b6ae1a 100644
|
||||
index 121a963b9f5384a66503244a50a1579a9ae22e03..ca96b4de6d8fc6cf0f7bfb70ba36d3dd2ea839b0 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -8181,6 +8181,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -8183,6 +8183,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
last_committed_origin_, params->window_container_type,
|
||||
params->target_url, params->referrer.To<Referrer>(),
|
||||
params->frame_name, params->disposition, *params->features,
|
||||
@@ -21,10 +21,10 @@ index cddbb941507a880ac6e69955fca7f2a1b4fcd0e2..6b2c1207d3e226c095b84edf10e468d5
|
||||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 7680d447ea4883ad45f27e402719006b580a55ba..6f19be9694e46213636f6555e12b8679a48cb867 100644
|
||||
index 9e5e6c7cb2902632634ac7214f192547d24d8f96..b082f7d73d7a9bb103abeb60d7f6b359d253b435 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4479,6 +4479,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4474,6 +4474,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
auto* new_contents_impl = new_contents.get();
|
||||
|
||||
@@ -37,7 +37,7 @@ index 7680d447ea4883ad45f27e402719006b580a55ba..6f19be9694e46213636f6555e12b8679
|
||||
// If the new frame has a name, make sure any SiteInstances that can find
|
||||
// this named frame have proxies for it. Must be called after
|
||||
// SetSessionStorageNamespace, since this calls CreateRenderView, which uses
|
||||
@@ -4520,12 +4526,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4515,12 +4521,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
AddWebContentsDestructionObserver(new_contents_impl);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ index d062bc29cfef239f9dc86278c2e01276cb334e54..a237c5817651532151c344f9f02c771c
|
||||
|
||||
// Operation result when the renderer asks the browser to create a new window.
|
||||
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
|
||||
index 6db465a37369674b26fdc1b7406151b9d91daf45..990dc12632f0faa5a1e0d9b92073a1e5c7d41ffb 100644
|
||||
index 4e5a939bd142d76e01a98c052cc81780e1daeb5d..897bf48e6389c0f85c948b6cdbe92d2f7e8840c8 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -709,6 +709,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
@@ -79,7 +79,7 @@ index 6db465a37369674b26fdc1b7406151b9d91daf45..990dc12632f0faa5a1e0d9b92073a1e5
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access) {
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index 1ec7c7299e7abf0be994e9d2518acdcfa38f1960..ac85bc0cc8a5bc557636fb1203c2e408dba0df1b 100644
|
||||
index 424166941354cf02f5cf332ea02bf3b7c601a5ef..22c14f8cca02c92a740753cabdb67490ddca0a80 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -179,6 +179,7 @@ class NetworkService;
|
||||
@@ -148,10 +148,10 @@ index 4b32bf8ccc4ed370e2d1a218ae1fd69a98e23636..b9168a2488f5c4977eba5856882b561e
|
||||
// typically happens when popups are created.
|
||||
virtual void WebContentsCreated(WebContents* source_contents,
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 7eca286713f1972844de21cb2c8c8e808ab900f0..9bea02ba22dc601e57406513ed02c8704bf587de 100644
|
||||
index 71f459b4db9b6fae9b242c621c90125f8639b201..7f9d758df761b1d7946d80900e35dec833dea48e 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -6559,6 +6559,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
@@ -6567,6 +6567,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
|
||||
GetWebFrame()->IsAdScriptInStack());
|
||||
|
||||
@@ -210,10 +210,10 @@ index bef5a989bac50c177f15f52fe87ac3790d553e85..65dcd2e3b51929400c8bfb6a98a4fb59
|
||||
|
||||
} // namespace blink
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
index 88b4060c027def288bda0b74427eb6fffbdbcad6..a126e5e0019da2a776ce927ca821f05cb509e094 100644
|
||||
index 5e23d2f79986dac69f65d6694ba12918b06de0d8..2d9dea818d822ff60abf29e3bfca7d39c6a35f43 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
@@ -2180,6 +2180,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
@@ -2197,6 +2197,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
WebWindowFeatures window_features =
|
||||
GetWindowFeaturesFromString(features, entered_window);
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: chore: add electron deps to gitignores
|
||||
Makes things like "git status" quicker when developing electron locally
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index 22417f27125a44d481483439066d73e60348b414..82e5084b0e12231e5cc96a38d99b7238ebd0565c 100644
|
||||
index be45bbead74af95216fc355ffba6a3dce5f9943b..0b88c55f9eb0d0c7020b0dbf54afb399704a87d2 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -210,6 +210,7 @@ vs-chromium-project.txt
|
||||
@@ -209,6 +209,7 @@ vs-chromium-project.txt
|
||||
/data
|
||||
/delegate_execute
|
||||
/device/serial/device_serial_mojo.xml
|
||||
|
||||
@@ -7,7 +7,7 @@ With WCO, allow chromium to handle synthetic mouse events generated for touch
|
||||
actions in the non-client caption area.
|
||||
|
||||
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
index c72621c0e0fb4be2061ffa75196b6d0b6aa3e019..1247de97981b86f412c8e578b89059966f1554bc 100644
|
||||
index a85fa97d213058196e4703166cf974497e89e2d6..39778ad7cdfec863d1acb7eb51438f5070c47318 100644
|
||||
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
@@ -1222,6 +1222,10 @@ void DesktopWindowTreeHostWin::HandleHeadlessWindowBoundsChanged(
|
||||
|
||||
@@ -80,7 +80,7 @@ index aaaa61d5c3a1d5ade2fd355e38a3985ef5cc4e7d..b45746ba0f38a381a2ee5ca17f3a1685
|
||||
}
|
||||
|
||||
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
||||
index c36f7833a9cbe91ca09a89728bc2811605658aaa..aa2d43da9c63302b9185e9f7bdef285e1499a2a3 100644
|
||||
index 9656ae2d33064319ed4a0f8a4a274007969f68e5..b024a04b4b75d16f7a3e13cce833d130a1777958 100644
|
||||
--- a/chrome/browser/ui/browser.cc
|
||||
+++ b/chrome/browser/ui/browser.cc
|
||||
@@ -1885,12 +1885,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
@@ -218,10 +218,10 @@ index c5b0d3b23b8da318ae55fcac2515a1187f261469..16ed1f46c9afde0ff25750128b4fcff6
|
||||
void AddNewContents(content::WebContents* source,
|
||||
std::unique_ptr<content::WebContents> new_contents,
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 7ec03754ef46ed72886994c0eab7ce2596ee5fb4..2f6f997eede33373a3b7ef43885cde5cc5c1d8a0 100644
|
||||
index 5226dd89cd46a7f6f4d79b8b8f47dda44b3a67f4..66034609ac9fcd339abf4d8ad5e39cb02a413fdc 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4385,8 +4385,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4380,8 +4380,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
|
||||
source_site_instance, params.window_container_type,
|
||||
|
||||
@@ -87,21 +87,33 @@ index 943168e2c72c0aeb59f1ea21b14f2dc8e6cfd7e0..db3ca2ed0ba0994caa4d26436b942166
|
||||
// Create an observer that registers a hot key for |accelerator|.
|
||||
std::unique_ptr<gfx::SingletonHwndHotKeyObserver> observer =
|
||||
diff --git a/content/browser/media/media_keys_listener_manager_impl.cc b/content/browser/media/media_keys_listener_manager_impl.cc
|
||||
index 65fa0fdec6316183a0e13210c2860548adee68ae..fd95c8c5b62a447542e38bf69acc86303be8fd9a 100644
|
||||
index 9057dbf62e6270707924e8f842d81545bae86d08..aa21320061131a051f1393e2a71181fd49d1d938 100644
|
||||
--- a/content/browser/media/media_keys_listener_manager_impl.cc
|
||||
+++ b/content/browser/media/media_keys_listener_manager_impl.cc
|
||||
@@ -316,6 +316,11 @@ void MediaKeysListenerManagerImpl::UpdateSystemMediaControlsEnabledControls() {
|
||||
case ui::VKEY_MEDIA_STOP:
|
||||
system_media_controls_->SetIsStopEnabled(should_enable);
|
||||
break;
|
||||
+ case ui::VKEY_VOLUME_DOWN:
|
||||
+ case ui::VKEY_VOLUME_UP:
|
||||
+ case ui::VKEY_VOLUME_MUTE:
|
||||
+ // Do nothing.
|
||||
+ break;
|
||||
default:
|
||||
NOTREACHED();
|
||||
}
|
||||
@@ -395,6 +395,11 @@ void MediaKeysListenerManagerImpl::UpdateSystemMediaControlsEnabledControls() {
|
||||
case ui::VKEY_MEDIA_STOP:
|
||||
browser_system_media_controls_->SetIsStopEnabled(should_enable);
|
||||
break;
|
||||
+ case ui::VKEY_VOLUME_DOWN:
|
||||
+ case ui::VKEY_VOLUME_UP:
|
||||
+ case ui::VKEY_VOLUME_MUTE:
|
||||
+ // Do nothing.
|
||||
+ break;
|
||||
default:
|
||||
NOTREACHED();
|
||||
}
|
||||
@@ -437,6 +442,11 @@ void MediaKeysListenerManagerImpl::UpdateSystemMediaControlsEnabledControls() {
|
||||
case ui::VKEY_MEDIA_STOP:
|
||||
smc->SetIsStopEnabled(should_enable);
|
||||
break;
|
||||
+ case ui::VKEY_VOLUME_DOWN:
|
||||
+ case ui::VKEY_VOLUME_UP:
|
||||
+ case ui::VKEY_VOLUME_MUTE:
|
||||
+ // Do nothing.
|
||||
+ break;
|
||||
default:
|
||||
NOTREACHED();
|
||||
}
|
||||
diff --git a/ui/base/accelerators/media_keys_listener.cc b/ui/base/accelerators/media_keys_listener.cc
|
||||
index db596585cbb44b3710636e3fc013f288966f604f..6d5557ee1a2c35ee15e695e024834184a525e2a7 100644
|
||||
--- a/ui/base/accelerators/media_keys_listener.cc
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 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.
|
||||
|
||||
diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
|
||||
index 2ca479b9fb0b41b66220c524e242d4927c138f1f..61a85717ceb02cd0e19297a143ba9b0de8496eeb 100644
|
||||
--- a/ui/base/clipboard/clipboard_win.cc
|
||||
+++ b/ui/base/clipboard/clipboard_win.cc
|
||||
@@ -914,10 +914,10 @@ SkBitmap ClipboardWin::ReadBitmapInternal(ClipboardBuffer buffer) const {
|
||||
|
||||
void ClipboardWin::WriteToClipboard(ClipboardFormatType format, HANDLE handle) {
|
||||
UINT cf_format = format.ToFormatEtc().cfFormat;
|
||||
- DCHECK_NE(clipboard_owner_->hwnd(), nullptr);
|
||||
+ // DCHECK_NE(clipboard_owner_->hwnd(), nullptr);
|
||||
if (handle && !::SetClipboardData(cf_format, handle)) {
|
||||
- DCHECK_NE(GetLastError(),
|
||||
- static_cast<unsigned long>(ERROR_CLIPBOARD_NOT_OPEN));
|
||||
+ // DCHECK_NE(GetLastError(),
|
||||
+ // static_cast<unsigned long>(ERROR_CLIPBOARD_NOT_OPEN));
|
||||
::GlobalFree(handle);
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@ index 42da00a0f473928263df89f11d80830b6986292b..6a556939d0acfbd910ebb0923e198e2f
|
||||
virtual int GetSourceCount() const = 0;
|
||||
virtual const Source& GetSource(int index) const = 0;
|
||||
diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.cc b/chrome/browser/media/webrtc/desktop_media_list_base.cc
|
||||
index 489e6f7b7b0bb52b938a4fc137b983f3330cd4d2..1f2754dae9b81a7d233539a7e4e6ac77b3c5941f 100644
|
||||
index 0389599ac786b6abd61ca921347fe12ddd5d0ee7..780927301744ea7312f230cec76a24a33d71f767 100644
|
||||
--- a/chrome/browser/media/webrtc/desktop_media_list_base.cc
|
||||
+++ b/chrome/browser/media/webrtc/desktop_media_list_base.cc
|
||||
@@ -69,12 +69,12 @@ void DesktopMediaListBase::StartUpdating(DesktopMediaListObserver* observer) {
|
||||
@@ -41,7 +41,7 @@ index 489e6f7b7b0bb52b938a4fc137b983f3330cd4d2..1f2754dae9b81a7d233539a7e4e6ac77
|
||||
|
||||
int DesktopMediaListBase::GetSourceCount() const {
|
||||
diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.h b/chrome/browser/media/webrtc/desktop_media_list_base.h
|
||||
index 2cd1000b90fb5af464f81ac25b63092b638c6d40..8f18adb5641b3fa5f9defd3490e20a5d86b672e9 100644
|
||||
index b65012985ff1797203160d9e26af17fefee5c244..9ee211fb487007bd37b57cfa7b4ffbe5307af637 100644
|
||||
--- a/chrome/browser/media/webrtc/desktop_media_list_base.h
|
||||
+++ b/chrome/browser/media/webrtc/desktop_media_list_base.h
|
||||
@@ -39,7 +39,7 @@ class DesktopMediaListBase : public DesktopMediaList {
|
||||
@@ -82,7 +82,7 @@ index 33ca7a53dfb6d2c9e3a33f0065a3acd806e82e01..9fdf2e8ff0056ff407015b914c6b03eb
|
||||
const Source& GetSource(int index) const override;
|
||||
DesktopMediaList::Type GetMediaListType() const override;
|
||||
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
index 48b66d16f28b93d1f3a8e772533d7a347d8a3ad2..bec38602dd68faf39b9e0db38f13b5ffbbcb25ee 100644
|
||||
index c76a6fffe76ad4932d9ea3557cc58c39a64fa485..cb16c002227b4e8a9603269498f3a90dbc840ba3 100644
|
||||
--- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
@@ -160,7 +160,7 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) {
|
||||
@@ -94,7 +94,7 @@ index 48b66d16f28b93d1f3a8e772533d7a347d8a3ad2..bec38602dd68faf39b9e0db38f13b5ff
|
||||
#endif
|
||||
|
||||
content::DesktopMediaID::Type ConvertToDesktopMediaIDType(
|
||||
@@ -331,7 +331,7 @@ class NativeDesktopMediaList::Worker
|
||||
@@ -345,7 +345,7 @@ class NativeDesktopMediaList::Worker
|
||||
base::WeakPtr<NativeDesktopMediaList> media_list_;
|
||||
|
||||
DesktopMediaID::Type source_type_;
|
||||
@@ -103,7 +103,7 @@ index 48b66d16f28b93d1f3a8e772533d7a347d8a3ad2..bec38602dd68faf39b9e0db38f13b5ff
|
||||
const ThumbnailCapturer::FrameDeliveryMethod frame_delivery_method_;
|
||||
const bool add_current_process_windows_;
|
||||
|
||||
@@ -615,6 +615,12 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() {
|
||||
@@ -633,6 +633,12 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() {
|
||||
FROM_HERE,
|
||||
base::BindOnce(&NativeDesktopMediaList::UpdateNativeThumbnailsFinished,
|
||||
media_list_));
|
||||
@@ -116,7 +116,7 @@ index 48b66d16f28b93d1f3a8e772533d7a347d8a3ad2..bec38602dd68faf39b9e0db38f13b5ff
|
||||
}
|
||||
|
||||
void NativeDesktopMediaList::Worker::OnCaptureResult(
|
||||
@@ -991,6 +997,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
|
||||
@@ -1017,6 +1023,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
|
||||
FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails,
|
||||
base::Unretained(worker_.get()),
|
||||
std::move(native_ids), thumbnail_size_));
|
||||
|
||||
@@ -20,7 +20,7 @@ to deal with color spaces. That is being tracked at
|
||||
https://crbug.com/634542 and https://crbug.com/711107.
|
||||
|
||||
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
|
||||
index 3e7608703c8e7ab212a283a5db512ec7e6bdc1e6..75a8ae51753b183bd3cdefb0ae41bb9e18da1157 100644
|
||||
index 85fa160062d503fcd2a3000ef263c6b85cebc12a..823ed64b3793b5c030bde100540b15a8c439ea9e 100644
|
||||
--- a/cc/trees/layer_tree_host_impl.cc
|
||||
+++ b/cc/trees/layer_tree_host_impl.cc
|
||||
@@ -1880,6 +1880,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
|
||||
@@ -148,7 +148,7 @@ index 6892376fa33d006453977c354734d880a7ef7c91..4cd7b762d5fe1c54f5b06cc0d8f50560
|
||||
}
|
||||
|
||||
diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
|
||||
index 0e5ecb97bff85e0775a840f205893b5d6d12f38e..986f9a6f3de813feb16711d65d03dc8200215e27 100644
|
||||
index ab5742a30a9d8319ec4596bb99313ea05841e316..5ffc2a38f66f3ab2c82102e996f8e9314da1286e 100644
|
||||
--- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
|
||||
+++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
|
||||
@@ -30,6 +30,7 @@
|
||||
@@ -159,7 +159,7 @@ index 0e5ecb97bff85e0775a840f205893b5d6d12f38e..986f9a6f3de813feb16711d65d03dc82
|
||||
#include "ui/native_theme/native_theme_features.h"
|
||||
#include "ui/native_theme/overlay_scrollbar_constants_aura.h"
|
||||
|
||||
@@ -342,6 +343,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings(
|
||||
@@ -266,6 +267,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings(
|
||||
settings.main_frame_before_activation_enabled =
|
||||
cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation);
|
||||
|
||||
@@ -170,7 +170,7 @@ index 0e5ecb97bff85e0775a840f205893b5d6d12f38e..986f9a6f3de813feb16711d65d03dc82
|
||||
// is what the renderer uses if its not threaded.
|
||||
settings.enable_checker_imaging =
|
||||
diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc
|
||||
index 2f2eb750b71e6a219af9f8601c6053a9799a0044..9d4daa0d5d2df9c55caad9881ee462e20beff2b9 100644
|
||||
index 8a4e2f567831f5a295346062302470d2705ad9a4..2f9d13f03fc943342c156b676a7244348943d85f 100644
|
||||
--- a/ui/gfx/mac/io_surface.cc
|
||||
+++ b/ui/gfx/mac/io_surface.cc
|
||||
@@ -21,6 +21,7 @@
|
||||
@@ -196,7 +196,7 @@ index 2f2eb750b71e6a219af9f8601c6053a9799a0044..9d4daa0d5d2df9c55caad9881ee462e2
|
||||
// Allow but ignore invalid color spaces.
|
||||
if (!color_space.IsValid())
|
||||
return true;
|
||||
@@ -340,6 +349,15 @@ base::apple::ScopedCFTypeRef<IOSurfaceRef> CreateIOSurface(
|
||||
@@ -342,6 +351,15 @@ base::apple::ScopedCFTypeRef<IOSurfaceRef> CreateIOSurface(
|
||||
DCHECK_EQ(kIOReturnSuccess, r);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,16 +15,16 @@ at some point be an API to "unfreeze" the flags, or we may be able to refactor
|
||||
node initialization to not update flags after V8 initialization.
|
||||
|
||||
diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc
|
||||
index be1f39d4038a80b9d73ae0cb0a6709d280501bd4..d3ae9bcab7e28145c3c196f6c5bba56597c29ee4 100644
|
||||
index 0739558b3912221356ed1a4491bab95eca8e7156..613c757eb7366263df2781da16e18266cb2f5ba4 100644
|
||||
--- a/content/renderer/render_process_impl.cc
|
||||
+++ b/content/renderer/render_process_impl.cc
|
||||
@@ -224,6 +224,9 @@ RenderProcessImpl::RenderProcessImpl()
|
||||
@@ -229,6 +229,9 @@ RenderProcessImpl::RenderProcessImpl()
|
||||
v8::V8::SetFlagsFromString(kSABPerContextFlag, sizeof(kSABPerContextFlag));
|
||||
}
|
||||
|
||||
+ // Freezing flags after init conflicts with node in the renderer.
|
||||
+ v8::V8::SetFlagsFromString("--no-freeze-flags-after-init");
|
||||
+
|
||||
#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(ARCH_CPU_X86_64)
|
||||
#ifdef ENABLE_WEB_ASSEMBLY_TRAP_HANDLER_LINUX
|
||||
if (base::FeatureList::IsEnabled(features::kWebAssemblyTrapHandler)) {
|
||||
base::CommandLine* const command_line =
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: disable_hidden.patch
|
||||
Electron uses this to disable background throttling for hidden windows.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index 22eccd1647c4ff48e994366527e45154d986d164..b7a3f5643ced5013c38197f654bd616ffe0f73de 100644
|
||||
index a6c27fe9b7f71910e7dca828b1092955b09612e0..1c01559b53d07fbdf6a6e1e74d161bc08e9ab4fa 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -818,6 +818,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
@@ -20,7 +20,7 @@ index 22eccd1647c4ff48e994366527e45154d986d164..b7a3f5643ced5013c38197f654bd616f
|
||||
blink::mojom::PointerLockResult::kWrongDocument);
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
index 561bd928028df438e4184d07316ef98d9d9c91c0..1485e8d345adbdb5fdb055e1ff325bcd48121d72 100644
|
||||
index 28f81135df6547bdc713420ffd459d5e807ef5d3..c0ea6ca4e293923f3285d01fa388c58e6ed432be 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -911,6 +911,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: feat: enable setting aspect ratio to 0
|
||||
Make SetAspectRatio accept 0 as valid input, which would reset to null.
|
||||
|
||||
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
index 6e314250aafafd165e1a50baeb476e1bec6e8701..c72621c0e0fb4be2061ffa75196b6d0b6aa3e019 100644
|
||||
index e4ab78b55cf4a2aee0c06bb0fc7732ad6aeb367e..a85fa97d213058196e4703166cf974497e89e2d6 100644
|
||||
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
@@ -579,7 +579,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
|
||||
|
||||
@@ -7,7 +7,7 @@ This adds the 'onclose' event to MessagePort. Can be removed once
|
||||
https://bugs.chromium.org/p/chromium/issues/detail?id=1495616 is fixed.
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/messaging/message_port.cc b/third_party/blink/renderer/core/messaging/message_port.cc
|
||||
index 5d7780c48a74fc7d95aeb690c90ab394b1e01a83..15f5f0f6aa05d3b17adae87286c92df9cc26a712 100644
|
||||
index 2f2a5b60423af1dbc425c44283cc2f2934bffa18..dbbe04b2447aa0769beca25c60d404b4f2209e43 100644
|
||||
--- a/third_party/blink/renderer/core/messaging/message_port.cc
|
||||
+++ b/third_party/blink/renderer/core/messaging/message_port.cc
|
||||
@@ -195,6 +195,7 @@ void MessagePort::close() {
|
||||
|
||||
@@ -13,7 +13,7 @@ uses internally for things like menus and devtools.
|
||||
We can remove this patch once it has in some shape been upstreamed.
|
||||
|
||||
diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc
|
||||
index ce34cced354b092b8e8cf04a8c034c9833765e71..67c1c16b028f87b04007242d60d9cf90a61731da 100644
|
||||
index c78bbf02e8ce16814586e54046ea8d3ed293ec78..c431825469fafa25586ce373c288651bf16dc236 100644
|
||||
--- a/ui/native_theme/native_theme.cc
|
||||
+++ b/ui/native_theme/native_theme.cc
|
||||
@@ -191,6 +191,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors,
|
||||
@@ -26,7 +26,7 @@ index ce34cced354b092b8e8cf04a8c034c9833765e71..67c1c16b028f87b04007242d60d9cf90
|
||||
}
|
||||
|
||||
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
|
||||
index 099bc7193edf98c8b3aff2d35a3c1653820c75fd..1d1ae195131e80ee1bc080e28992ef3554808389 100644
|
||||
index 14f3667521de110e6b9cd884ef9311878bb8bc8a..c88da6b43b9caefa50e8606e5a641c7c3dd6287e 100644
|
||||
--- a/ui/native_theme/native_theme.h
|
||||
+++ b/ui/native_theme/native_theme.h
|
||||
@@ -441,6 +441,23 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
@@ -53,7 +53,7 @@ index 099bc7193edf98c8b3aff2d35a3c1653820c75fd..1d1ae195131e80ee1bc080e28992ef35
|
||||
// Returns a shared instance of the native theme that should be used for web
|
||||
// rendering. Do not use it in a normal application context (i.e. browser).
|
||||
// The returned object should not be deleted by the caller. This function is
|
||||
@@ -662,6 +679,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
@@ -655,6 +672,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
bool inverted_colors_ = false;
|
||||
PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight;
|
||||
PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference;
|
||||
|
||||
@@ -183,7 +183,7 @@ index 01e62d7e8df65efb900e9cd0d34bcd8e0ed3e7da..9af6784707f125046d9a734165fc2b08
|
||||
host->GetChildProcess()->BindServiceInterface(std::move(receiver));
|
||||
}
|
||||
diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc
|
||||
index 6c67113ad9983839366d413ebe42321c0afcbf18..c82d0c73632648f0979b494d2df08bada956324c 100644
|
||||
index 91ce1772691cb41c11685e5f1ab29db5ac01b58c..631070d54bd3a4362c240e914aa61cc915393a45 100644
|
||||
--- a/content/browser/utility_process_host.cc
|
||||
+++ b/content/browser/utility_process_host.cc
|
||||
@@ -157,11 +157,13 @@ const ChildProcessData& UtilityProcessHost::GetData() {
|
||||
@@ -227,7 +227,7 @@ index 6c67113ad9983839366d413ebe42321c0afcbf18..c82d0c73632648f0979b494d2df08bad
|
||||
mojom::ChildProcess* UtilityProcessHost::GetChildProcess() {
|
||||
return static_cast<ChildProcessHostImpl*>(process_->GetHost())
|
||||
->child_process();
|
||||
@@ -441,9 +461,22 @@ bool UtilityProcessHost::StartProcess() {
|
||||
@@ -440,9 +460,22 @@ bool UtilityProcessHost::StartProcess() {
|
||||
}
|
||||
#endif // BUILDFLAG(IS_LINUX)
|
||||
|
||||
@@ -323,7 +323,7 @@ index 012069cada2220f6c1976107bc2e4ca6dcb7d7ca..a52a197eb51f8c00d7321f03ccb436ec
|
||||
// launch failed.
|
||||
enum class LaunchState {
|
||||
diff --git a/content/browser/utility_sandbox_delegate.cc b/content/browser/utility_sandbox_delegate.cc
|
||||
index bf65aec1c2a8eb6a91d0d2815979dbedc0e4a09f..4025b4fd7950d40088aa1c1364a7e7aa16bc325e 100644
|
||||
index 2f3977d62535e299ef3b5954b9d67291afae2a57..edc825c691f7b55cd38fa31a9229fdf02bb5ff24 100644
|
||||
--- a/content/browser/utility_sandbox_delegate.cc
|
||||
+++ b/content/browser/utility_sandbox_delegate.cc
|
||||
@@ -29,13 +29,15 @@ UtilitySandboxedProcessLauncherDelegate::
|
||||
@@ -627,7 +627,7 @@ index cb43aa14c9742f3788ae58c3e49b890cd532f327..6a738f7aade504f2ff3bb6647a0da8f8
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
// Whether or not to disclaim TCC responsibility for the process, defaults to
|
||||
diff --git a/sandbox/policy/win/sandbox_win.cc b/sandbox/policy/win/sandbox_win.cc
|
||||
index 8a49455376de22710448ee13d069a64ae9168a28..30e547e7ea7660878c00b4c4fc3f7245ee924a57 100644
|
||||
index 322f0e4b0f944f220b4d700b2e508b445f1eb2c6..32566452055d66d4e7fe50c77105b679a4807440 100644
|
||||
--- a/sandbox/policy/win/sandbox_win.cc
|
||||
+++ b/sandbox/policy/win/sandbox_win.cc
|
||||
@@ -724,11 +724,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
|
||||
@@ -701,10 +701,10 @@ index 8a49455376de22710448ee13d069a64ae9168a28..30e547e7ea7660878c00b4c4fc3f7245
|
||||
return result;
|
||||
|
||||
diff --git a/sandbox/policy/win/sandbox_win.h b/sandbox/policy/win/sandbox_win.h
|
||||
index 81698da8fef99a5a4732fea5a4d39380b1f6ce76..d0ccb176a20a472c3e8186b72718c320073d58e7 100644
|
||||
index 53b719a5724a06abd45cca25aa6f0c9ffb082523..2a3ca8c86c46f0b3d1722dcd289c343fe5838440 100644
|
||||
--- a/sandbox/policy/win/sandbox_win.h
|
||||
+++ b/sandbox/policy/win/sandbox_win.h
|
||||
@@ -52,7 +52,7 @@ class SANDBOX_POLICY_EXPORT SandboxWin {
|
||||
@@ -53,7 +53,7 @@ class SANDBOX_POLICY_EXPORT SandboxWin {
|
||||
static ResultCode StartSandboxedProcess(
|
||||
const base::CommandLine& cmd_line,
|
||||
const std::string& process_type,
|
||||
@@ -713,7 +713,7 @@ index 81698da8fef99a5a4732fea5a4d39380b1f6ce76..d0ccb176a20a472c3e8186b72718c320
|
||||
SandboxDelegate* delegate,
|
||||
base::Process* process);
|
||||
|
||||
@@ -66,7 +66,7 @@ class SANDBOX_POLICY_EXPORT SandboxWin {
|
||||
@@ -67,7 +67,7 @@ class SANDBOX_POLICY_EXPORT SandboxWin {
|
||||
static ResultCode GeneratePolicyForSandboxedProcess(
|
||||
const base::CommandLine& cmd_line,
|
||||
const std::string& process_type,
|
||||
|
||||
@@ -8,7 +8,7 @@ rendering with the viz compositor by way of a custom HostDisplayClient
|
||||
and LayeredWindowUpdater.
|
||||
|
||||
diff --git a/components/viz/host/host_display_client.cc b/components/viz/host/host_display_client.cc
|
||||
index 41fdfa8cc4de8fb3316552dc9851874e430c238e..6a51498c9ec7b35b8609a8369ae4703e1936d1ad 100644
|
||||
index 7af928a9a030c0bc1efe069f0a4004adc5ae9c14..e1b04e1e2f76a3d9ba4575844e1ae49dd909ecb2 100644
|
||||
--- a/components/viz/host/host_display_client.cc
|
||||
+++ b/components/viz/host/host_display_client.cc
|
||||
@@ -47,9 +47,9 @@ void HostDisplayClient::OnDisplayReceivedCALayerParams(
|
||||
@@ -39,10 +39,10 @@ index 41fdfa8cc4de8fb3316552dc9851874e430c238e..6a51498c9ec7b35b8609a8369ae4703e
|
||||
gpu::SurfaceHandle child_window) {
|
||||
NOTREACHED();
|
||||
diff --git a/components/viz/host/host_display_client.h b/components/viz/host/host_display_client.h
|
||||
index a55ab928c0d9190dd42852655b175053dbb11610..e1cdec8fe6e316dc38f89400ab7844d3d6b32784 100644
|
||||
index cb16487f9fc0811ef577d455098f09e3000db86a..d67c0f8bce3c6a8f7643409e07e21e789b4bd391 100644
|
||||
--- a/components/viz/host/host_display_client.h
|
||||
+++ b/components/viz/host/host_display_client.h
|
||||
@@ -42,6 +42,9 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom::DisplayClient {
|
||||
@@ -39,6 +39,9 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom::DisplayClient {
|
||||
gfx::AcceleratedWidget widget() const { return widget_; }
|
||||
#endif
|
||||
|
||||
@@ -52,7 +52,7 @@ index a55ab928c0d9190dd42852655b175053dbb11610..e1cdec8fe6e316dc38f89400ab7844d3
|
||||
private:
|
||||
// mojom::DisplayClient implementation:
|
||||
#if BUILDFLAG(IS_APPLE)
|
||||
@@ -50,8 +53,6 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom::DisplayClient {
|
||||
@@ -47,8 +50,6 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom::DisplayClient {
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
@@ -90,7 +90,7 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217
|
||||
private:
|
||||
const HWND hwnd_;
|
||||
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
|
||||
index 3e78747afba61506ca616a66b51365bf4117110c..e094d5e310745082a0562183c4b4b59da4b078d6 100644
|
||||
index 8ee3c35ba55091d87ac633073123d081a9f95929..206b28406f0386816588f8a5de5610b417e529ab 100644
|
||||
--- a/components/viz/service/BUILD.gn
|
||||
+++ b/components/viz/service/BUILD.gn
|
||||
@@ -143,6 +143,8 @@ viz_component("service") {
|
||||
@@ -103,7 +103,7 @@ index 3e78747afba61506ca616a66b51365bf4117110c..e094d5e310745082a0562183c4b4b59d
|
||||
"display_embedder/software_output_surface.h",
|
||||
"display_embedder/vsync_parameter_listener.cc",
|
||||
diff --git a/components/viz/service/display_embedder/output_surface_provider.h b/components/viz/service/display_embedder/output_surface_provider.h
|
||||
index 5789972c7852473c7fb3565416e9de6595c9f291..482d061f76e9c52fc7f084572d834cab9f383834 100644
|
||||
index a4e6ad16fd2def9bbed7cd11ea13ba365a9f7322..20a426e6f7dff17c22dd05d75d601a560cd34283 100644
|
||||
--- a/components/viz/service/display_embedder/output_surface_provider.h
|
||||
+++ b/components/viz/service/display_embedder/output_surface_provider.h
|
||||
@@ -38,7 +38,8 @@ class OutputSurfaceProvider {
|
||||
@@ -115,9 +115,9 @@ index 5789972c7852473c7fb3565416e9de6595c9f291..482d061f76e9c52fc7f084572d834cab
|
||||
+ bool offscreen) = 0;
|
||||
|
||||
virtual gpu::SharedImageManager* GetSharedImageManager() = 0;
|
||||
};
|
||||
virtual gpu::SyncPointManager* GetSyncPointManager() = 0;
|
||||
diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.cc b/components/viz/service/display_embedder/output_surface_provider_impl.cc
|
||||
index d97d8524820457e157b9a8aaa2090e7fde8a8225..a5f7587e7208a51ccb53b07c2ccd7ce880611215 100644
|
||||
index e8e3237bb2b8f134be81441ada743ad78f147d97..a5c5360377d9d5f6e46b0ff023ca302128bfb327 100644
|
||||
--- a/components/viz/service/display_embedder/output_surface_provider_impl.cc
|
||||
+++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc
|
||||
@@ -25,12 +25,14 @@
|
||||
@@ -179,10 +179,10 @@ index d97d8524820457e157b9a8aaa2090e7fde8a8225..a5f7587e7208a51ccb53b07c2ccd7ce8
|
||||
return CreateSoftwareOutputDeviceWin(surface_handle, &output_device_backing_,
|
||||
display_client);
|
||||
diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.h b/components/viz/service/display_embedder/output_surface_provider_impl.h
|
||||
index c7c58705509f46436feefb6b538b95ec9271a53f..b133976ab3c7713ee18c0df3f9d75e4c9be7ff33 100644
|
||||
index d149ef23deaf591e472fcd00a7ea32b2e4052b98..6e93321d2856d40a00fa04fe03a2bb72ba650e83 100644
|
||||
--- a/components/viz/service/display_embedder/output_surface_provider_impl.h
|
||||
+++ b/components/viz/service/display_embedder/output_surface_provider_impl.h
|
||||
@@ -50,14 +50,16 @@ class VIZ_SERVICE_EXPORT OutputSurfaceProviderImpl
|
||||
@@ -50,7 +50,8 @@ class VIZ_SERVICE_EXPORT OutputSurfaceProviderImpl
|
||||
mojom::DisplayClient* display_client,
|
||||
DisplayCompositorMemoryAndTaskController* gpu_dependency,
|
||||
const RendererSettings& renderer_settings,
|
||||
@@ -191,7 +191,8 @@ index c7c58705509f46436feefb6b538b95ec9271a53f..b133976ab3c7713ee18c0df3f9d75e4c
|
||||
+ bool offscreen) override;
|
||||
|
||||
gpu::SharedImageManager* GetSharedImageManager() override;
|
||||
|
||||
gpu::SyncPointManager* GetSyncPointManager() override;
|
||||
@@ -58,7 +59,8 @@ class VIZ_SERVICE_EXPORT OutputSurfaceProviderImpl
|
||||
private:
|
||||
std::unique_ptr<SoftwareOutputDevice> CreateSoftwareOutputDeviceForPlatform(
|
||||
gpu::SurfaceHandle surface_handle,
|
||||
@@ -519,10 +520,10 @@ index 796ae2688436eb07f19909641d1620dd02f10cdb..c9e0eee0b329caf46669b419b1cd10cf
|
||||
waiting_on_draw_ack_ = true;
|
||||
|
||||
diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
|
||||
index 353d262c8208fad17d5a5bf2bc9f26064533efc4..e6ad55511526e6e7b1ceea51493196afcf7fb822 100644
|
||||
index a5ed36808d01965336e6f812ba9c5a0d50ef854d..fa0b75dda34f3a2ea3a4d72dd62e82552a284f6d 100644
|
||||
--- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
|
||||
+++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
|
||||
@@ -101,7 +101,8 @@ RootCompositorFrameSinkImpl::Create(
|
||||
@@ -98,7 +98,8 @@ RootCompositorFrameSinkImpl::Create(
|
||||
params->gpu_compositing, params->widget);
|
||||
auto output_surface = output_surface_provider->CreateOutputSurface(
|
||||
params->widget, params->gpu_compositing, display_client.get(),
|
||||
@@ -533,7 +534,7 @@ index 353d262c8208fad17d5a5bf2bc9f26064533efc4..e6ad55511526e6e7b1ceea51493196af
|
||||
// Creating output surface failed. The host can send a new request, possibly
|
||||
// with a different compositing mode.
|
||||
diff --git a/components/viz/test/test_output_surface_provider.cc b/components/viz/test/test_output_surface_provider.cc
|
||||
index d4aa29c627c75d5aef50afa2a7daa257d2b7739f..79c6ce9104bf7be36fd465f409f955541fedd8c1 100644
|
||||
index 7648cb06aa78891804bb0783f884b09e07597fbc..f1a73f157ca43620019b864aef35d0ad36c12353 100644
|
||||
--- a/components/viz/test/test_output_surface_provider.cc
|
||||
+++ b/components/viz/test/test_output_surface_provider.cc
|
||||
@@ -30,7 +30,8 @@ std::unique_ptr<OutputSurface> TestOutputSurfaceProvider::CreateOutputSurface(
|
||||
@@ -547,7 +548,7 @@ index d4aa29c627c75d5aef50afa2a7daa257d2b7739f..79c6ce9104bf7be36fd465f409f95554
|
||||
return FakeSkiaOutputSurface::Create3d();
|
||||
} else {
|
||||
diff --git a/components/viz/test/test_output_surface_provider.h b/components/viz/test/test_output_surface_provider.h
|
||||
index 6714331442d056d337590c0809723fc0636c9b65..d96d6dded4a7d7897591e8362a93db6630cb7af0 100644
|
||||
index febb2718cb34ea4d9f411f068d8c01a89c7db888..be8bd51cb61c20ef3df8552972a0ac2f11930150 100644
|
||||
--- a/components/viz/test/test_output_surface_provider.h
|
||||
+++ b/components/viz/test/test_output_surface_provider.h
|
||||
@@ -32,7 +32,8 @@ class TestOutputSurfaceProvider : public OutputSurfaceProvider {
|
||||
@@ -558,8 +559,8 @@ index 6714331442d056d337590c0809723fc0636c9b65..d96d6dded4a7d7897591e8362a93db66
|
||||
+ const DebugRendererSettings* debug_settings,
|
||||
+ bool offscreen) override;
|
||||
gpu::SharedImageManager* GetSharedImageManager() override;
|
||||
gpu::SyncPointManager* GetSyncPointManager() override;
|
||||
};
|
||||
|
||||
diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc
|
||||
index da51b2b9c395df5db6915ec1ed401b29191a6d2c..77c987ad21aa4d9a7ae0fb971d7685715a999f12 100644
|
||||
--- a/content/browser/compositor/viz_process_transport_factory.cc
|
||||
@@ -617,7 +618,7 @@ index 2f462f0deb5fc8a637457243fb5d5849fc214d14..695869b83cefaa24af93a2e11b39de05
|
||||
+ Draw(gfx.mojom.Rect damage_rect) => ();
|
||||
};
|
||||
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
|
||||
index b8098b7e777f8fcdd4d01e8b7a1d4c5b964c4a32..67738f95affa1b7998c03d10f5f62d70afcbd62a 100644
|
||||
index d2d3757f75a6b9bc1d08cf682644599cca5ddb68..efee0ac27ca9cf4f86a2558c3a98bc6d98520f6f 100644
|
||||
--- a/ui/compositor/compositor.h
|
||||
+++ b/ui/compositor/compositor.h
|
||||
@@ -93,6 +93,7 @@ class DisplayPrivate;
|
||||
@@ -655,7 +656,7 @@ index b8098b7e777f8fcdd4d01e8b7a1d4c5b964c4a32..67738f95affa1b7998c03d10f5f62d70
|
||||
// Sets the root of the layer tree drawn by this Compositor. The root layer
|
||||
// must have no parent. The compositor's root layer is reset if the root layer
|
||||
// is destroyed. NULL can be passed to reset the root layer, in which case the
|
||||
@@ -536,6 +550,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
|
||||
@@ -543,6 +557,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
|
||||
|
||||
std::unique_ptr<PendingBeginFrameArgs> pending_begin_frame_args_;
|
||||
|
||||
|
||||
@@ -112,10 +112,10 @@ index 8aff4a0142732686e937e56bdf8e61c61f87d652..7a6736c92bd2b3298fbeefb518cab2bf
|
||||
string mime_type;
|
||||
|
||||
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
|
||||
index 11f6e0f7132741ae9475f61ab231baf36c60b3be..2083123c0bee80188c987b7095ec9295ffd97fdb 100644
|
||||
index d6520afeb505dcb21771e8932fddf3e946604ce8..7c41878b0fcfc8fe722627a4f888a6b4a643ffb1 100644
|
||||
--- a/services/network/url_loader.cc
|
||||
+++ b/services/network/url_loader.cc
|
||||
@@ -684,6 +684,7 @@ URLLoader::URLLoader(
|
||||
@@ -673,6 +673,7 @@ URLLoader::URLLoader(
|
||||
has_user_activation_ = request.trusted_params->has_user_activation;
|
||||
allow_cookies_from_browser_ =
|
||||
request.trusted_params->allow_cookies_from_browser;
|
||||
@@ -123,7 +123,7 @@ index 11f6e0f7132741ae9475f61ab231baf36c60b3be..2083123c0bee80188c987b7095ec9295
|
||||
}
|
||||
|
||||
// Store any cookies passed from the browser process to later attach them to
|
||||
@@ -722,7 +723,7 @@ URLLoader::URLLoader(
|
||||
@@ -711,7 +712,7 @@ URLLoader::URLLoader(
|
||||
&URLLoader::IsSharedDictionaryReadAllowed, base::Unretained(this)));
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ index 11f6e0f7132741ae9475f61ab231baf36c60b3be..2083123c0bee80188c987b7095ec9295
|
||||
url_request_->SetResponseHeadersCallback(base::BindRepeating(
|
||||
&URLLoader::SetRawResponseHeaders, base::Unretained(this)));
|
||||
}
|
||||
@@ -1660,6 +1661,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
|
||||
@@ -1649,6 +1650,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
|
||||
}
|
||||
|
||||
response_ = BuildResponseHead();
|
||||
|
||||
@@ -23,10 +23,10 @@ Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397.
|
||||
Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
|
||||
index 9f214097ebbbc3c8a98a17990f439198054efb8e..ed6424c6beba20470de36b65e123e70e2637d0e6 100644
|
||||
index 74d589a117309e44c5b625f195edb6a44ee5283e..0a901c70c634a9f236b1e3fae9d0d20cdf2f3078 100644
|
||||
--- a/content/browser/renderer_host/navigation_request.cc
|
||||
+++ b/content/browser/renderer_host/navigation_request.cc
|
||||
@@ -9994,6 +9994,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
|
||||
@@ -10028,6 +10028,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
|
||||
return std::make_pair(parent->GetLastCommittedOrigin(), "about_srcdoc");
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ index 9f214097ebbbc3c8a98a17990f439198054efb8e..ed6424c6beba20470de36b65e123e70e
|
||||
// origin of |common_params.url| and/or |common_params.initiator_origin|.
|
||||
url::Origin resolved_origin = url::Origin::Resolve(
|
||||
diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc
|
||||
index e89cc530da1bca8a53c8a1bbc1d842aeed0780dc..27bc33a5f5cf2e35036e0a68dc717cfd3c422d78 100644
|
||||
index 96f83f7afba6baa54eda98beadd350eec0a86e2a..d4f06da5914f724525722af8f9e9e9b0b08384e5 100644
|
||||
--- a/third_party/blink/renderer/core/loader/document_loader.cc
|
||||
+++ b/third_party/blink/renderer/core/loader/document_loader.cc
|
||||
@@ -2125,6 +2125,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
|
||||
|
||||
@@ -54,21 +54,21 @@ index 954828f9d9c6a5af3ad68026dbbddfe8bc0cb657..d9faab46d1df921bb31feb8f5e0908b0
|
||||
+
|
||||
} // namespace ui
|
||||
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
|
||||
index 67738f95affa1b7998c03d10f5f62d70afcbd62a..499758acdd77058c6e3e0e798777e547e9c9a393 100644
|
||||
index efee0ac27ca9cf4f86a2558c3a98bc6d98520f6f..b79b12cb4ba231c7b88f8d8d2a29dda68d3981cb 100644
|
||||
--- a/ui/compositor/compositor.h
|
||||
+++ b/ui/compositor/compositor.h
|
||||
@@ -522,6 +522,10 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
|
||||
return host_->saved_events_metrics_count_for_testing();
|
||||
}
|
||||
@@ -518,6 +518,10 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
|
||||
|
||||
const cc::LayerTreeSettings& GetLayerTreeSettings() const;
|
||||
|
||||
+ // Sets |background_throttling_| responsible for suspending drawing
|
||||
+ // and switching frames.
|
||||
+ void SetBackgroundThrottling(bool background_throttling_enabled);
|
||||
+
|
||||
private:
|
||||
friend class base::RefCounted<Compositor>;
|
||||
friend class TotalAnimationThroughputReporter;
|
||||
@@ -628,6 +632,12 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
|
||||
size_t saved_events_metrics_count_for_testing() const {
|
||||
return host_->saved_events_metrics_count_for_testing();
|
||||
}
|
||||
@@ -635,6 +639,12 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
|
||||
// See go/report-ux-metrics-at-painting for details.
|
||||
bool animation_started_ = false;
|
||||
|
||||
|
||||
@@ -1,279 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ryan Manuel <ryanm@cypress.io>
|
||||
Date: Fri, 1 Dec 2023 16:40:02 -0600
|
||||
Subject: fix font flooding in dev tools
|
||||
|
||||
Added in this CL: https://chromium-review.googlesource.com/c/chromium/src/+/5033885
|
||||
|
||||
This patch resolves an issue that has been fixed in chromium involving font requests being sent multiple times to DevTools for a single request.
|
||||
|
||||
This patch can be removed when chromium reaches version 121.0.6157.0.
|
||||
|
||||
diff --git a/AUTHORS b/AUTHORS
|
||||
index a31f741d472830ec17291e3fad935902e042bca0..0f710af9690e54e2509a9a3abff020322047dbe0 100644
|
||||
--- a/AUTHORS
|
||||
+++ b/AUTHORS
|
||||
@@ -1151,6 +1151,7 @@ Rulong Chen <rulong.crl@alibaba-inc.com>
|
||||
Russell Davis <russell.davis@gmail.com>
|
||||
Ryan Ackley <ryanackley@gmail.com>
|
||||
Ryan Gonzalez <rymg19@gmail.com>
|
||||
+Ryan Manuel <rfmanuel@gmail.com>
|
||||
Ryan Norton <rnorton10@gmail.com>
|
||||
Ryan Sleevi <ryan-chromium-dev@sleevi.com>
|
||||
Ryan Yoakum <ryoakum@skobalt.com>
|
||||
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
|
||||
index 619ccba17514b22ab9def18715047f2cefcde7a2..e0ac0cd89fc5c39cbb001b68c99392d80aff3c51 100644
|
||||
--- a/third_party/blink/common/features.cc
|
||||
+++ b/third_party/blink/common/features.cc
|
||||
@@ -2010,6 +2010,14 @@ BASE_FEATURE(kUACHOverrideBlank,
|
||||
"UACHOverrideBlank",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
+// If enabled, the body of `EmulateLoadStartedForInspector` is executed only
|
||||
+// once per Resource per ResourceFetcher, and thus duplicated network load
|
||||
+// entries in DevTools caused by `EmulateLoadStartedForInspector` are removed.
|
||||
+// https://crbug.com/1502591
|
||||
+BASE_FEATURE(kEmulateLoadStartedForInspectorOncePerResource,
|
||||
+ "kEmulateLoadStartedForInspectorOncePerResource",
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
+
|
||||
BASE_FEATURE(kUseBlinkSchedulerTaskRunnerWithCustomDeleter,
|
||||
"UseBlinkSchedulerTaskRunnerWithCustomDeleter",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
diff --git a/third_party/blink/public/common/features.h b/third_party/blink/public/common/features.h
|
||||
index ad716edf68ec5beb50cf833af28bb1b69099af78..76917f9b8ecc9c015477f576894ceae134e8b9b8 100644
|
||||
--- a/third_party/blink/public/common/features.h
|
||||
+++ b/third_party/blink/public/common/features.h
|
||||
@@ -1348,6 +1348,9 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kTimedHTMLParserBudget);
|
||||
|
||||
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kUACHOverrideBlank);
|
||||
|
||||
+BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(
|
||||
+ kEmulateLoadStartedForInspectorOncePerResource);
|
||||
+
|
||||
// Kill switch for using a custom task runner in the blink scheduler that makes
|
||||
// DeleteSoon/ReleaseSoon less prone to memory leaks.
|
||||
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(
|
||||
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
|
||||
index 3d889e448fe706e69eac40e61035616b2be3f74c..d8d5b0e0379c4fc65debc4e25766997e5502191e 100644
|
||||
--- a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
|
||||
+++ b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
|
||||
@@ -681,6 +681,19 @@ Resource* ResourceFetcher::CachedResource(const KURL& resource_url) const {
|
||||
return it->value.Get();
|
||||
}
|
||||
|
||||
+bool ResourceFetcher::ResourceHasBeenEmulatedLoadStartedForInspector(
|
||||
+ const KURL& resource_url) const {
|
||||
+ if (resource_url.IsEmpty()) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ KURL url = MemoryCache::RemoveFragmentIdentifierIfNeeded(resource_url);
|
||||
+ const auto it = emulated_load_started_for_inspector_resources_map_.find(url);
|
||||
+ if (it == emulated_load_started_for_inspector_resources_map_.end()) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
const HeapHashSet<Member<Resource>>
|
||||
ResourceFetcher::MoveResourceStrongReferences() {
|
||||
document_resource_strong_refs_total_size_ = 0;
|
||||
@@ -2463,11 +2476,25 @@ void ResourceFetcher::EmulateLoadStartedForInspector(
|
||||
if (CachedResource(url)) {
|
||||
return;
|
||||
}
|
||||
+
|
||||
+ if (ResourceHasBeenEmulatedLoadStartedForInspector(url)) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
if (resource->ErrorOccurred()) {
|
||||
// We should ideally replay the error steps, but we cannot.
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (base::FeatureList::IsEnabled(
|
||||
+ features::kEmulateLoadStartedForInspectorOncePerResource)) {
|
||||
+ // Update the emulated load started for inspector resources map with the
|
||||
+ // resource so that future emulations of the same resource won't happen.
|
||||
+ String resource_url = MemoryCache::RemoveFragmentIdentifierIfNeeded(url);
|
||||
+ emulated_load_started_for_inspector_resources_map_.Set(resource_url,
|
||||
+ resource);
|
||||
+ }
|
||||
+
|
||||
ResourceRequest resource_request(url);
|
||||
resource_request.SetRequestContext(request_context);
|
||||
resource_request.SetRequestDestination(request_destination);
|
||||
@@ -2767,6 +2794,7 @@ void ResourceFetcher::Trace(Visitor* visitor) const {
|
||||
visitor->Trace(loaders_);
|
||||
visitor->Trace(non_blocking_loaders_);
|
||||
visitor->Trace(cached_resources_map_);
|
||||
+ visitor->Trace(emulated_load_started_for_inspector_resources_map_);
|
||||
visitor->Trace(image_resources_);
|
||||
visitor->Trace(not_loaded_image_resources_);
|
||||
visitor->Trace(preloads_);
|
||||
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h
|
||||
index b0775b4d44bf800159d0c8ef07a2258df8674b94..af96732a045c35ab443b492bd5b34868eb1ba73e 100644
|
||||
--- a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h
|
||||
+++ b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h
|
||||
@@ -178,6 +178,7 @@ class PLATFORM_EXPORT ResourceFetcher
|
||||
CodeCacheHost* GetCodeCacheHost();
|
||||
|
||||
Resource* CachedResource(const KURL&) const;
|
||||
+ bool ResourceHasBeenEmulatedLoadStartedForInspector(const KURL&) const;
|
||||
|
||||
// Registers an callback to be called with the resource priority of the fetch
|
||||
// made to the specified URL. When `new_load_only` is set to false,
|
||||
@@ -564,6 +565,15 @@ class PLATFORM_EXPORT ResourceFetcher
|
||||
// Weak reference to all the fetched resources.
|
||||
DocumentResourceMap cached_resources_map_;
|
||||
|
||||
+ // When a resource is in the global memory cache but not in the
|
||||
+ // cached_resources_map_ and it is referenced (e.g. when the StyleEngine
|
||||
+ // processes a @font-face rule), the resource will be emulated via
|
||||
+ // `EmulateLoadStartedForInspector` so that it shows up in DevTools.
|
||||
+ // In order to ensure that this only occurs once per resource, we keep
|
||||
+ // a weak reference to all emulated resources and only emulate resources
|
||||
+ // that have not been previously emulated.
|
||||
+ DocumentResourceMap emulated_load_started_for_inspector_resources_map_;
|
||||
+
|
||||
// document_resource_strong_refs_ keeps strong references for fonts, images,
|
||||
// scripts and stylesheets within their freshness lifetime.
|
||||
HeapHashSet<Member<Resource>> document_resource_strong_refs_;
|
||||
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher_test.cc b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher_test.cc
|
||||
index d1947b5070cd537b29fdf4cb1a9e6780e803111f..6f8ef7af61abd84519543ee7628fb1e88ab9b5de 100644
|
||||
--- a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher_test.cc
|
||||
+++ b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher_test.cc
|
||||
@@ -161,6 +161,8 @@ class ResourceFetcherTest : public testing::Test {
|
||||
return request_;
|
||||
}
|
||||
|
||||
+ void ClearLastRequest() { request_ = absl::nullopt; }
|
||||
+
|
||||
private:
|
||||
absl::optional<PartialResourceRequest> request_;
|
||||
};
|
||||
@@ -1627,4 +1629,123 @@ TEST_F(ResourceFetcherTest, StrongReferenceThreshold) {
|
||||
ASSERT_FALSE(perform_fetch.Run(KURL("http://127.0.0.1:8000/baz.png")));
|
||||
}
|
||||
|
||||
+TEST_F(ResourceFetcherTest,
|
||||
+ EmulateLoadStartedForInspectorOncePerResourceDisabled) {
|
||||
+ base::test::ScopedFeatureList scoped_feature_list;
|
||||
+ scoped_feature_list.InitAndDisableFeature(
|
||||
+ features::kEmulateLoadStartedForInspectorOncePerResource);
|
||||
+ auto* observer = MakeGarbageCollected<TestResourceLoadObserver>();
|
||||
+
|
||||
+ // Set up the initial fetcher and mark the resource as cached.
|
||||
+ auto* fetcher = CreateFetcher();
|
||||
+ KURL url("http://127.0.0.1:8000/foo.woff2");
|
||||
+ RegisterMockedURLLoad(url);
|
||||
+ FetchParameters fetch_params =
|
||||
+ FetchParameters::CreateForTest(ResourceRequest(url));
|
||||
+ Resource* resource = MockResource::Fetch(fetch_params, fetcher, nullptr);
|
||||
+ resource->SetStatus(ResourceStatus::kCached);
|
||||
+
|
||||
+ ASSERT_NE(fetcher->CachedResource(url), nullptr);
|
||||
+ ASSERT_FALSE(fetcher->ResourceHasBeenEmulatedLoadStartedForInspector(url));
|
||||
+
|
||||
+ // Set up the second fetcher.
|
||||
+ auto* otherContextFetcher = CreateFetcher();
|
||||
+ otherContextFetcher->SetResourceLoadObserver(observer);
|
||||
+
|
||||
+ // Ensure that the url is initially not marked as cached or
|
||||
+ // emulated and the observer's last request is empty.
|
||||
+ ASSERT_EQ(otherContextFetcher->CachedResource(url), nullptr);
|
||||
+ ASSERT_FALSE(
|
||||
+ otherContextFetcher->ResourceHasBeenEmulatedLoadStartedForInspector(url));
|
||||
+ ASSERT_EQ(observer->GetLastRequest(), absl::nullopt);
|
||||
+
|
||||
+ otherContextFetcher->EmulateLoadStartedForInspector(
|
||||
+ resource, url, mojom::blink::RequestContextType::FONT,
|
||||
+ network::mojom::RequestDestination::kFont,
|
||||
+ fetch_initiator_type_names::kCSS);
|
||||
+
|
||||
+ // After the first emulation, ensure that the url is not cached,
|
||||
+ // is not marked as emulated and the observer's last
|
||||
+ // request is not empty with the feature disabled.
|
||||
+ ASSERT_EQ(otherContextFetcher->CachedResource(url), nullptr);
|
||||
+ ASSERT_FALSE(
|
||||
+ otherContextFetcher->ResourceHasBeenEmulatedLoadStartedForInspector(url));
|
||||
+ ASSERT_NE(observer->GetLastRequest(), absl::nullopt);
|
||||
+
|
||||
+ // Clear out the last request to start fresh
|
||||
+ observer->ClearLastRequest();
|
||||
+
|
||||
+ otherContextFetcher->EmulateLoadStartedForInspector(
|
||||
+ resource, url, mojom::blink::RequestContextType::FONT,
|
||||
+ network::mojom::RequestDestination::kFont,
|
||||
+ fetch_initiator_type_names::kCSS);
|
||||
+
|
||||
+ // After the second emulation, ensure that the url is not cached,
|
||||
+ // the resource is not marked as emulated, and the observer's last
|
||||
+ // request is not empty with the feature disabled. This means that
|
||||
+ // the observer was notified with this emulation.
|
||||
+ ASSERT_EQ(otherContextFetcher->CachedResource(url), nullptr);
|
||||
+ ASSERT_FALSE(
|
||||
+ otherContextFetcher->ResourceHasBeenEmulatedLoadStartedForInspector(url));
|
||||
+ ASSERT_NE(observer->GetLastRequest(), absl::nullopt);
|
||||
+}
|
||||
+
|
||||
+TEST_F(ResourceFetcherTest,
|
||||
+ EmulateLoadStartedForInspectorOncePerResourceEnabled) {
|
||||
+ auto* observer = MakeGarbageCollected<TestResourceLoadObserver>();
|
||||
+
|
||||
+ // Set up the initial fetcher and mark the resource as cached.
|
||||
+ auto* fetcher = CreateFetcher();
|
||||
+ KURL url("http://127.0.0.1:8000/foo.woff2");
|
||||
+ RegisterMockedURLLoad(url);
|
||||
+ FetchParameters fetch_params =
|
||||
+ FetchParameters::CreateForTest(ResourceRequest(url));
|
||||
+ Resource* resource = MockResource::Fetch(fetch_params, fetcher, nullptr);
|
||||
+ resource->SetStatus(ResourceStatus::kCached);
|
||||
+
|
||||
+ ASSERT_NE(fetcher->CachedResource(url), nullptr);
|
||||
+ ASSERT_FALSE(fetcher->ResourceHasBeenEmulatedLoadStartedForInspector(url));
|
||||
+
|
||||
+ // Set up the second fetcher.
|
||||
+ auto* otherContextFetcher = CreateFetcher();
|
||||
+ otherContextFetcher->SetResourceLoadObserver(observer);
|
||||
+
|
||||
+ // Ensure that the url is initially not cached, not marked as emulated,
|
||||
+ // and the observer's last request is empty.
|
||||
+ ASSERT_EQ(otherContextFetcher->CachedResource(url), nullptr);
|
||||
+ ASSERT_FALSE(
|
||||
+ otherContextFetcher->ResourceHasBeenEmulatedLoadStartedForInspector(url));
|
||||
+ ASSERT_EQ(observer->GetLastRequest(), absl::nullopt);
|
||||
+
|
||||
+ otherContextFetcher->EmulateLoadStartedForInspector(
|
||||
+ resource, url, mojom::blink::RequestContextType::FONT,
|
||||
+ network::mojom::RequestDestination::kFont,
|
||||
+ fetch_initiator_type_names::kCSS);
|
||||
+
|
||||
+ // After the first emulation, ensure that the url is not cached,
|
||||
+ // marked as emulated, and the observer's last request is not empty with
|
||||
+ // the feature enabled.
|
||||
+ ASSERT_EQ(otherContextFetcher->CachedResource(url), nullptr);
|
||||
+ ASSERT_TRUE(
|
||||
+ otherContextFetcher->ResourceHasBeenEmulatedLoadStartedForInspector(url));
|
||||
+ ASSERT_NE(observer->GetLastRequest(), absl::nullopt);
|
||||
+
|
||||
+ // Clear out the last request to start fresh
|
||||
+ observer->ClearLastRequest();
|
||||
+
|
||||
+ otherContextFetcher->EmulateLoadStartedForInspector(
|
||||
+ resource, url, mojom::blink::RequestContextType::FONT,
|
||||
+ network::mojom::RequestDestination::kFont,
|
||||
+ fetch_initiator_type_names::kCSS);
|
||||
+
|
||||
+ // After the first emulation, ensure that the url is not cached,
|
||||
+ // marked as emulated, and the observer's last request is empty with
|
||||
+ // the feature enabled. This means that the observer was not
|
||||
+ // notified with this emulation.
|
||||
+ ASSERT_EQ(otherContextFetcher->CachedResource(url), nullptr);
|
||||
+ ASSERT_TRUE(
|
||||
+ otherContextFetcher->ResourceHasBeenEmulatedLoadStartedForInspector(url));
|
||||
+ ASSERT_EQ(observer->GetLastRequest(), absl::nullopt);
|
||||
+}
|
||||
+
|
||||
} // namespace blink
|
||||
@@ -59,11 +59,11 @@ index f96af14cb915c8ab92b314ac15b6dffcdd6ec607..2556abe433493251ebd48d4aeddaa6d4
|
||||
// true if register successfully, or false if 1) the specificied |accelerator|
|
||||
// has been registered by another caller or other native applications, or
|
||||
diff --git a/content/browser/media/media_keys_listener_manager_impl.cc b/content/browser/media/media_keys_listener_manager_impl.cc
|
||||
index fd95c8c5b62a447542e38bf69acc86303be8fd9a..e50d17d9ce7c8c844f4a8409ca0eef67e7c4003d 100644
|
||||
index aa21320061131a051f1393e2a71181fd49d1d938..6be700f632e9f8732bee726b8c4c3d39787fca60 100644
|
||||
--- a/content/browser/media/media_keys_listener_manager_impl.cc
|
||||
+++ b/content/browser/media/media_keys_listener_manager_impl.cc
|
||||
@@ -56,7 +56,11 @@ bool MediaKeysListenerManagerImpl::StartWatchingMediaKey(
|
||||
CanActiveMediaSessionControllerReceiveEvents();
|
||||
@@ -86,7 +86,11 @@ bool MediaKeysListenerManagerImpl::StartWatchingMediaKey(
|
||||
CanActiveMediaSessionControllerReceiveEvents();
|
||||
|
||||
// Tell the underlying MediaKeysListener to listen for the key.
|
||||
- if (should_start_watching && media_keys_listener_ &&
|
||||
@@ -75,18 +75,11 @@ index fd95c8c5b62a447542e38bf69acc86303be8fd9a..e50d17d9ce7c8c844f4a8409ca0eef67
|
||||
!media_keys_listener_->StartWatchingMediaKey(key_code)) {
|
||||
return false;
|
||||
}
|
||||
@@ -258,6 +262,7 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() {
|
||||
#endif
|
||||
|
||||
if (system_media_controls_) {
|
||||
+ // This is required for proper functioning of MediaMetadata.
|
||||
system_media_controls_->AddObserver(this);
|
||||
system_media_controls_notifier_ =
|
||||
std::make_unique<SystemMediaControlsNotifier>(
|
||||
@@ -270,6 +275,19 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() {
|
||||
@@ -320,6 +324,20 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() {
|
||||
this, ui::MediaKeysListener::Scope::kGlobal);
|
||||
DCHECK(media_keys_listener_);
|
||||
}
|
||||
|
||||
+
|
||||
+#if BUILDFLAG(IS_MAC)
|
||||
+ // Chromium's implementation of SystemMediaControls falls
|
||||
+ // down into MPRemoteCommandCenter, which makes it such that an app will not
|
||||
|
||||
@@ -9,21 +9,20 @@ to support content settings UI. The support pulls in chrome content settings
|
||||
and UI code which are not valid in the scope of Electron.
|
||||
|
||||
diff --git a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc
|
||||
index d26d27fa9e960972aafd5b05b4e90146ce29c333..5b67c748ec06432201f4f23ed4f915212c058fa3 100644
|
||||
index d26d27fa9e960972aafd5b05b4e90146ce29c333..c5e43a94c6ea94ea4f02a83256bec9ba65fc7140 100644
|
||||
--- a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc
|
||||
+++ b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc
|
||||
@@ -21,9 +21,11 @@
|
||||
@@ -21,8 +21,10 @@
|
||||
#include "ui/gfx/geometry/size.h"
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
#include "chrome/browser/picture_in_picture/auto_picture_in_picture_tab_helper.h"
|
||||
#include "chrome/browser/picture_in_picture/auto_pip_setting_helper.h"
|
||||
#include "media/base/media_switches.h"
|
||||
+#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
#include "media/base/media_switches.h"
|
||||
#include "third_party/blink/public/common/features.h"
|
||||
#include "ui/views/view.h"
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
@@ -38,7 +40,7 @@ constexpr gfx::Size kMinWindowSize(240, 52);
|
||||
// not apply to video Picture-in-Picture windows.
|
||||
constexpr double kMaxWindowSizeRatio = 0.8;
|
||||
@@ -79,7 +78,7 @@ index d26d27fa9e960972aafd5b05b4e90146ce29c333..5b67c748ec06432201f4f23ed4f91521
|
||||
// It would be nice to create this in `EnterPictureInPicture*`, but detecting
|
||||
// auto-pip while pip is in the process of opening doesn't work.
|
||||
//
|
||||
@@ -440,13 +445,17 @@ PictureInPictureWindowManager::GetOverlayView(
|
||||
@@ -440,6 +445,8 @@ PictureInPictureWindowManager::GetOverlayView(
|
||||
}
|
||||
|
||||
return overlay_view;
|
||||
@@ -87,49 +86,46 @@ index d26d27fa9e960972aafd5b05b4e90146ce29c333..5b67c748ec06432201f4f23ed4f91521
|
||||
+ return nullptr;
|
||||
}
|
||||
|
||||
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
PictureInPictureOcclusionTracker*
|
||||
PictureInPictureWindowManager::GetOcclusionTracker() {
|
||||
CreateOcclusionTrackerIfNecessary();
|
||||
return occlusion_tracker_.get();
|
||||
}
|
||||
+#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
std::vector<url::Origin>
|
||||
@@ -459,7 +468,7 @@ PictureInPictureWindowManager::GetActiveSessionOrigins() {
|
||||
return active_origins;
|
||||
@@ -460,6 +467,7 @@ PictureInPictureWindowManager::GetActiveSessionOrigins() {
|
||||
}
|
||||
|
||||
-#if !BUILDFLAG(IS_ANDROID)
|
||||
+#if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
void PictureInPictureWindowManager::CreateAutoPipSettingHelperIfNeeded() {
|
||||
// Because we have to defer creating this until after the tab helper finds out
|
||||
// about pip, we don't care if there's already a helper. Just use it.
|
||||
@@ -489,6 +497,7 @@ void PictureInPictureWindowManager::CreateAutoPipSettingHelperIfNeeded() {
|
||||
web_contents,
|
||||
base::BindOnce(&PictureInPictureWindowManager::ExitPictureInPictureSoon));
|
||||
}
|
||||
+#endif
|
||||
|
||||
void PictureInPictureWindowManager::CreateOcclusionTrackerIfNecessary() {
|
||||
if (occlusion_tracker_) {
|
||||
diff --git a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h
|
||||
index e94b3ebe6fe7c7d432d25aa100ed9ee525704c64..2fcbb8d7ddcd59ba365e010c7e7bb80e3df41dfe 100644
|
||||
index ff1ccc4bc2c5d365a53cdc85a97208f6f16b1d42..873642dc167251a9bcb932f20d3c1fb2b77d5096 100644
|
||||
--- a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h
|
||||
+++ b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h
|
||||
@@ -11,6 +11,7 @@
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "base/memory/singleton.h"
|
||||
#include "base/observer_list.h"
|
||||
#include "base/observer_list_types.h"
|
||||
+#include "build/branding_buildflags.h"
|
||||
#include "build/build_config.h"
|
||||
#include "chrome/browser/picture_in_picture/auto_pip_setting_overlay_view.h"
|
||||
#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||
@@ -30,8 +31,10 @@ class Display;
|
||||
#include "third_party/blink/public/mojom/picture_in_picture_window_options/picture_in_picture_window_options.mojom.h"
|
||||
@@ -34,7 +35,9 @@ class Display;
|
||||
} // namespace display
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
class AutoPipSettingHelper;
|
||||
class PictureInPictureOcclusionTracker;
|
||||
+#endif
|
||||
class PictureInPictureOcclusionTracker;
|
||||
|
||||
namespace views {
|
||||
class View;
|
||||
@@ -177,7 +180,7 @@ class PictureInPictureWindowManager {
|
||||
@@ -181,10 +184,11 @@ class PictureInPictureWindowManager {
|
||||
const gfx::Rect& browser_view_overridden_bounds,
|
||||
views::View* anchor_view,
|
||||
views::BubbleBorder::Arrow arrow);
|
||||
@@ -138,32 +134,46 @@ index e94b3ebe6fe7c7d432d25aa100ed9ee525704c64..2fcbb8d7ddcd59ba365e010c7e7bb80e
|
||||
AutoPipSettingHelper* get_setting_helper_for_testing() {
|
||||
return auto_pip_setting_helper_.get();
|
||||
}
|
||||
@@ -186,6 +189,7 @@ class PictureInPictureWindowManager {
|
||||
// when a widget has been occluded by a video or document picture-in-picture
|
||||
// window.
|
||||
PictureInPictureOcclusionTracker* GetOcclusionTracker();
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
// Get the origins for initiators of active Picture-in-Picture sessions.
|
||||
@@ -243,7 +247,7 @@ class PictureInPictureWindowManager {
|
||||
// helper class for callbacks, to avoid re-entrant calls during pip set-up.
|
||||
// Returns the PictureInPictureOcclusionTracker, which can inform observers
|
||||
// when a widget has been occluded by a video or document picture-in-picture
|
||||
@@ -248,8 +252,10 @@ class PictureInPictureWindowManager {
|
||||
static void ExitPictureInPictureSoon();
|
||||
|
||||
-#if !BUILDFLAG(IS_ANDROID)
|
||||
+#if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
// Create the settings helper if this is auto-pip and we don't have one.
|
||||
void CreateAutoPipSettingHelperIfNeeded();
|
||||
+#endif
|
||||
|
||||
@@ -262,9 +266,11 @@ class PictureInPictureWindowManager {
|
||||
// Creates the `occlusion_tracker_` if it does not already exist and should
|
||||
// exist.
|
||||
@@ -266,7 +272,9 @@ class PictureInPictureWindowManager {
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
std::unique_ptr<DocumentWebContentsObserver> document_web_contents_observer_;
|
||||
|
||||
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
std::unique_ptr<AutoPipSettingHelper> auto_pip_setting_helper_;
|
||||
+#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
|
||||
std::unique_ptr<PictureInPictureOcclusionTracker> occlusion_tracker_;
|
||||
+#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
#endif //! BUILDFLAG(IS_ANDROID)
|
||||
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
index 9c878b85a1ac1e163d46d77ddc5e6ab0fafb52c4..60f241c2d3234446b514860377209920691098c5 100644
|
||||
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
@@ -309,11 +309,13 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
|
||||
}
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
raw_ptr<content::PictureInPictureWindowController, DanglingUntriaged>
|
||||
+#if 0
|
||||
PictureInPictureOcclusionTracker* tracker =
|
||||
PictureInPictureWindowManager::GetInstance()->GetOcclusionTracker();
|
||||
if (tracker) {
|
||||
tracker->OnPictureInPictureWidgetOpened(overlay_window.get());
|
||||
}
|
||||
+#endif
|
||||
|
||||
return overlay_window;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ node does not change in this case.
|
||||
chromium-bug: https://crbug.com/1369605
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.cc b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
|
||||
index f5f30d5696bdd2b8b5948b18b3f7959f9078cc72..660dc5f60bad28ce345827767fc508711ea06d31 100644
|
||||
index 2b5c0cb8ce6486e617ad8d4256e183d45fa71e56..bdf679f9b9fbf36aaef8efe0da4ded91034e091e 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_child_frame.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
|
||||
@@ -1046,6 +1046,12 @@ RenderWidgetHostViewChildFrame::DidUpdateVisualProperties(
|
||||
@@ -45,10 +45,10 @@ index 1dfd9c071a41482e0d35257b28522e5b37702f25..41a09e9470dfa5797c69d02fc9b4f5e6
|
||||
// RenderFrameMetadataProvider::Observer implementation.
|
||||
void OnRenderFrameMetadataChangedBeforeActivation(
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 46e399e99018aa900a78fe35278bbd28bb2b188d..3ee40379364997d07ddfe678a473635ed6422daa 100644
|
||||
index 07bca1e7dd54b579e4f1f494b00dacdb36ece4a2..dd83a4134ee50b97932ad5ad3f45c3b5525d2773 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -8656,7 +8656,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
@@ -8651,7 +8651,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
"WebContentsImpl::OnFocusedElementChangedInFrame",
|
||||
"render_frame_host", frame);
|
||||
RenderWidgetHostViewBase* root_view =
|
||||
|
||||
@@ -11,10 +11,10 @@ This patch should be upstreamed as a conditional revert of the logic in desktop
|
||||
vs mobile runtimes. i.e. restore the old logic only on desktop platforms
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index 749ee4641462aec1142f75de9f0459d7e7cf322f..4dcee366b8bd43add1f7e1dbedaf73403dd944cd 100644
|
||||
index b5b82b5cbc02bd28615f6f545f9538671d7bc7df..9c520b38b972199cf686ab337626f7a6c5151418 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -2205,9 +2205,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
|
||||
@@ -2206,9 +2206,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
|
||||
void RenderWidgetHostImpl::NotifyScreenInfoChanged() {
|
||||
// The resize message (which may not happen immediately) will carry with it
|
||||
// the screen info as well as the new size (if the screen has changed scale
|
||||
|
||||
@@ -8,10 +8,10 @@ v8::Value instead of base::Value.
|
||||
Refs https://bugs.chromium.org/p/chromium/issues/detail?id=1323953
|
||||
|
||||
diff --git a/extensions/renderer/script_injection.cc b/extensions/renderer/script_injection.cc
|
||||
index be2d57fd66c08912fe4bfc69f5bbc837e5d3bddd..2a66be13541dcb547362922e614c9a50d686d822 100644
|
||||
index b62b74eedc1e6ec62894566be806e301c1ff0a87..b8c4e8bb7fc9b1708192363115ed6cd86ba09775 100644
|
||||
--- a/extensions/renderer/script_injection.cc
|
||||
+++ b/extensions/renderer/script_injection.cc
|
||||
@@ -270,6 +270,7 @@ void ScriptInjection::InjectJs(std::set<std::string>* executing_scripts,
|
||||
@@ -272,6 +272,7 @@ void ScriptInjection::InjectJs(std::set<std::string>* executing_scripts,
|
||||
blink::mojom::LoadEventBlockingOption::kBlock,
|
||||
base::BindOnce(&ScriptInjection::OnJsInjectionCompleted,
|
||||
weak_ptr_factory_.GetWeakPtr()),
|
||||
@@ -64,10 +64,10 @@ index 4cd668a127a50e5462e3878c3f1dcb7384926768..dfbec49249404df8f8ebdbd26e6e865c
|
||||
|
||||
#endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
index 3d564401f00f9b65ea232470602d5215caf0d94f..2a6026cb3f71e798da8222cab7be7fe7b6b3a437 100644
|
||||
index e436857b89266589986ed08857943339b3a48b98..0554d9f1d41f368952d3e491cb4f490eceb64a07 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -2899,6 +2899,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
@@ -2900,6 +2900,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
mojom::blink::EvaluationTiming evaluation_timing,
|
||||
mojom::blink::LoadEventBlockingOption blocking_option,
|
||||
WebScriptExecutionCallback callback,
|
||||
@@ -75,7 +75,7 @@ index 3d564401f00f9b65ea232470602d5215caf0d94f..2a6026cb3f71e798da8222cab7be7fe7
|
||||
BackForwardCacheAware back_forward_cache_aware,
|
||||
mojom::blink::WantResultOption want_result_option,
|
||||
mojom::blink::PromiseResultOption promise_behavior) {
|
||||
@@ -2932,7 +2933,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
@@ -2933,7 +2934,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
PausableScriptExecutor::CreateAndRun(
|
||||
script_state, std::move(script_sources), execute_script_policy,
|
||||
user_gesture, evaluation_timing, blocking_option, want_result_option,
|
||||
@@ -97,10 +97,10 @@ index 42d153ab9f693aa9be7a87c0e558df3590ea98a9..c20c2efee3281b1d6924c7235f00aff9
|
||||
mojom::blink::WantResultOption,
|
||||
mojom::blink::PromiseResultOption);
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
|
||||
index 7cc07e1a9f8a447f39e58810bbc7a2eeb93f686c..b11ffdbc5ab80d3fa0facac6cfc2b7fed879cb60 100644
|
||||
index e8f270637a5af69e4de4234a9535042eac526229..e21567618360f52bebbbbdb4c3fddfb695acde57 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
|
||||
@@ -943,6 +943,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld(
|
||||
@@ -944,6 +944,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld(
|
||||
std::move(callback).Run(value ? std::move(*value) : base::Value());
|
||||
},
|
||||
std::move(callback)),
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: frame_host_manager.patch
|
||||
Allows embedder to intercept site instances created by chromium.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
index 78881666121746d0004fa1e4028ce1901a35e6aa..db137d66c5eb6efd55c4449e1c28c2e0a3a88332 100644
|
||||
index ee5750669e83a5b089a322733d8e9ee600a81f3f..d5f2d5bb7593cade974d9f38e9950a428be9fb3a 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
@@ -4215,6 +4215,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
@@ -4223,6 +4223,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
request->ResetStateForSiteInstanceChange();
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ index 78881666121746d0004fa1e4028ce1901a35e6aa..db137d66c5eb6efd55c4449e1c28c2e0
|
||||
}
|
||||
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index ac85bc0cc8a5bc557636fb1203c2e408dba0df1b..2434484e046afa804ad640503f16ee44e8ebb3f2 100644
|
||||
index 22c14f8cca02c92a740753cabdb67490ddca0a80..8bfd07ba4ec3cd75fcf0237cf4a6ed58c2c743f3 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -318,6 +318,11 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch
|
||||
Add electron resources file to the list of resource ids generation.
|
||||
|
||||
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
|
||||
index 0184b925d480611a76f6567bb65846a8b92ac038..80b0415092e5218635cee9e28b8d9511bd1dd4b1 100644
|
||||
index a99da39f3326514467b63417f03376d7cd118ac7..2b224299dac8a13adfa4887adb150d285216ed19 100644
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -1259,6 +1259,11 @@
|
||||
@@ -1263,6 +1263,11 @@
|
||||
"includes": [8440],
|
||||
},
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ require a largeish patch to get working, so just redirect it to our
|
||||
implementation instead.
|
||||
|
||||
diff --git a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
|
||||
index 4841d1169ad1d538310dc3258061bb7afceb6d70..7480468e2b4a1d1e7fbd9a67e4305fb7fe860b2c 100644
|
||||
index 2ede3f2af478ad6a5c9b59ef87b5f13fe5a5ca1f..25acda798c7fdb2209d59f637e619d65b63e8b41 100644
|
||||
--- a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
|
||||
+++ b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
@@ -11,7 +11,7 @@ If removing this patch causes no sync failures, it's safe to delete :+1:
|
||||
Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903
|
||||
|
||||
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
|
||||
index cfe0750ef85145832e889609a3d0d19585be43b8..257ebf81b659531337a991de0b95907b68879dd8 100755
|
||||
index fbcaf3b796fcc493df77a70be7f400a88d680ecc..f99f28c291c2ed476eb6b661ad606fdf09e4608b 100755
|
||||
--- a/tools/clang/scripts/update.py
|
||||
+++ b/tools/clang/scripts/update.py
|
||||
@@ -307,6 +307,8 @@ def GetDefaultHostOs():
|
||||
|
||||
@@ -35,10 +35,10 @@ system font by checking if it's kCTFontPriorityAttribute is set to
|
||||
system priority.
|
||||
|
||||
diff --git a/base/BUILD.gn b/base/BUILD.gn
|
||||
index bc93caca1744eb97d9d26569f8829b09af80eed6..21ff9b849e2311c797dd862d583907577022e6a0 100644
|
||||
index 20f543c3e7a365eea5b2e359887842ec6632d7b7..e8b781467b663465b45368e633c064f56c369b0d 100644
|
||||
--- a/base/BUILD.gn
|
||||
+++ b/base/BUILD.gn
|
||||
@@ -1031,6 +1031,7 @@ component("base") {
|
||||
@@ -1029,6 +1029,7 @@ component("base") {
|
||||
"//build/config/compiler:prevent_unsafe_narrowing",
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
"//build/config/compiler:wglobal_constructors",
|
||||
@@ -370,10 +370,10 @@ index 053b8a2182778b469941116eab3acd5fd6fd8099..d085258d5970b37215fe0d5591e6c030
|
||||
// Beware: This view was briefly removed (in favor of a bare CALayer) in
|
||||
// https://crrev.com/c/1236675. The ordering of unassociated layers relative
|
||||
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
|
||||
index 24ef0dfe8918c926b189762608397c3e557366b6..3e78747afba61506ca616a66b51365bf4117110c 100644
|
||||
index 65a5e8f651b2cc0c80a7216b5556f2eaec8f07b0..8ee3c35ba55091d87ac633073123d081a9f95929 100644
|
||||
--- a/components/viz/service/BUILD.gn
|
||||
+++ b/components/viz/service/BUILD.gn
|
||||
@@ -333,6 +333,7 @@ viz_component("service") {
|
||||
@@ -334,6 +334,7 @@ viz_component("service") {
|
||||
"frame_sinks/external_begin_frame_source_mac.h",
|
||||
]
|
||||
}
|
||||
@@ -381,7 +381,7 @@ index 24ef0dfe8918c926b189762608397c3e557366b6..3e78747afba61506ca616a66b51365bf
|
||||
}
|
||||
|
||||
if (is_android || use_ozone) {
|
||||
@@ -592,6 +593,7 @@ viz_source_set("unit_tests") {
|
||||
@@ -593,6 +594,7 @@ viz_source_set("unit_tests") {
|
||||
"display_embedder/software_output_device_mac_unittest.mm",
|
||||
]
|
||||
frameworks = [ "IOSurface.framework" ]
|
||||
@@ -431,7 +431,7 @@ index 47afd2553bf76b5b185a4be131196d90cf9cad44..d6f9998890d7a83a8fb221691aa2f1e7
|
||||
return kAttributes;
|
||||
}
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
index a29d5b66e6daba7ba29bb82a9869760539ee52ad..eac8896de7ed9a40036942405d4a53981e2a4947 100644
|
||||
index b9884ca952e7fb6d4e9156b17ba9c931154dea1d..136c2b10b72e6d0db48bc4a1b36bf78bc1f75a69 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -53,6 +53,7 @@ source_set("browser") {
|
||||
@@ -568,10 +568,10 @@ index 404d89f78981c5d63380edfce78ccdff8a7f6037..893cfb4908ab73a3aedca25d056d1ddf
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
|
||||
index 308133639fdb5bd7d0de6becc9aabd202532808a..07952e35e3c161f6ddf8d849af0e4c2760ff0dbc 100644
|
||||
index bf4e98f5962e5415bde1709104a8228809dd9a21..1aab06c1a8e443cdca07cc5acb26850813854c3d 100644
|
||||
--- a/content/common/BUILD.gn
|
||||
+++ b/content/common/BUILD.gn
|
||||
@@ -187,6 +187,7 @@ source_set("common") {
|
||||
@@ -217,6 +217,7 @@ source_set("common") {
|
||||
"//content:content_implementation",
|
||||
"//build/config:precompiled_headers",
|
||||
]
|
||||
@@ -660,7 +660,7 @@ index a119b4439bfb9218c7aaf09dca8e78527da7f20d..faa813b003940280c6eeb87e70173019
|
||||
|
||||
} // namespace content
|
||||
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
|
||||
index 3ed642ab9c89b16f0b2fce98e37c7ee5398bb714..aeb4193486338441397983e8f24a29b2b3ad7b4d 100644
|
||||
index 0de4fdcdba7dd112faed75e9e8209af18ee1032d..19469ee65a71df3b7628b04dda97b8e3f229c479 100644
|
||||
--- a/content/test/BUILD.gn
|
||||
+++ b/content/test/BUILD.gn
|
||||
@@ -476,6 +476,7 @@ static_library("test_support") {
|
||||
@@ -687,7 +687,7 @@ index 3ed642ab9c89b16f0b2fce98e37c7ee5398bb714..aeb4193486338441397983e8f24a29b2
|
||||
|
||||
public_deps = [
|
||||
":test_interfaces",
|
||||
@@ -2910,6 +2913,7 @@ test("content_unittests") {
|
||||
@@ -2912,6 +2915,7 @@ test("content_unittests") {
|
||||
}
|
||||
|
||||
configs += [ "//build/config:precompiled_headers" ]
|
||||
@@ -1278,7 +1278,7 @@ index eb81a70e4d5d5cd3e6ae9b45f8cd1c795ea76c51..dc30306f2c5d20503399fc3a8860773a
|
||||
|
||||
} // namespace sandbox
|
||||
diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn
|
||||
index de2ed80fd14737a47d6e32718ec30f540a3fb2a4..451bdd3782c63f7a71896bb2deb0a52fc80b96ef 100644
|
||||
index 122735b454f4a59014d43ef62eb6a3f53b41537e..e8167c3508286970a7cfafcb1b11fbc758cc9aac 100644
|
||||
--- a/third_party/blink/renderer/core/BUILD.gn
|
||||
+++ b/third_party/blink/renderer/core/BUILD.gn
|
||||
@@ -312,6 +312,7 @@ component("core") {
|
||||
@@ -1377,7 +1377,7 @@ index c737a2ca1afb44083aef33c6aa4518bea68d1aba..879f1357b5129849c5a1aa1731cf7697
|
||||
// Accessible object
|
||||
if (AXElementWrapper::IsValidElement(value)) {
|
||||
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
|
||||
index 070c243b505d8e51c27f97d7aacee22452ec24a9..3fb3fc86862abd4565a3e9f5107a784d3f449e8f 100644
|
||||
index 27aa6f78a2cef0159f03dfc4d0704de72e288dd2..e5e593c1d799dab31483bcb19053d20898212e35 100644
|
||||
--- a/ui/base/BUILD.gn
|
||||
+++ b/ui/base/BUILD.gn
|
||||
@@ -359,6 +359,7 @@ component("base") {
|
||||
@@ -1477,10 +1477,10 @@ index fc25ba79d2b0e1acdb7ba54b89e7d6e16f94771b..962df2d65d61ec0836cf465d847eb666
|
||||
|
||||
} // namespace
|
||||
diff --git a/ui/display/BUILD.gn b/ui/display/BUILD.gn
|
||||
index 301e8792b1259e7f7c4eb8e75a09a32f0d60e91f..36da16f203b14e872fb8153e8fc10c3f6725280d 100644
|
||||
index 88f2c986e7688b4c2f7b94dd6bbd75a7fecc29b4..b2a194f68164d9ce72caa2bf6feb121428ba2bd4 100644
|
||||
--- a/ui/display/BUILD.gn
|
||||
+++ b/ui/display/BUILD.gn
|
||||
@@ -68,6 +68,10 @@ component("display") {
|
||||
@@ -69,6 +69,10 @@ component("display") {
|
||||
"mac/display_link_mac.h",
|
||||
"mac/screen_mac.mm",
|
||||
]
|
||||
@@ -1556,10 +1556,10 @@ index b28640bb4d89ba9508d4086c9e5ca9ed4a9a7023..15cb883b91f624c1f23f4458dbf8d147
|
||||
// enough.
|
||||
return PlatformFontMac::SystemFontType::kGeneral;
|
||||
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
|
||||
index 3a43af5407ba963f81b63fc5b1640253d9159edd..2f209280cc6e3c52c93a74ccc4d1fa6894a026af 100644
|
||||
index 87f9bbe79b876ef5e6bd012b7a261aee51986791..5285a37944cbe256fd1937db299e69cdd39dc71e 100644
|
||||
--- a/ui/views/BUILD.gn
|
||||
+++ b/ui/views/BUILD.gn
|
||||
@@ -697,6 +697,7 @@ component("views") {
|
||||
@@ -700,6 +700,7 @@ component("views") {
|
||||
"IOSurface.framework",
|
||||
"QuartzCore.framework",
|
||||
]
|
||||
@@ -1567,7 +1567,7 @@ index 3a43af5407ba963f81b63fc5b1640253d9159edd..2f209280cc6e3c52c93a74ccc4d1fa68
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
@@ -1125,6 +1126,8 @@ source_set("test_support") {
|
||||
@@ -1128,6 +1129,8 @@ source_set("test_support") {
|
||||
"//testing/gtest",
|
||||
]
|
||||
|
||||
@@ -1604,7 +1604,7 @@ index f37c02488e6ba943ebf9b880a04bcfef9afc9d97..b10ed25b5cdf5eb2f314ed72226f71c8
|
||||
// Used to force the NSApplication's focused accessibility element to be the
|
||||
// views::Views accessibility tree when the NSView for this is focused.
|
||||
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
|
||||
index efbbc2fcaa96bfe717ab41269d273acddadb4bac..61421ddad4f76667c1e0b5775e4f26284357f64b 100644
|
||||
index 71b2c9084e597ef0fff68c42450ac81931da364a..3d2964abd903bbdba5ca07591231a72d859abaae 100644
|
||||
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
|
||||
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
|
||||
@@ -345,7 +345,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
|
||||
@@ -113,18 +113,18 @@ index 18cca28edc35dadd4eb9173558d1764b1bf85dd5..4cda3b7f2db6be365e4edb9456e1f722
|
||||
}
|
||||
|
||||
diff --git a/content/browser/notifications/platform_notification_context_impl.h b/content/browser/notifications/platform_notification_context_impl.h
|
||||
index 9c9e590aab71d5b66cdd2c9a0cfc5f2d34443e84..c461c131d93d592487e319893d531bf4bdf14e39 100644
|
||||
index 1dc5478b8d0787a1cc82dc9fcb0227fed3f583c2..9a76f675ccdd4b173afa65aa05b733d456f30cff 100644
|
||||
--- a/content/browser/notifications/platform_notification_context_impl.h
|
||||
+++ b/content/browser/notifications/platform_notification_context_impl.h
|
||||
@@ -45,6 +45,7 @@ struct NotificationDatabaseData;
|
||||
class PlatformNotificationServiceProxy;
|
||||
@@ -46,6 +46,7 @@ class PlatformNotificationServiceProxy;
|
||||
class RenderProcessHost;
|
||||
class ServiceWorkerContextWrapper;
|
||||
class WeakDocumentPtr;
|
||||
+class RenderFrameHost;
|
||||
|
||||
// Implementation of the Web Notification storage context. The public methods
|
||||
// defined in this interface must only be called on the UI thread.
|
||||
@@ -78,6 +79,7 @@ class CONTENT_EXPORT PlatformNotificationContextImpl
|
||||
@@ -79,6 +80,7 @@ class CONTENT_EXPORT PlatformNotificationContextImpl
|
||||
// service is created by a dedicated worker, or is `nullptr` otherwise.
|
||||
void CreateService(
|
||||
RenderProcessHost* render_process_host,
|
||||
|
||||
@@ -40,12 +40,12 @@ index af0616d9ca466d146f3c41887857dd4720ebafbf..c088db193f5bd4b88aa42a3803571d2b
|
||||
ui::ImageModel::FromVectorIcon(*icon, kColorPipWindowForeground,
|
||||
kCloseButtonIconSize));
|
||||
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
index dd918e0ddeb8f7d9eaa12e348e522bb18704d9df..5fac36739b1cbfc48e7c523457d1e930908d7705 100644
|
||||
index 19b3ac41fae0e18412f21f9efba5a656f536e7f8..9c878b85a1ac1e163d46d77ddc5e6ab0fafb52c4 100644
|
||||
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
@@ -16,9 +16,11 @@
|
||||
#include "base/timer/timer.h"
|
||||
@@ -17,9 +17,11 @@
|
||||
#include "build/build_config.h"
|
||||
#include "chrome/browser/picture_in_picture/picture_in_picture_occlusion_tracker.h"
|
||||
#include "chrome/browser/picture_in_picture/picture_in_picture_window_manager.h"
|
||||
+#if 0
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
@@ -55,7 +55,7 @@ index dd918e0ddeb8f7d9eaa12e348e522bb18704d9df..5fac36739b1cbfc48e7c523457d1e930
|
||||
#include "chrome/browser/ui/color/chrome_color_id.h"
|
||||
#include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h"
|
||||
#include "chrome/browser/ui/views/overlay/close_image_button.h"
|
||||
@@ -57,7 +59,7 @@
|
||||
@@ -58,7 +60,7 @@
|
||||
#include "ui/aura/window.h"
|
||||
#endif
|
||||
|
||||
@@ -64,7 +64,7 @@ index dd918e0ddeb8f7d9eaa12e348e522bb18704d9df..5fac36739b1cbfc48e7c523457d1e930
|
||||
#include "chrome/browser/shell_integration_win.h"
|
||||
#include "ui/aura/window.h"
|
||||
#include "ui/aura/window_tree_host.h"
|
||||
@@ -286,7 +288,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
|
||||
@@ -287,7 +289,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
|
||||
overlay_window->Init(std::move(params));
|
||||
overlay_window->OnRootViewReady();
|
||||
|
||||
|
||||
@@ -61,10 +61,10 @@ index 1bef8b4a80d2d244f469a0ca9bee9b8d67bb8767..3e911e5931301a279b6608d5cb1451cc
|
||||
? SkColorSetRGB(0x99, 0xC8, 0xFF)
|
||||
: SkColorSetRGB(0x00, 0x75, 0xFF)};
|
||||
diff --git a/ui/color/win/native_color_mixers_win.cc b/ui/color/win/native_color_mixers_win.cc
|
||||
index f3a29c3c7393a26a7da72c4b412a98f126059a3f..9508cfc93c4980ef503a0ebb0cc87b3853dcc707 100644
|
||||
index d3204e033dd1624d1eee001aa755217e5be55c38..30f36fdaaff9c0e6f321a2a96f151338816c6c2b 100644
|
||||
--- a/ui/color/win/native_color_mixers_win.cc
|
||||
+++ b/ui/color/win/native_color_mixers_win.cc
|
||||
@@ -200,6 +200,10 @@ void AddNativeUiColorMixer(ColorProvider* provider,
|
||||
@@ -176,6 +176,10 @@ void AddNativeUiColorMixer(ColorProvider* provider,
|
||||
SetAlpha(kColorNotificationInputForeground, gfx::kGoogleGreyAlpha700);
|
||||
mixer[kColorSliderTrack] = AlphaBlend(
|
||||
kColorNativeHighlight, kColorNativeWindow, gfx::kGoogleGreyAlpha400);
|
||||
@@ -75,7 +75,7 @@ index f3a29c3c7393a26a7da72c4b412a98f126059a3f..9508cfc93c4980ef503a0ebb0cc87b38
|
||||
|
||||
CompleteControlsForcedColorsDefinition(mixer);
|
||||
|
||||
@@ -210,6 +214,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
|
||||
@@ -186,6 +190,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
|
||||
mixer[kColorFrameInactive] = {kColorNativeWindow};
|
||||
mixer[kColorPrimaryBackground] = {kColorNativeWindow};
|
||||
mixer[kColorTooltipBackground] = {kColorNativeWindow};
|
||||
@@ -83,7 +83,7 @@ index f3a29c3c7393a26a7da72c4b412a98f126059a3f..9508cfc93c4980ef503a0ebb0cc87b38
|
||||
|
||||
// Window Text
|
||||
mixer[kColorAlertLowSeverity] = {kColorNativeWindowText};
|
||||
@@ -223,6 +228,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
|
||||
@@ -199,6 +204,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
|
||||
mixer[kColorTableGroupingIndicator] = {kColorNativeWindowText};
|
||||
mixer[kColorThrobber] = {kColorNativeWindowText};
|
||||
mixer[kColorTooltipForeground] = {kColorNativeWindowText};
|
||||
@@ -91,7 +91,7 @@ index f3a29c3c7393a26a7da72c4b412a98f126059a3f..9508cfc93c4980ef503a0ebb0cc87b38
|
||||
|
||||
// Hyperlinks
|
||||
mixer[kColorLinkForegroundDefault] = {kColorNativeHotlight};
|
||||
@@ -265,6 +271,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
|
||||
@@ -241,6 +247,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
|
||||
mixer[kColorTextfieldForeground] = {kColorNativeBtnText};
|
||||
mixer[kColorTextfieldForegroundPlaceholder] = {kColorNativeBtnText};
|
||||
mixer[kColorTextfieldForegroundDisabled] = {kColorNativeBtnText};
|
||||
|
||||
@@ -11,7 +11,7 @@ majority of changes originally come from these PRs:
|
||||
This patch also fixes callback for manual user cancellation and success.
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index ba45f6080fee259da75db69b38ceb92c19489247..a36be0efdaf928fc2ca59a7d9417e0e3f3a2e9be 100644
|
||||
index 3d036c17061db0b59a2d874395ff3ad3450ab889..479f47b162bb173440ebc145159e7c6838daf538 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -966,7 +966,6 @@ if (is_win) {
|
||||
@@ -91,7 +91,7 @@ index 57c9c4408946066cd89304d50798a3719c8012d5..1c44d16c792a497623333ee4cb89005e
|
||||
: PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3;
|
||||
}
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
|
||||
index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4e38d940e 100644
|
||||
index 3ff37a308a1485f75a5c900168058e38e92ace52..aed74ff9ad02e7654e21eaea04541d661418e8eb 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.cc
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.cc
|
||||
@@ -22,7 +22,9 @@
|
||||
@@ -187,7 +187,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
}
|
||||
|
||||
PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
@@ -209,12 +232,20 @@ void PrintViewManagerBase::DisableThirdPartyBlocking() {
|
||||
@@ -210,12 +233,20 @@ void PrintViewManagerBase::DisableThirdPartyBlocking() {
|
||||
}
|
||||
#endif // BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
|
||||
@@ -209,7 +209,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -339,12 +370,13 @@ void PrintViewManagerBase::OnDidUpdatePrintableArea(
|
||||
@@ -340,12 +371,13 @@ void PrintViewManagerBase::OnDidUpdatePrintableArea(
|
||||
}
|
||||
PRINTER_LOG(EVENT) << "Paper printable area updated for vendor id "
|
||||
<< print_settings->requested_media().vendor_id;
|
||||
@@ -224,7 +224,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
base::Value::Dict job_settings,
|
||||
std::unique_ptr<PrintSettings> print_settings,
|
||||
UpdatePrintSettingsCallback callback) {
|
||||
@@ -352,7 +384,8 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
|
||||
@@ -353,7 +385,8 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
|
||||
settings->pages = GetPageRangesFromJobSettings(job_settings);
|
||||
settings->params = mojom::PrintParams::New();
|
||||
RenderParamsFromPrintSettings(*print_settings, settings->params.get());
|
||||
@@ -234,7 +234,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
if (!PrintMsgPrintParamsIsValid(*settings->params)) {
|
||||
mojom::PrinterType printer_type = static_cast<mojom::PrinterType>(
|
||||
*job_settings.FindInt(kSettingPrinterType));
|
||||
@@ -364,6 +397,10 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
|
||||
@@ -365,6 +398,10 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
set_cookie(settings->params->document_cookie);
|
||||
std::move(callback).Run(std::move(settings));
|
||||
}
|
||||
@@ -502,7 +539,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
|
||||
@@ -503,7 +540,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
|
||||
void PrintViewManagerBase::ScriptedPrintReply(
|
||||
ScriptedPrintCallback callback,
|
||||
int process_id,
|
||||
@@ -255,7 +255,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
|
||||
#if BUILDFLAG(ENABLE_OOP_PRINTING)
|
||||
@@ -517,12 +555,15 @@ void PrintViewManagerBase::ScriptedPrintReply(
|
||||
@@ -518,12 +556,15 @@ void PrintViewManagerBase::ScriptedPrintReply(
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
}
|
||||
}
|
||||
|
||||
@@ -650,10 +691,12 @@ void PrintViewManagerBase::DidPrintDocument(
|
||||
@@ -651,10 +692,12 @@ void PrintViewManagerBase::DidPrintDocument(
|
||||
void PrintViewManagerBase::GetDefaultPrintSettings(
|
||||
GetDefaultPrintSettingsCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
@@ -286,7 +286,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
#if BUILDFLAG(ENABLE_OOP_PRINTING)
|
||||
if (ShouldPrintJobOop() &&
|
||||
#if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS)
|
||||
@@ -705,10 +748,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -706,10 +749,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
base::Value::Dict job_settings,
|
||||
UpdatePrintSettingsCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
@@ -299,7 +299,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
|
||||
absl::optional<int> printer_type_value =
|
||||
job_settings.FindInt(kSettingPrinterType);
|
||||
@@ -719,6 +764,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -720,6 +765,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
|
||||
mojom::PrinterType printer_type =
|
||||
static_cast<mojom::PrinterType>(*printer_type_value);
|
||||
@@ -307,7 +307,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
if (printer_type != mojom::PrinterType::kExtension &&
|
||||
printer_type != mojom::PrinterType::kPdf &&
|
||||
printer_type != mojom::PrinterType::kLocal) {
|
||||
@@ -738,6 +784,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -739,6 +785,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
if (value > 0)
|
||||
job_settings.Set(kSettingRasterizePdfDpi, value);
|
||||
}
|
||||
@@ -315,7 +315,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
|
||||
std::unique_ptr<PrintSettings> print_settings =
|
||||
PrintSettingsFromJobSettings(job_settings);
|
||||
@@ -757,7 +804,21 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -758,7 +805,21 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
}
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
// TODO(crbug.com/1424368): Remove this if the printable areas can be made
|
||||
// fully available from `PrintBackend::GetPrinterSemanticCapsAndDefaults()`
|
||||
// for in-browser queries.
|
||||
@@ -779,8 +840,6 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -780,8 +841,6 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -347,7 +347,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::SetAccessibilityTree(
|
||||
@@ -796,7 +855,7 @@ void PrintViewManagerBase::SetAccessibilityTree(
|
||||
@@ -797,7 +856,7 @@ void PrintViewManagerBase::SetAccessibilityTree(
|
||||
void PrintViewManagerBase::IsPrintingEnabled(
|
||||
IsPrintingEnabledCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
@@ -356,7 +356,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
@@ -812,13 +871,13 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
@@ -813,13 +872,13 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
// didn't happen for some reason.
|
||||
bad_message::ReceivedBadMessage(
|
||||
render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME);
|
||||
@@ -372,7 +372,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@@ -860,6 +919,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
@@ -861,6 +920,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
|
||||
PrintManager::PrintingFailed(cookie, reason);
|
||||
|
||||
@@ -380,7 +380,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
// `PrintingFailed()` can occur because asynchronous compositing results
|
||||
// don't complete until after a print job has already failed and been
|
||||
// destroyed. In such cases the error notification to the user will
|
||||
@@ -869,7 +929,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
@@ -870,7 +930,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
print_job_->document()->cookie() == cookie) {
|
||||
ShowPrintErrorDialogForGenericError();
|
||||
}
|
||||
@@ -389,7 +389,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
ReleasePrinterQuery();
|
||||
}
|
||||
|
||||
@@ -881,15 +941,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) {
|
||||
@@ -882,15 +942,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) {
|
||||
test_observers_.RemoveObserver(&observer);
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::RenderFrameDeleted(
|
||||
@@ -941,7 +1010,12 @@ void PrintViewManagerBase::OnJobDone() {
|
||||
@@ -942,7 +1011,12 @@ void PrintViewManagerBase::OnJobDone() {
|
||||
// Printing is done, we don't need it anymore.
|
||||
// print_job_->is_job_pending() may still be true, depending on the order
|
||||
// of object registration.
|
||||
@@ -428,7 +428,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
ReleasePrintJob();
|
||||
}
|
||||
|
||||
@@ -950,9 +1024,10 @@ void PrintViewManagerBase::OnCanceling() {
|
||||
@@ -951,9 +1025,10 @@ void PrintViewManagerBase::OnCanceling() {
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::OnFailed() {
|
||||
@@ -440,7 +440,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
TerminatePrintJob(true);
|
||||
}
|
||||
|
||||
@@ -962,7 +1037,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
|
||||
@@ -963,7 +1038,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
|
||||
|
||||
// Is the document already complete?
|
||||
if (print_job_->document() && print_job_->document()->IsComplete()) {
|
||||
@@ -449,7 +449,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1015,7 +1090,10 @@ bool PrintViewManagerBase::SetupNewPrintJob(
|
||||
@@ -1016,7 +1091,10 @@ bool PrintViewManagerBase::SetupNewPrintJob(
|
||||
|
||||
// Disconnect the current `print_job_`.
|
||||
auto weak_this = weak_ptr_factory_.GetWeakPtr();
|
||||
@@ -461,7 +461,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
if (!weak_this)
|
||||
return false;
|
||||
|
||||
@@ -1035,7 +1113,7 @@ bool PrintViewManagerBase::SetupNewPrintJob(
|
||||
@@ -1036,7 +1114,7 @@ bool PrintViewManagerBase::SetupNewPrintJob(
|
||||
#endif
|
||||
print_job_->AddObserver(*this);
|
||||
|
||||
@@ -470,7 +470,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1103,6 +1181,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -1104,6 +1182,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -482,7 +482,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
if (!print_job_)
|
||||
return;
|
||||
|
||||
@@ -1110,7 +1193,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -1111,7 +1194,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
// printing_rfh_ should only ever point to a RenderFrameHost with a live
|
||||
// RenderFrame.
|
||||
DCHECK(rfh->IsRenderFrameLive());
|
||||
@@ -491,7 +491,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
}
|
||||
|
||||
print_job_->RemoveObserver(*this);
|
||||
@@ -1152,7 +1235,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
@@ -1153,7 +1236,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
}
|
||||
|
||||
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
|
||||
@@ -500,7 +500,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
return true;
|
||||
|
||||
if (!cookie) {
|
||||
@@ -1298,7 +1381,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() {
|
||||
@@ -1299,7 +1382,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() {
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) {
|
||||
@@ -509,7 +509,7 @@ index 3b3d37639d6e9e31deeb0e51efb6b7cd7c3953f5..ebd28f5a523fa8c6a3dbda8274bfc4d4
|
||||
|
||||
for (auto& observer : GetTestObservers()) {
|
||||
observer.OnPrintNow(rfh);
|
||||
@@ -1348,7 +1431,7 @@ void PrintViewManagerBase::CompleteScriptedPrintAfterContentAnalysis(
|
||||
@@ -1349,7 +1432,7 @@ void PrintViewManagerBase::CompleteScriptedPrintAfterContentAnalysis(
|
||||
set_analyzing_content(/*analyzing=*/false);
|
||||
if (!allowed || !printing_rfh_ || IsCrashed() ||
|
||||
!printing_rfh_->IsRenderFrameLive()) {
|
||||
@@ -705,7 +705,7 @@ index c08df976b94d14d2ea87ea928793201e52813fe9..d1460c2e23c7b52ddc695edff658483f
|
||||
// Tells the browser printing failed.
|
||||
PrintingFailed(int32 cookie, PrintFailureReason reason);
|
||||
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
|
||||
index 51fd552071aa9f6933b8a234b3bc7b2ecac33eb5..747e0e155449c6a8994665bc93734d4715329861 100644
|
||||
index 99fae89969b2ebc2c4439b723573cc1c74acf7d6..d77ff5ea2a1ab344d8e60d3f0c9fe53498fff780 100644
|
||||
--- a/components/printing/renderer/print_render_frame_helper.cc
|
||||
+++ b/components/printing/renderer/print_render_frame_helper.cc
|
||||
@@ -47,6 +47,7 @@
|
||||
@@ -716,7 +716,7 @@ index 51fd552071aa9f6933b8a234b3bc7b2ecac33eb5..747e0e155449c6a8994665bc93734d47
|
||||
#include "printing/units.h"
|
||||
#include "services/metrics/public/cpp/ukm_source_id.h"
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
|
||||
@@ -1217,14 +1218,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
|
||||
@@ -1243,14 +1244,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
|
||||
}
|
||||
|
||||
print_in_progress_ = true;
|
||||
@@ -733,7 +733,7 @@ index 51fd552071aa9f6933b8a234b3bc7b2ecac33eb5..747e0e155449c6a8994665bc93734d47
|
||||
if (!weak_this) {
|
||||
return;
|
||||
}
|
||||
@@ -1255,7 +1256,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
|
||||
@@ -1281,7 +1282,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
|
||||
receivers_.Add(this, std::move(receiver));
|
||||
}
|
||||
|
||||
@@ -742,7 +742,7 @@ index 51fd552071aa9f6933b8a234b3bc7b2ecac33eb5..747e0e155449c6a8994665bc93734d47
|
||||
ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
|
||||
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
|
||||
return;
|
||||
@@ -1270,7 +1271,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
|
||||
@@ -1296,7 +1297,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
|
||||
// plugin node and print that instead.
|
||||
auto plugin = delegate_->GetPdfElement(frame);
|
||||
|
||||
@@ -751,7 +751,7 @@ index 51fd552071aa9f6933b8a234b3bc7b2ecac33eb5..747e0e155449c6a8994665bc93734d47
|
||||
|
||||
if (render_frame_gone_) {
|
||||
return;
|
||||
@@ -1359,7 +1360,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
|
||||
@@ -1385,7 +1386,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
|
||||
}
|
||||
|
||||
Print(frame, print_preview_context_.source_node(),
|
||||
@@ -761,7 +761,7 @@ index 51fd552071aa9f6933b8a234b3bc7b2ecac33eb5..747e0e155449c6a8994665bc93734d47
|
||||
if (render_frame_gone_) {
|
||||
return;
|
||||
}
|
||||
@@ -1422,6 +1424,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
|
||||
@@ -1448,6 +1450,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
|
||||
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
|
||||
return;
|
||||
|
||||
@@ -770,7 +770,7 @@ index 51fd552071aa9f6933b8a234b3bc7b2ecac33eb5..747e0e155449c6a8994665bc93734d47
|
||||
print_preview_context_.OnPrintPreview();
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
@@ -2046,7 +2050,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -2095,7 +2099,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
}
|
||||
|
||||
Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
|
||||
@@ -780,7 +780,7 @@ index 51fd552071aa9f6933b8a234b3bc7b2ecac33eb5..747e0e155449c6a8994665bc93734d47
|
||||
// Check if `this` is still valid.
|
||||
if (!weak_this) {
|
||||
return;
|
||||
@@ -2062,17 +2067,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -2111,17 +2116,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
|
||||
void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
const blink::WebNode& node,
|
||||
@@ -803,7 +803,7 @@ index 51fd552071aa9f6933b8a234b3bc7b2ecac33eb5..747e0e155449c6a8994665bc93734d47
|
||||
DidFinishPrinting(PrintingResult::kFailPrintInit);
|
||||
return;
|
||||
}
|
||||
@@ -2093,8 +2100,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
@@ -2142,8 +2149,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
print_pages_params_->params->print_scaling_option;
|
||||
|
||||
auto self = weak_ptr_factory_.GetWeakPtr();
|
||||
@@ -820,7 +820,7 @@ index 51fd552071aa9f6933b8a234b3bc7b2ecac33eb5..747e0e155449c6a8994665bc93734d47
|
||||
// Check if `this` is still valid.
|
||||
if (!self)
|
||||
return;
|
||||
@@ -2337,25 +2351,33 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
@@ -2396,25 +2410,33 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
}
|
||||
|
||||
bool PrintRenderFrameHelper::InitPrintSettings(blink::WebLocalFrame* frame,
|
||||
@@ -860,7 +860,7 @@ index 51fd552071aa9f6933b8a234b3bc7b2ecac33eb5..747e0e155449c6a8994665bc93734d47
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2462,7 +2484,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser(
|
||||
@@ -2521,7 +2543,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser(
|
||||
std::move(params),
|
||||
base::BindOnce(
|
||||
[](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output,
|
||||
@@ -870,7 +870,7 @@ index 51fd552071aa9f6933b8a234b3bc7b2ecac33eb5..747e0e155449c6a8994665bc93734d47
|
||||
std::move(quit_closure).Run();
|
||||
},
|
||||
diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h
|
||||
index c68b68767ac52602981278ec655d9ccfad0c30ab..df2ea4524584417d859e1a22ec8a49c88e534ae3 100644
|
||||
index 95e8ae2d809e8bd270d113b2a2707533aa3e92ba..3e02b8791b6f676a4bd185569fadf541aa472406 100644
|
||||
--- a/components/printing/renderer/print_render_frame_helper.h
|
||||
+++ b/components/printing/renderer/print_render_frame_helper.h
|
||||
@@ -248,7 +248,7 @@ class PrintRenderFrameHelper
|
||||
@@ -882,7 +882,7 @@ index c68b68767ac52602981278ec655d9ccfad0c30ab..df2ea4524584417d859e1a22ec8a49c8
|
||||
void PrintWithParams(mojom::PrintPagesParamsPtr params,
|
||||
PrintWithParamsCallback callback) override;
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
@@ -318,7 +318,9 @@ class PrintRenderFrameHelper
|
||||
@@ -319,7 +319,9 @@ class PrintRenderFrameHelper
|
||||
// WARNING: |this| may be gone after this method returns.
|
||||
void Print(blink::WebLocalFrame* frame,
|
||||
const blink::WebNode& node,
|
||||
@@ -893,7 +893,7 @@ index c68b68767ac52602981278ec655d9ccfad0c30ab..df2ea4524584417d859e1a22ec8a49c8
|
||||
|
||||
// Notification when printing is done - signal tear-down/free resources.
|
||||
void DidFinishPrinting(PrintingResult result);
|
||||
@@ -328,7 +330,8 @@ class PrintRenderFrameHelper
|
||||
@@ -329,7 +331,8 @@ class PrintRenderFrameHelper
|
||||
// Initialize print page settings with default settings.
|
||||
// Used only for native printing workflow.
|
||||
bool InitPrintSettings(blink::WebLocalFrame* frame,
|
||||
@@ -904,10 +904,10 @@ index c68b68767ac52602981278ec655d9ccfad0c30ab..df2ea4524584417d859e1a22ec8a49c8
|
||||
// Calculate number of pages in source document.
|
||||
uint32_t CalculateNumberOfPages(blink::WebLocalFrame* frame,
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
index eac8896de7ed9a40036942405d4a53981e2a4947..c4fe5254ea2f73f1181745dff7d5ba40f9fc618a 100644
|
||||
index 136c2b10b72e6d0db48bc4a1b36bf78bc1f75a69..f756ec11bcdb2afce6e4bcae372a921693441bad 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -2992,8 +2992,9 @@ source_set("browser") {
|
||||
@@ -2967,8 +2967,9 @@ source_set("browser") {
|
||||
"//ppapi/shared_impl",
|
||||
]
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ index c4255d8dfc2e3c4f1f32506e4e9edbb90a74340a..142398a8adafc94e6724ee750b612a66
|
||||
// RenderWidgetHost on the primary main frame, and false otherwise.
|
||||
virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*);
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index b7a3f5643ced5013c38197f654bd616ffe0f73de..749ee4641462aec1142f75de9f0459d7e7cf322f 100644
|
||||
index 1c01559b53d07fbdf6a6e1e74d161bc08e9ab4fa..b5b82b5cbc02bd28615f6f545f9538671d7bc7df 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -2131,6 +2131,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
|
||||
@@ -2132,6 +2132,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
|
||||
if (view_) {
|
||||
view_->UpdateCursor(cursor);
|
||||
}
|
||||
@@ -44,10 +44,10 @@ index b7a3f5643ced5013c38197f654bd616ffe0f73de..749ee4641462aec1142f75de9f0459d7
|
||||
|
||||
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 6f19be9694e46213636f6555e12b8679a48cb867..7ec03754ef46ed72886994c0eab7ce2596ee5fb4 100644
|
||||
index b082f7d73d7a9bb103abeb60d7f6b359d253b435..5226dd89cd46a7f6f4d79b8b8f47dda44b3a67f4 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -5091,6 +5091,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
@@ -5086,6 +5086,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
return text_input_manager_.get();
|
||||
}
|
||||
|
||||
@@ -60,10 +60,10 @@ index 6f19be9694e46213636f6555e12b8679a48cb867..7ec03754ef46ed72886994c0eab7ce25
|
||||
RenderWidgetHostImpl* render_widget_host) {
|
||||
return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost();
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
|
||||
index b77cb08104cd538c4ac27556b339cd786d5c9f93..4e71c0ec5d0fc050fa909e0ddd04c724e63bc3fd 100644
|
||||
index 98d2ce9bc917dbec283e6d1a9a95267541ef949b..2b28ed7bf27b8642abc0bd72f3c10568b0ee0ff4 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -1010,6 +1010,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
@@ -1007,6 +1007,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
void SendScreenRects() override;
|
||||
void SendActiveState(bool active) override;
|
||||
TextInputManager* GetTextInputManager() override;
|
||||
|
||||
@@ -52,10 +52,10 @@ Some alternatives to this patch:
|
||||
None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
|
||||
|
||||
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
|
||||
index bd9f47f640e00e3cd688e026b6e8f4ebc84832aa..cc22e9c43562086396509548a4fe7e2f0ae22f80 100644
|
||||
index b8e0c7ceb4fb372190887e7e8e941a4c58f81791..035a3b539c900e7d480488b0b650d565dad974e4 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -1605,7 +1605,7 @@ if (is_chrome_branded && !is_android) {
|
||||
@@ -1601,7 +1601,7 @@ if (is_chrome_branded && !is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ index bd9f47f640e00e3cd688e026b6e8f4ebc84832aa..cc22e9c43562086396509548a4fe7e2f
|
||||
chrome_paks("packed_resources") {
|
||||
if (is_mac) {
|
||||
output_dir = "$root_gen_dir/repack"
|
||||
@@ -1634,6 +1634,12 @@ if (!is_android) {
|
||||
@@ -1630,6 +1630,12 @@ if (!is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@ is needed for OSR.
|
||||
Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 2f6f997eede33373a3b7ef43885cde5cc5c1d8a0..c7f6211a680244a9f3c617b9a87125e305f37319 100644
|
||||
index 66034609ac9fcd339abf4d8ad5e39cb02a413fdc..7928f8f1f4e90ef53279bc7d387ff7baa312c889 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3443,6 +3443,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
@@ -3438,6 +3438,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
params.main_frame_name, GetOpener(), primary_main_frame_policy,
|
||||
base::UnguessableToken::Create());
|
||||
|
||||
@@ -26,7 +26,7 @@ index 2f6f997eede33373a3b7ef43885cde5cc5c1d8a0..c7f6211a680244a9f3c617b9a87125e3
|
||||
std::unique_ptr<WebContentsViewDelegate> delegate =
|
||||
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
|
||||
@@ -3453,6 +3460,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
@@ -3448,6 +3455,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
view_ = CreateWebContentsView(this, std::move(delegate),
|
||||
&render_view_host_delegate_view_);
|
||||
}
|
||||
@@ -35,10 +35,10 @@ index 2f6f997eede33373a3b7ef43885cde5cc5c1d8a0..c7f6211a680244a9f3c617b9a87125e3
|
||||
CHECK(view_.get());
|
||||
|
||||
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
||||
index 13135b61fb0893e376ca4c55d8ed97eabd222698..c59d9b2f57b96038b2bd34ae1fa6ff2e21807897 100644
|
||||
index 80b895685a05a189dfd2bd7f6797cc788a66805c..8221538b964c9e1f85df389a32d4a448e9ab5634 100644
|
||||
--- a/content/public/browser/web_contents.h
|
||||
+++ b/content/public/browser/web_contents.h
|
||||
@@ -98,10 +98,13 @@ class BrowserContext;
|
||||
@@ -99,10 +99,13 @@ class BrowserContext;
|
||||
class BrowserPluginGuestDelegate;
|
||||
class RenderFrameHost;
|
||||
class RenderViewHost;
|
||||
@@ -52,7 +52,7 @@ index 13135b61fb0893e376ca4c55d8ed97eabd222698..c59d9b2f57b96038b2bd34ae1fa6ff2e
|
||||
class WebUI;
|
||||
struct DropData;
|
||||
struct MHTMLGenerationParams;
|
||||
@@ -244,6 +247,10 @@ class WebContents : public PageNavigator,
|
||||
@@ -249,6 +252,10 @@ class WebContents : public PageNavigator,
|
||||
network::mojom::WebSandboxFlags starting_sandbox_flags =
|
||||
network::mojom::WebSandboxFlags::kNone;
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@ Note that we also need to manually update embedder's
|
||||
`api::WebContents::IsFullscreenForTabOrPending` value.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
index 6b2c1207d3e226c095b84edf10e468d554b6ae1a..3181ca160963caf1ac9a3d9e8783ec8c66069b97 100644
|
||||
index ca96b4de6d8fc6cf0f7bfb70ba36d3dd2ea839b0..39de7a61577686d2c0d5fe8c93f8a67c066b4335 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -7384,6 +7384,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
@@ -7386,6 +7386,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,10 +37,10 @@ index 6b2c1207d3e226c095b84edf10e468d554b6ae1a..3181ca160963caf1ac9a3d9e8783ec8c
|
||||
if (had_fullscreen_token && !GetView()->HasFocus())
|
||||
GetView()->Focus();
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index c7f6211a680244a9f3c617b9a87125e305f37319..46e399e99018aa900a78fe35278bbd28bb2b188d 100644
|
||||
index 7928f8f1f4e90ef53279bc7d387ff7baa312c889..07bca1e7dd54b579e4f1f494b00dacdb36ece4a2 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3697,21 +3697,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
|
||||
@@ -3692,21 +3692,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
|
||||
const NativeWebKeyboardEvent& event) {
|
||||
OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"),
|
||||
"WebContentsImpl::PreHandleKeyboardEvent");
|
||||
@@ -78,7 +78,7 @@ index c7f6211a680244a9f3c617b9a87125e305f37319..46e399e99018aa900a78fe35278bbd28
|
||||
}
|
||||
|
||||
bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
|
||||
@@ -3847,7 +3851,7 @@ void WebContentsImpl::EnterFullscreenMode(
|
||||
@@ -3842,7 +3846,7 @@ void WebContentsImpl::EnterFullscreenMode(
|
||||
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
|
||||
DCHECK(CanEnterFullscreenMode(requesting_frame, options));
|
||||
DCHECK(requesting_frame->IsActive());
|
||||
|
||||
@@ -26,10 +26,10 @@ index 72f72e2c6627d1f7159796f9151e697b04af66b1..4dfabec61229f50faba64d5c14255e5a
|
||||
// An empty URL is returned if the URL is not overriden.
|
||||
virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
|
||||
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
|
||||
index 7c277c6de6d58fb8547bc3ca46d40a1d054d36ec..aa0894e74cc46c45f0f3a378958454cca4ad5820 100644
|
||||
index 5790d6ed3e4d96e91ec729d4172c85eef5ed7063..71b7bfef27bf24ed2121ae897dfcc5e2eb80a3df 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -793,6 +793,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
|
||||
@@ -828,6 +828,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
|
||||
WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
|
||||
}
|
||||
|
||||
@@ -43,10 +43,10 @@ index 7c277c6de6d58fb8547bc3ca46d40a1d054d36ec..aa0894e74cc46c45f0f3a378958454cc
|
||||
const v8::Local<v8::Context>& worker) {
|
||||
GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
|
||||
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
|
||||
index 617f10ab8f2a33fc88b6f5051246b9996390950c..9642781599a93cd24299096d62d44a79c712167c 100644
|
||||
index 328a108d2bd1c545164bf62c9462c70f0ea490ff..9d6e4999004a366a61733d061d90ec69c7dd7e08 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.h
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.h
|
||||
@@ -174,6 +174,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
@@ -184,6 +184,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
void DidStartWorkerThread() override;
|
||||
void WillStopWorkerThread() override;
|
||||
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
|
||||
@@ -55,10 +55,10 @@ index 617f10ab8f2a33fc88b6f5051246b9996390950c..9642781599a93cd24299096d62d44a79
|
||||
const blink::WebSecurityOrigin& script_origin) override;
|
||||
blink::ProtocolHandlerSecurityLevel GetProtocolHandlerSecurityLevel(
|
||||
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
|
||||
index b6f60be5b437b8b6761a94acb74117eb90d64b0d..a72dca432d3732aabf7a0d783c77537e5954a660 100644
|
||||
index df350be109056afa28cc7c24e851f4619772dbb2..5c7fd813ce32e0c89526f709d4b69aebc0d68ec7 100644
|
||||
--- a/third_party/blink/public/platform/platform.h
|
||||
+++ b/third_party/blink/public/platform/platform.h
|
||||
@@ -625,6 +625,7 @@ class BLINK_PLATFORM_EXPORT Platform {
|
||||
@@ -630,6 +630,7 @@ class BLINK_PLATFORM_EXPORT Platform {
|
||||
virtual void DidStartWorkerThread() {}
|
||||
virtual void WillStopWorkerThread() {}
|
||||
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}
|
||||
|
||||
@@ -35,10 +35,10 @@ index 4dfabec61229f50faba64d5c14255e5a726bf8f2..b91c37ed1dfccf2189cd17d61d2623c1
|
||||
// from the worker thread.
|
||||
virtual void WillDestroyWorkerContextOnWorkerThread(
|
||||
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
|
||||
index aa0894e74cc46c45f0f3a378958454cca4ad5820..a1cb9020998c204c401d80af59268ea5e7b8d00e 100644
|
||||
index 71b7bfef27bf24ed2121ae897dfcc5e2eb80a3df..de67db26e5da2cc9417f8bf437ad485d0a697b1d 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -805,6 +805,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
|
||||
@@ -840,6 +840,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
|
||||
worker);
|
||||
}
|
||||
|
||||
@@ -52,10 +52,10 @@ index aa0894e74cc46c45f0f3a378958454cca4ad5820..a1cb9020998c204c401d80af59268ea5
|
||||
const blink::WebSecurityOrigin& script_origin) {
|
||||
return GetContentClient()->renderer()->AllowScriptExtensionForServiceWorker(
|
||||
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
|
||||
index 9642781599a93cd24299096d62d44a79c712167c..0fcee3b49a4830ac5cd640065849804c2fbd4525 100644
|
||||
index 9d6e4999004a366a61733d061d90ec69c7dd7e08..9190eefd9812af12a7ad93a83c55fec05cac3cae 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.h
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.h
|
||||
@@ -174,6 +174,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
@@ -184,6 +184,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
void DidStartWorkerThread() override;
|
||||
void WillStopWorkerThread() override;
|
||||
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
|
||||
@@ -65,10 +65,10 @@ index 9642781599a93cd24299096d62d44a79c712167c..0fcee3b49a4830ac5cd640065849804c
|
||||
bool AllowScriptExtensionForServiceWorker(
|
||||
const blink::WebSecurityOrigin& script_origin) override;
|
||||
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
|
||||
index a72dca432d3732aabf7a0d783c77537e5954a660..78c890f8366a5253cd9fe2c1f270aa5793b9b15e 100644
|
||||
index 5c7fd813ce32e0c89526f709d4b69aebc0d68ec7..5e0f76923b23ff19880e0d5d92e650d0bf22b71c 100644
|
||||
--- a/third_party/blink/public/platform/platform.h
|
||||
+++ b/third_party/blink/public/platform/platform.h
|
||||
@@ -625,6 +625,8 @@ class BLINK_PLATFORM_EXPORT Platform {
|
||||
@@ -630,6 +630,8 @@ class BLINK_PLATFORM_EXPORT Platform {
|
||||
virtual void DidStartWorkerThread() {}
|
||||
virtual void WillStopWorkerThread() {}
|
||||
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}
|
||||
|
||||
@@ -29,18 +29,13 @@ test_formally_mark_some_tests_as_flaky.patch
|
||||
fix_adapt_debugger_tests_for_upstream_v8_changes.patch
|
||||
chore_remove_--no-harmony-atomics_related_code.patch
|
||||
fix_account_for_createexternalizablestring_v8_global.patch
|
||||
fix_wunreachable-code_warning_in_ares_init_rand_engine.patch
|
||||
fix_-wshadow_warning.patch
|
||||
fix_do_not_resolve_electron_entrypoints.patch
|
||||
fix_ftbfs_werror_wextra-semi.patch
|
||||
ci_ensure_node_tests_set_electron_run_as_node.patch
|
||||
fix_assert_module_in_the_renderer_process.patch
|
||||
fix_add_trusted_space_and_trusted_lo_space_to_the_v8_heap.patch
|
||||
src_adapt_to_v8_exception_api_change.patch
|
||||
lib_test_do_not_hardcode_buffer_kmaxlength.patch
|
||||
fix_handle_possible_disabled_sharedarraybuffer.patch
|
||||
win_process_avoid_assert_after_spawning_store_app_4152.patch
|
||||
test_fix_edge_snapshot_stack_traces.patch
|
||||
chore_remove_use_of_deprecated_kmaxlength.patch
|
||||
fix_avx_detection.patch
|
||||
src_avoid_copying_string_in_fs_permission.patch
|
||||
@@ -48,3 +43,4 @@ fix_missing_include_for_node_extern.patch
|
||||
feat_optionally_prevent_calling_v8_enablewebassemblytraphandler.patch
|
||||
build_only_create_cppgc_heap_on_non-32_bit_platforms.patch
|
||||
src_fix_compatility_with_upcoming_v8_12_1_apis.patch
|
||||
fix_-wshadow_error_in_uvwasi_c.patch
|
||||
|
||||
@@ -590,10 +590,10 @@ index 0000000000000000000000000000000000000000..9b97aabe865e4cf12f6c3ccda196b372
|
||||
+}
|
||||
diff --git a/deps/cares/BUILD.gn b/deps/cares/BUILD.gn
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..2a902c68ca445b8451e442c314c60ee5a30719e4
|
||||
index 0000000000000000000000000000000000000000..fb1b3138cdb674205afa0ffe078270585843eca3
|
||||
--- /dev/null
|
||||
+++ b/deps/cares/BUILD.gn
|
||||
@@ -0,0 +1,135 @@
|
||||
@@ -0,0 +1,143 @@
|
||||
+config("cares_config") {
|
||||
+ include_dirs = [ "include", "src/lib" ]
|
||||
+}
|
||||
@@ -618,8 +618,26 @@ index 0000000000000000000000000000000000000000..2a902c68ca445b8451e442c314c60ee5
|
||||
+ "src/lib/ares__addrinfo2hostent.c",
|
||||
+ "src/lib/ares__addrinfo_localhost.c",
|
||||
+ "src/lib/ares_android.c",
|
||||
+ "src/lib/ares_cancel.c",
|
||||
+ "src/lib/ares__buf.c",
|
||||
+ "src/lib/ares__buf.h",
|
||||
+ "src/lib/ares__close_sockets.c",
|
||||
+ "src/lib/ares__htable.c",
|
||||
+ "src/lib/ares__htable.h",
|
||||
+ "src/lib/ares__htable_asvp.c",
|
||||
+ "src/lib/ares__htable_asvp.h",
|
||||
+ "src/lib/ares__htable_stvp.c",
|
||||
+ "src/lib/ares__htable_stvp.h",
|
||||
+ "src/lib/ares__llist.c",
|
||||
+ "src/lib/ares__llist.h",
|
||||
+ "src/lib/ares__get_hostent.c",
|
||||
+ "src/lib/ares__parse_into_addrinfo.c",
|
||||
+ "src/lib/ares__read_line.c",
|
||||
+ "src/lib/ares__readaddrinfo.c",
|
||||
+ "src/lib/ares__slist.c",
|
||||
+ "src/lib/ares__slist.h",
|
||||
+ "src/lib/ares__sortaddrinfo.c",
|
||||
+ "src/lib/ares__timeval.c",
|
||||
+ "src/lib/ares_cancel.c",
|
||||
+ "src/lib/ares_create_query.c",
|
||||
+ "src/lib/ares_data.c",
|
||||
+ "src/lib/ares_data.h",
|
||||
@@ -630,25 +648,22 @@ index 0000000000000000000000000000000000000000..2a902c68ca445b8451e442c314c60ee5
|
||||
+ "src/lib/ares_free_hostent.c",
|
||||
+ "src/lib/ares_free_string.c",
|
||||
+ "src/lib/ares_freeaddrinfo.c",
|
||||
+ "src/lib/ares_getenv.h",
|
||||
+ "src/lib/ares_getaddrinfo.c",
|
||||
+ "src/lib/ares_getenv.h",
|
||||
+ "src/lib/ares_gethostbyaddr.c",
|
||||
+ "src/lib/ares_gethostbyname.c",
|
||||
+ "src/lib/ares__get_hostent.c",
|
||||
+ "src/lib/ares_getnameinfo.c",
|
||||
+ "src/lib/ares_getsock.c",
|
||||
+ "src/lib/ares_inet_net_pton.h",
|
||||
+ "src/lib/ares_init.c",
|
||||
+ "src/lib/ares_ipv6.h",
|
||||
+ "src/lib/ares_library_init.c",
|
||||
+ "src/lib/ares_library_init.h",
|
||||
+ "src/lib/ares_llist.c",
|
||||
+ "src/lib/ares_llist.h",
|
||||
+ "src/lib/ares_mkquery.c",
|
||||
+ "src/lib/ares_nameser.h",
|
||||
+ "src/lib/ares_nowarn.c",
|
||||
+ "src/lib/ares_nowarn.h",
|
||||
+ "src/lib/ares_options.c",
|
||||
+ "src/lib/ares__parse_into_addrinfo.c",
|
||||
+ "src/lib/ares_parse_aaaa_reply.c",
|
||||
+ "src/lib/ares_parse_a_reply.c",
|
||||
+ "src/lib/ares_parse_caa_reply.c",
|
||||
@@ -665,12 +680,9 @@ index 0000000000000000000000000000000000000000..2a902c68ca445b8451e442c314c60ee5
|
||||
+ "src/lib/ares_process.c",
|
||||
+ "src/lib/ares_query.c",
|
||||
+ "src/lib/ares_rand.c",
|
||||
+ "src/lib/ares__read_line.c",
|
||||
+ "src/lib/ares__readaddrinfo.c",
|
||||
+ "src/lib/ares_search.c",
|
||||
+ "src/lib/ares_send.c",
|
||||
+ "src/lib/ares_setup.h",
|
||||
+ "src/lib/ares__sortaddrinfo.c",
|
||||
+ "src/lib/ares_strcasecmp.c",
|
||||
+ "src/lib/ares_strcasecmp.h",
|
||||
+ "src/lib/ares_strdup.c",
|
||||
@@ -678,15 +690,11 @@ index 0000000000000000000000000000000000000000..2a902c68ca445b8451e442c314c60ee5
|
||||
+ "src/lib/ares_strerror.c",
|
||||
+ "src/lib/ares_strsplit.c",
|
||||
+ "src/lib/ares_timeout.c",
|
||||
+ "src/lib/ares__timeval.c",
|
||||
+ "src/lib/ares_version.c",
|
||||
+ "src/lib/ares_writev.c",
|
||||
+ "src/lib/ares_writev.h",
|
||||
+ "src/lib/bitncmp.c",
|
||||
+ "src/lib/bitncmp.h",
|
||||
+ "src/lib/inet_net_pton.c",
|
||||
+ "src/lib/inet_ntop.c",
|
||||
+ "src/lib/ares_inet_net_pton.h",
|
||||
+ "src/lib/setup_once.h",
|
||||
+ "src/tools/ares_getopt.c",
|
||||
+ "src/tools/ares_getopt.h",
|
||||
@@ -1131,10 +1139,10 @@ index 0000000000000000000000000000000000000000..7518168141db7958550c7f5dc1ed17cc
|
||||
+}
|
||||
diff --git a/deps/uvwasi/BUILD.gn b/deps/uvwasi/BUILD.gn
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..2c9d2826c85bdd033f1df1d6188df6369a765c07
|
||||
index 0000000000000000000000000000000000000000..d9fcf8dc972b1caa2b7a130b1144c685316035cd
|
||||
--- /dev/null
|
||||
+++ b/deps/uvwasi/BUILD.gn
|
||||
@@ -0,0 +1,38 @@
|
||||
@@ -0,0 +1,39 @@
|
||||
+config("uvwasi_config") {
|
||||
+ include_dirs = [ "include" ]
|
||||
+}
|
||||
@@ -1167,6 +1175,7 @@ index 0000000000000000000000000000000000000000..2c9d2826c85bdd033f1df1d6188df636
|
||||
+ "src/fd_table.c",
|
||||
+ "src/path_resolver.c",
|
||||
+ "src/poll_oneoff.c",
|
||||
+ "src/sync_helpers.c",
|
||||
+ "src/uv_mapping.c",
|
||||
+ "src/uvwasi.c",
|
||||
+ "src/wasi_rights.c",
|
||||
@@ -1175,10 +1184,10 @@ index 0000000000000000000000000000000000000000..2c9d2826c85bdd033f1df1d6188df636
|
||||
+}
|
||||
diff --git a/filenames.json b/filenames.json
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..aa118ab320d83745723a2275efc556555c1e7768
|
||||
index 0000000000000000000000000000000000000000..cf88cae11d5fe0f4436688d41f4bf90892392d36
|
||||
--- /dev/null
|
||||
+++ b/filenames.json
|
||||
@@ -0,0 +1,733 @@
|
||||
@@ -0,0 +1,732 @@
|
||||
+// This file is automatically generated by generate_gn_filenames_json.py
|
||||
+// DO NOT EDIT
|
||||
+{
|
||||
@@ -1191,7 +1200,6 @@ index 0000000000000000000000000000000000000000..aa118ab320d83745723a2275efc55655
|
||||
+ "lib/internal/fs/recursive_watch.js",
|
||||
+ "lib/internal/fs/rimraf.js",
|
||||
+ "lib/internal/fs/streams.js",
|
||||
+ "lib/internal/fs/sync.js",
|
||||
+ "lib/internal/fs/sync_write_stream.js",
|
||||
+ "lib/internal/fs/utils.js",
|
||||
+ "lib/internal/fs/watchers.js",
|
||||
|
||||
@@ -7,7 +7,7 @@ Subject: build: ensure native module compilation fails if not using a new
|
||||
This should not be upstreamed, it is a quality-of-life patch for downstream module builders.
|
||||
|
||||
diff --git a/common.gypi b/common.gypi
|
||||
index a04a4a4e108862b64725345beaba73ad6f69eb51..f1c36cfd697485564f0fe7998eaf924aa30f140b 100644
|
||||
index b7f9e44f827e58ac3b9376ec291f42cceb2b28bb..24cc9efe32c083d0cecd1ae94514b5a2d24ca2d6 100644
|
||||
--- a/common.gypi
|
||||
+++ b/common.gypi
|
||||
@@ -79,6 +79,8 @@
|
||||
@@ -52,7 +52,7 @@ index 7b80ec63a082ce93ba81ca6dd41ec03041534ff7..926659883d3bd6d447c89a50d6770988
|
||||
o['variables']['v8_enable_javascript_promise_hooks'] = 1
|
||||
o['variables']['v8_enable_lite_mode'] = 1 if options.v8_lite_mode else 0
|
||||
diff --git a/src/node.h b/src/node.h
|
||||
index 99d2e1384df4000d4e1f1ffeafa83d29a152054b..9ac0d5addcdd40d5c91d375b626099b95729548a 100644
|
||||
index 868366f6d3e35d0fe543c89efd7d5e313a831a96..a512d2228e0afcfff765c3fe845e1f22073047d0 100644
|
||||
--- a/src/node.h
|
||||
+++ b/src/node.h
|
||||
@@ -22,6 +22,12 @@
|
||||
|
||||
@@ -8,7 +8,7 @@ Aligns common.gypi with the current build flag state of //v8.
|
||||
Specifically enables `V8_ENABLE_SANDBOX`, `V8_SANDBOXED_POINTERS`, `V8_COMPRESS_POINTERS` and `V8_COMPRESS_POINTERS_IN_SHARED_CAGE`.
|
||||
|
||||
diff --git a/common.gypi b/common.gypi
|
||||
index 0b073571cd482d5124123c4490c564f839429b28..a04a4a4e108862b64725345beaba73ad6f69eb51 100644
|
||||
index 225b3df380caca809926d6af9fc1001057237752..b7f9e44f827e58ac3b9376ec291f42cceb2b28bb 100644
|
||||
--- a/common.gypi
|
||||
+++ b/common.gypi
|
||||
@@ -65,6 +65,7 @@
|
||||
|
||||
@@ -8,10 +8,10 @@ they use themselves as the entry point. We should try to upstream some form
|
||||
of this.
|
||||
|
||||
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
|
||||
index 84fea979d482d3d5cacfad4b09237e6345675cad..678ed0a7b43c30c5dd6102d83f490e23c95090ce 100644
|
||||
index ea3b411a78495d0414b1956503b86cbd5f0ed765..ad4946a6d121d38f413878a3dcc360012d568ef6 100644
|
||||
--- a/lib/internal/modules/cjs/loader.js
|
||||
+++ b/lib/internal/modules/cjs/loader.js
|
||||
@@ -1215,6 +1215,13 @@ Module.prototype._compile = function(content, filename) {
|
||||
@@ -1351,6 +1351,13 @@ Module.prototype._compile = function(content, filename) {
|
||||
if (getOptionValue('--inspect-brk') && process._eval == null) {
|
||||
if (!resolvedArgv) {
|
||||
// We enter the repl if we're not given a filename argument.
|
||||
@@ -26,22 +26,24 @@ index 84fea979d482d3d5cacfad4b09237e6345675cad..678ed0a7b43c30c5dd6102d83f490e23
|
||||
try {
|
||||
resolvedArgv = Module._resolveFilename(process.argv[1], null, false);
|
||||
diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js
|
||||
index 0dc769846b4e6fe84438cd6d8024c4a89eb90a9b..bff9bdc7ad58183e9eb04ee45b76592b4240952a 100644
|
||||
index 66dfd7c1e521f38691e4656ac7ab0572a2fe75da..5db54daaa9e7066561d1621f2f0a01032ca7ff22 100644
|
||||
--- a/lib/internal/process/pre_execution.js
|
||||
+++ b/lib/internal/process/pre_execution.js
|
||||
@@ -204,11 +204,13 @@ function patchProcessObject(expandArgv1) {
|
||||
@@ -218,12 +218,14 @@ function patchProcessObject(expandArgv1) {
|
||||
if (expandArgv1 && process.argv[1] &&
|
||||
!StringPrototypeStartsWith(process.argv[1], '-')) {
|
||||
// Expand process.argv[1] into a full path.
|
||||
- const path = require('path');
|
||||
- try {
|
||||
- process.argv[1] = path.resolve(process.argv[1]);
|
||||
- mainEntry = path.resolve(process.argv[1]);
|
||||
- process.argv[1] = mainEntry;
|
||||
- } catch {
|
||||
- // Continue regardless of error.
|
||||
+ if (!process.argv[1] || !process.argv[1].startsWith('electron/js2c')) {
|
||||
+ const path = require('path');
|
||||
+ try {
|
||||
+ process.argv[1] = path.resolve(process.argv[1]);
|
||||
+ mainEntry = path.resolve(process.argv[1]);
|
||||
+ process.argv[1] = mainEntry;
|
||||
+ } catch {
|
||||
+ // Continue regardless of error.
|
||||
+ }
|
||||
|
||||
@@ -11,10 +11,10 @@ its own blended handler between Node and Blink.
|
||||
Not upstreamable.
|
||||
|
||||
diff --git a/lib/internal/modules/esm/utils.js b/lib/internal/modules/esm/utils.js
|
||||
index 985784383024450833a8324d45a7af2fe214a09c..356c10aef57454be3b4607156606784f473042cf 100644
|
||||
index 41077285452eac05766a22c2e1d252868e7e548b..2246e57efcf0b95903644d643ad5572717ecdaf4 100644
|
||||
--- a/lib/internal/modules/esm/utils.js
|
||||
+++ b/lib/internal/modules/esm/utils.js
|
||||
@@ -16,7 +16,7 @@ const {
|
||||
@@ -22,7 +22,7 @@ const {
|
||||
ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING,
|
||||
ERR_INVALID_ARG_VALUE,
|
||||
} = require('internal/errors').codes;
|
||||
@@ -23,9 +23,9 @@ index 985784383024450833a8324d45a7af2fe214a09c..356c10aef57454be3b4607156606784f
|
||||
const {
|
||||
loadPreloadModules,
|
||||
initializeFrozenIntrinsics,
|
||||
@@ -148,12 +148,13 @@ async function importModuleDynamicallyCallback(symbol, specifier, assertions) {
|
||||
// the loader worker in internal/main/worker_thread.js.
|
||||
let _isLoaderWorker = false;
|
||||
@@ -190,12 +190,13 @@ let _isLoaderWorker = false;
|
||||
* @param {boolean} [isLoaderWorker=false] - A boolean indicating whether the loader is a worker or not.
|
||||
*/
|
||||
function initializeESM(isLoaderWorker = false) {
|
||||
+ const shouldSetOnIsolate = !getEmbedderOptions().shouldNotRegisterESMLoader;
|
||||
_isLoaderWorker = isLoaderWorker;
|
||||
@@ -38,9 +38,9 @@ index 985784383024450833a8324d45a7af2fe214a09c..356c10aef57454be3b4607156606784f
|
||||
+ setImportModuleDynamicallyCallback(importModuleDynamicallyCallback, shouldSetOnIsolate);
|
||||
}
|
||||
|
||||
function isLoaderWorker() {
|
||||
/**
|
||||
diff --git a/src/module_wrap.cc b/src/module_wrap.cc
|
||||
index a1b0f812391486c5a429398326091a30bbe81692..a316d077f2d2ff38564959345cf8ef29a3ac678f 100644
|
||||
index 52c30dcb47d1faba0c2267e4381a624e450baa02..ba4c1a0d5a987e4d410b49f5c47166943bd101a6 100644
|
||||
--- a/src/module_wrap.cc
|
||||
+++ b/src/module_wrap.cc
|
||||
@@ -547,7 +547,7 @@ MaybeLocal<Module> ModuleWrap::ResolveModuleCallback(
|
||||
@@ -52,7 +52,7 @@ index a1b0f812391486c5a429398326091a30bbe81692..a316d077f2d2ff38564959345cf8ef29
|
||||
Local<Context> context,
|
||||
Local<v8::Data> host_defined_options,
|
||||
Local<Value> resource_name,
|
||||
@@ -610,12 +610,13 @@ void ModuleWrap::SetImportModuleDynamicallyCallback(
|
||||
@@ -608,12 +608,13 @@ void ModuleWrap::SetImportModuleDynamicallyCallback(
|
||||
Environment* env = Environment::GetCurrent(args);
|
||||
HandleScope handle_scope(isolate);
|
||||
|
||||
@@ -68,7 +68,7 @@ index a1b0f812391486c5a429398326091a30bbe81692..a316d077f2d2ff38564959345cf8ef29
|
||||
}
|
||||
|
||||
void ModuleWrap::HostInitializeImportMetaObjectCallback(
|
||||
@@ -652,13 +653,14 @@ void ModuleWrap::SetInitializeImportMetaObjectCallback(
|
||||
@@ -650,13 +651,14 @@ void ModuleWrap::SetInitializeImportMetaObjectCallback(
|
||||
Environment* env = Environment::GetCurrent(args);
|
||||
Isolate* isolate = env->isolate();
|
||||
|
||||
@@ -87,7 +87,7 @@ index a1b0f812391486c5a429398326091a30bbe81692..a316d077f2d2ff38564959345cf8ef29
|
||||
|
||||
MaybeLocal<Value> ModuleWrap::SyntheticModuleEvaluationStepsCallback(
|
||||
diff --git a/src/module_wrap.h b/src/module_wrap.h
|
||||
index 6435bad40936fe235822c0597310b94ab98082f3..c51eb99ce3eb54bc30ae922e0357b637b09d53c6 100644
|
||||
index 1fc801edced9c5e44613846b4dc555804c5bae97..23a0d7aee1dfa0ebe26e0507e31eacb0b4d137ed 100644
|
||||
--- a/src/module_wrap.h
|
||||
+++ b/src/module_wrap.h
|
||||
@@ -30,7 +30,14 @@ enum HostDefinedOptions : int {
|
||||
|
||||
@@ -8,10 +8,10 @@ which causes the `ELECTRON_RUN_AS_NODE` variable to be lost. This patch
|
||||
re-injects it.
|
||||
|
||||
diff --git a/test/common/assertSnapshot.js b/test/common/assertSnapshot.js
|
||||
index 0bd0fc18534f8b3106b79a010dfc4ffe0ab17ec3..838ee86f74ea89e052676a5c25e23481369857fa 100644
|
||||
index 88f40281e069b77ac071ac872c4491f749b64e21..0fa102da111fa370406ca74069316fa7a7a3a050 100644
|
||||
--- a/test/common/assertSnapshot.js
|
||||
+++ b/test/common/assertSnapshot.js
|
||||
@@ -76,6 +76,7 @@ async function spawnAndAssert(filename, transform = (x) => x, { tty = false, ...
|
||||
@@ -80,6 +80,7 @@ async function spawnAndAssert(filename, transform = (x) => x, { tty = false, ...
|
||||
const flags = common.parseTestFlags(filename);
|
||||
const executable = tty ? 'tools/pseudo-tty.py' : process.execPath;
|
||||
const args = tty ? [process.execPath, ...flags, filename] : [...flags, filename];
|
||||
@@ -47,10 +47,31 @@ index 5a1b9feb6c8bedb50b89f5c4f3c5983455bb042d..efca7811dc0b6a590c5ee023c7180170
|
||||
});
|
||||
}
|
||||
diff --git a/test/parallel/test-node-output-errors.mjs b/test/parallel/test-node-output-errors.mjs
|
||||
index 4c4fc08c0cf3828d11aefe9f12318001bf10c16d..b08bcd40cdf26093e158c0bb9ae566c76f2c731e 100644
|
||||
index c0acee2bfc8c124e9d9b254041589a49c8301b8f..0e266899ffc0918b2f94e8f636043a6ec5f0870f 100644
|
||||
--- a/test/parallel/test-node-output-errors.mjs
|
||||
+++ b/test/parallel/test-node-output-errors.mjs
|
||||
@@ -61,6 +61,7 @@ describe('errors output', { concurrency: true }, () => {
|
||||
@@ -61,21 +61,22 @@ describe('errors output', { concurrency: true }, () => {
|
||||
{ name: 'errors/events_unhandled_error_subclass.js', transform: errTransform },
|
||||
{ name: 'errors/if-error-has-good-stack.js', transform: errTransform },
|
||||
{ name: 'errors/throw_custom_error.js', transform: errTransform },
|
||||
- { name: 'errors/throw_error_with_getter_throw.js', transform: errTransform },
|
||||
+ // { name: 'errors/throw_error_with_getter_throw.js', transform: errTransform },
|
||||
{ name: 'errors/throw_in_line_with_tabs.js', transform: errTransform },
|
||||
{ name: 'errors/throw_non_error.js', transform: errTransform },
|
||||
- { name: 'errors/throw_null.js', transform: errTransform },
|
||||
- { name: 'errors/throw_undefined.js', transform: errTransform },
|
||||
+ // { name: 'errors/throw_null.js', transform: errTransform },
|
||||
+ // { name: 'errors/throw_undefined.js', transform: errTransform },
|
||||
{ name: 'errors/timeout_throw.js', transform: errTransform },
|
||||
{ name: 'errors/undefined_reference_in_new_context.js', transform: errTransform },
|
||||
{ name: 'errors/promise_always_throw_unhandled.js', transform: promiseTransform },
|
||||
- { name: 'errors/promise_unhandled_warn_with_error.js', transform: promiseTransform },
|
||||
+ // { name: 'errors/promise_unhandled_warn_with_error.js', transform: promiseTransform },
|
||||
{ name: 'errors/unhandled_promise_trace_warnings.js', transform: promiseTransform },
|
||||
- { skip: skipForceColors, name: 'errors/force_colors.js',
|
||||
- transform: forceColorsTransform, env: { FORCE_COLOR: 1 } },
|
||||
+ // { skip: skipForceColors, name: 'errors/force_colors.js',
|
||||
+ // transform: forceColorsTransform, env: { FORCE_COLOR: 1 } },
|
||||
];
|
||||
for (const { name, transform = defaultTransform, env, skip = false } of tests) {
|
||||
it(name, { skip }, async () => {
|
||||
|
||||
@@ -34,7 +34,7 @@ index afe67d2237ae6933de44dd1141cf388e9a48cee3..87df6e1f32e584aa0c6ae21856299fff
|
||||
inline uint64_t thread_id() const;
|
||||
inline worker::Worker* worker_context() const;
|
||||
diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc
|
||||
index f0b4cc43c864aee1fab8e073ea110ea108c653ab..6d12e27b955fb9fddab24d846e563c969bb48ae7 100644
|
||||
index de372400fd9cedb0a724ce434c8944760dd2d078..58eb4befb94a68aa8f27c11665e9d7b32fe472be 100644
|
||||
--- a/src/inspector_agent.cc
|
||||
+++ b/src/inspector_agent.cc
|
||||
@@ -707,8 +707,10 @@ bool Agent::Start(const std::string& path,
|
||||
@@ -51,10 +51,10 @@ index f0b4cc43c864aee1fab8e073ea110ea108c653ab..6d12e27b955fb9fddab24d846e563c96
|
||||
parent_env_->AddCleanupHook([](void* data) {
|
||||
Environment* env = static_cast<Environment*>(data);
|
||||
diff --git a/src/node.h b/src/node.h
|
||||
index dcce529664e1d126115545d6ba7f5b8492b0e921..99d2e1384df4000d4e1f1ffeafa83d29a152054b 100644
|
||||
index 74a097279d3e5dc3ee6c5e609fd35cf44e5002f5..868366f6d3e35d0fe543c89efd7d5e313a831a96 100644
|
||||
--- a/src/node.h
|
||||
+++ b/src/node.h
|
||||
@@ -654,7 +654,11 @@ enum Flags : uint64_t {
|
||||
@@ -656,7 +656,11 @@ enum Flags : uint64_t {
|
||||
// This control is needed by embedders who may not want to initialize the V8
|
||||
// inspector in situations where one has already been created,
|
||||
// e.g. Blink's in Chromium.
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: feat: initialize asar support
|
||||
This patch initializes asar support in Node.js.
|
||||
|
||||
diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js
|
||||
index 1f4a08515b5ae9e15ee987d9287f71b0fed3cb30..0dc769846b4e6fe84438cd6d8024c4a89eb90a9b 100644
|
||||
index 917ba90a1c8bbbff5d86e5f2079d1ce67237280e..66dfd7c1e521f38691e4656ac7ab0572a2fe75da 100644
|
||||
--- a/lib/internal/process/pre_execution.js
|
||||
+++ b/lib/internal/process/pre_execution.js
|
||||
@@ -67,6 +67,8 @@ function prepareWorkerThreadExecution() {
|
||||
@@ -18,7 +18,7 @@ index 1f4a08515b5ae9e15ee987d9287f71b0fed3cb30..0dc769846b4e6fe84438cd6d8024c4a8
|
||||
function prepareExecution(options) {
|
||||
const { expandArgv1, initializeModules, isMainThread } = options;
|
||||
|
||||
@@ -170,12 +172,17 @@ function setupUserModules(isLoaderWorker = false) {
|
||||
@@ -172,12 +174,17 @@ function setupUserModules(isLoaderWorker = false) {
|
||||
loadPreloadModules();
|
||||
// Need to be done after --require setup.
|
||||
initializeFrozenIntrinsics();
|
||||
@@ -33,6 +33,6 @@ index 1f4a08515b5ae9e15ee987d9287f71b0fed3cb30..0dc769846b4e6fe84438cd6d8024c4a8
|
||||
+ processLinkedBinding('electron_common_asar').initAsarSupport(require);
|
||||
+}
|
||||
+
|
||||
function patchProcessObject(expandArgv1) {
|
||||
const binding = internalBinding('process_methods');
|
||||
binding.patchProcessObject(process);
|
||||
/**
|
||||
* Patch the process object with legacy properties and normalizations.
|
||||
* Replace `process.argv[0]` with `process.execPath`, preserving the original `argv[0]` value as `process.argv0`.
|
||||
|
||||
@@ -10,7 +10,7 @@ already been called.
|
||||
This should be upstreamed.
|
||||
|
||||
diff --git a/src/node.cc b/src/node.cc
|
||||
index 89e0e5524c2102b86bc5506fe49aa0c6fa0f30c1..e58f28e0f0ff8d61f35ec3c5a69aa37c66c25d78 100644
|
||||
index a9336a14304fc673c02ae5b7e5ca82aec9fa6697..7a6a9cdddf00c91612c2bcabf40a5c4af16424df 100644
|
||||
--- a/src/node.cc
|
||||
+++ b/src/node.cc
|
||||
@@ -605,6 +605,7 @@ static void PlatformInit(ProcessInitializationFlags::Flags flags) {
|
||||
@@ -22,17 +22,17 @@ index 89e0e5524c2102b86bc5506fe49aa0c6fa0f30c1..e58f28e0f0ff8d61f35ec3c5a69aa37c
|
||||
#endif // NODE_USE_V8_WASM_TRAP_HANDLER
|
||||
}
|
||||
diff --git a/src/node.h b/src/node.h
|
||||
index 9ac0d5addcdd40d5c91d375b626099b95729548a..3ffc51783b0b6dee1c0f0a37d2f52cb1aec2fa3f 100644
|
||||
index a512d2228e0afcfff765c3fe845e1f22073047d0..36da93a7b41ea450a5f288ec17b61adae46ae178 100644
|
||||
--- a/src/node.h
|
||||
+++ b/src/node.h
|
||||
@@ -272,6 +272,10 @@ enum Flags : uint32_t {
|
||||
// cppgc::InitializeProcess() before creating a Node.js environment
|
||||
// and call cppgc::ShutdownProcess() before process shutdown.
|
||||
@@ -274,6 +274,10 @@ enum Flags : uint32_t {
|
||||
kNoInitializeCppgc = 1 << 13,
|
||||
// Initialize the process for predictable snapshot generation.
|
||||
kGeneratePredictableSnapshot = 1 << 14,
|
||||
+ // Do not initialize the Web Assembly trap handler. This is used by
|
||||
+ // embedders to account for the case where it may already have been
|
||||
+ // initialized - calling it more than once will hard crash.
|
||||
+ kNoEnableWasmTrapHandler = 1 << 14,
|
||||
+ kNoEnableWasmTrapHandler = 1 << 15,
|
||||
|
||||
// Emulate the behavior of InitializeNodeWithArgs() when passing
|
||||
// a flags argument to the InitializeOncePerProcess() replacement
|
||||
|
||||
30
patches/node/fix_-wshadow_error_in_uvwasi_c.patch
Normal file
30
patches/node/fix_-wshadow_error_in_uvwasi_c.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Fri, 8 Dec 2023 18:05:28 +0100
|
||||
Subject: fix: -Wshadow error in uvwasi.c
|
||||
|
||||
Refs https://github.com/nodejs/node/pull/49908
|
||||
|
||||
Fixes a -Wshadow error in uvwasi.c. This should be upstreamed.
|
||||
|
||||
diff --git a/deps/uvwasi/src/uvwasi.c b/deps/uvwasi/src/uvwasi.c
|
||||
index e904b9f9293864db02f660dc3c9737f0e3684355..3e9cce85cae109ffc09f6b86ab5e896620b862d8 100644
|
||||
--- a/deps/uvwasi/src/uvwasi.c
|
||||
+++ b/deps/uvwasi/src/uvwasi.c
|
||||
@@ -2794,13 +2794,13 @@ uvwasi_errno_t uvwasi_sock_accept(uvwasi_t* uvwasi,
|
||||
goto close_sock_and_error_exit;
|
||||
}
|
||||
|
||||
- int r = uv_accept((uv_stream_t*) wrap->sock, (uv_stream_t*) uv_connect_sock);
|
||||
- if (r == UV_EAGAIN) {
|
||||
+ int rr = uv_accept((uv_stream_t*) wrap->sock, (uv_stream_t*) uv_connect_sock);
|
||||
+ if (rr == UV_EAGAIN) {
|
||||
// still no connection or error so run the loop again
|
||||
continue;
|
||||
}
|
||||
|
||||
- if (r != 0) {
|
||||
+ if (rr != 0) {
|
||||
// An error occurred accepting the connection. Break out of the loop and
|
||||
// report an error.
|
||||
err = uvwasi__translate_uv_error(r);
|
||||
@@ -7,7 +7,7 @@ common.gypi is a file that's included in the node header bundle, despite
|
||||
the fact that we do not build node with gyp.
|
||||
|
||||
diff --git a/common.gypi b/common.gypi
|
||||
index d783c7f970237a648f585b9a9e5725494b5d9e2f..0b073571cd482d5124123c4490c564f839429b28 100644
|
||||
index 4589f515178093402b4abc265af041037ee22f3b..225b3df380caca809926d6af9fc1001057237752 100644
|
||||
--- a/common.gypi
|
||||
+++ b/common.gypi
|
||||
@@ -80,6 +80,23 @@
|
||||
|
||||
@@ -58,10 +58,10 @@ index c02906eacd90ac27d618e7578d1f928f16a858f7..74b4e15b8230c6380d41e84aa504824b
|
||||
}
|
||||
|
||||
diff --git a/src/node_options.cc b/src/node_options.cc
|
||||
index f711ac936e76f9c16d15d7db759d0081a9eb018d..6eb2c137e1dd05b05e781820905cf6778107275d 100644
|
||||
index faca807e31daaadb0103556001a16629a3822c1f..9011eda7ce2435c2f859cacbac55cdc6182ebccc 100644
|
||||
--- a/src/node_options.cc
|
||||
+++ b/src/node_options.cc
|
||||
@@ -1239,6 +1239,11 @@ void GetEmbedderOptions(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -1262,6 +1262,11 @@ void GetEmbedderOptions(const FunctionCallbackInfo<Value>& args) {
|
||||
Local<Context> context = env->context();
|
||||
Local<Object> ret = Object::New(isolate);
|
||||
|
||||
|
||||
@@ -381,7 +381,7 @@ index fcf1922bcdba733af6c22f142db4f7b099947757..9f72ae4e41a113e752f40795103c2af5
|
||||
assert.throws(() => crypto.createDiffieHellman('abcdef', g), ex);
|
||||
assert.throws(() => crypto.createDiffieHellman('abcdef', 'hex', g), ex);
|
||||
diff --git a/test/parallel/test-crypto-dh.js b/test/parallel/test-crypto-dh.js
|
||||
index abbe1abe7e53d7bd113afb68b0e9af1e814c70bd..086a8e38021ed1a87be22246cdb4f5ceb56eee4c 100644
|
||||
index 3b738b7f47ec59ba718a92e3a0024fed45a9c87c..fabf5775a263804f5974b10cf73c6886d59bf1fa 100644
|
||||
--- a/test/parallel/test-crypto-dh.js
|
||||
+++ b/test/parallel/test-crypto-dh.js
|
||||
@@ -55,18 +55,17 @@ const crypto = require('crypto');
|
||||
@@ -411,7 +411,7 @@ index abbe1abe7e53d7bd113afb68b0e9af1e814c70bd..086a8e38021ed1a87be22246cdb4f5ce
|
||||
};
|
||||
}
|
||||
|
||||
@@ -95,10 +94,16 @@ const crypto = require('crypto');
|
||||
@@ -99,10 +98,16 @@ const crypto = require('crypto');
|
||||
// Through a fluke of history, g=0 defaults to DH_GENERATOR (2).
|
||||
{
|
||||
const g = 0;
|
||||
|
||||
@@ -5,33 +5,57 @@ Subject: fix: do not resolve electron entrypoints
|
||||
|
||||
This wastes fs cycles and can result in strange behavior if this path actually exists on disk
|
||||
|
||||
diff --git a/lib/internal/modules/esm/load.js b/lib/internal/modules/esm/load.js
|
||||
index 8406e8ca319533d6186c5d457e951b7a845b6b72..caa34187e17d9a0addcc8c94e46823ea4e05c590 100644
|
||||
--- a/lib/internal/modules/esm/load.js
|
||||
+++ b/lib/internal/modules/esm/load.js
|
||||
@@ -131,7 +131,7 @@ async function defaultLoad(url, context = kEmptyObject) {
|
||||
format ??= 'builtin';
|
||||
} else {
|
||||
let contextToPass = context;
|
||||
- if (source == null) {
|
||||
+ if (format !== 'electron' && source == null) {
|
||||
({ responseURL, source } = await getSource(urlInstance, context));
|
||||
contextToPass = { __proto__: context, source };
|
||||
}
|
||||
@@ -139,7 +139,7 @@ async function defaultLoad(url, context = kEmptyObject) {
|
||||
// Now that we have the source for the module, run `defaultGetFormat` again in case we detect ESM syntax.
|
||||
format ??= await defaultGetFormat(urlInstance, contextToPass);
|
||||
|
||||
- if ((format === 'commonjs' || format === 'electron') && contextToPass !== context) {
|
||||
+ if (format === 'electron' || format === 'commonjs' && contextToPass !== context) {
|
||||
// For backward compatibility reasons, we need to discard the source in
|
||||
// order for the CJS loader to re-fetch it.
|
||||
source = null;
|
||||
diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js
|
||||
index 4c3a0d8c484a402fe419a0bd45c7e2b1d717cb4a..b8be4cde3bbe4b14e607a2bef0a2405df3cae533 100644
|
||||
index dbbe37474c70addfbf8cf805c29732dcd38c74f6..96ffb2b0b051163d8a777ed3d1b5bc2c83fc37c5 100644
|
||||
--- a/lib/internal/modules/esm/translators.js
|
||||
+++ b/lib/internal/modules/esm/translators.js
|
||||
@@ -309,6 +309,8 @@ function cjsPreparseModuleExports(filename, source) {
|
||||
const cached = cjsParseCache.get(module);
|
||||
if (cached)
|
||||
@@ -376,6 +376,9 @@ function cjsPreparseModuleExports(filename, source) {
|
||||
if (cached) {
|
||||
return { module, exportNames: cached.exportNames };
|
||||
+ if (filename === 'electron')
|
||||
+ return { module };
|
||||
}
|
||||
+ if (filename === 'electron') {
|
||||
+ return { module, exportNames: new SafeSet(['default', ...Object.keys(module.exports)]) };
|
||||
+ }
|
||||
}
|
||||
const loaded = Boolean(module);
|
||||
if (!loaded) {
|
||||
diff --git a/lib/internal/modules/run_main.js b/lib/internal/modules/run_main.js
|
||||
index 0bfe7b11241416bfca0d470047b14777ad99307f..c86add4395ed59cee0d880961e7572b0cc3d6698 100644
|
||||
index 1f03c313121db054ff824d07e57c57c749005497..2c8aa6461497f39062ec350ef8a063b9b0ac1edf 100644
|
||||
--- a/lib/internal/modules/run_main.js
|
||||
+++ b/lib/internal/modules/run_main.js
|
||||
@@ -2,12 +2,19 @@
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
const {
|
||||
StringPrototypeEndsWith,
|
||||
+ StringPrototypeStartsWith,
|
||||
} = primordials;
|
||||
|
||||
const { getOptionValue } = require('internal/options');
|
||||
const path = require('path');
|
||||
|
||||
const { containsModuleSyntax } = internalBinding('contextify');
|
||||
@@ -13,6 +14,13 @@ const path = require('path');
|
||||
* @param {string} main - Entry point path
|
||||
*/
|
||||
function resolveMainPath(main) {
|
||||
+ // For built-in modules used as the main entry point we _never_
|
||||
+ // want to waste cycles resolving them to file paths on disk
|
||||
@@ -39,12 +63,13 @@ index 0bfe7b11241416bfca0d470047b14777ad99307f..c86add4395ed59cee0d880961e7572b0
|
||||
+ if (typeof main === 'string' && StringPrototypeStartsWith(main, 'electron/js2c')) {
|
||||
+ return main;
|
||||
+ }
|
||||
// Note extension resolution for the main entry point can be deprecated in a
|
||||
// future major.
|
||||
// Module._findPath is monkey-patchable here.
|
||||
@@ -24,6 +31,12 @@ function resolveMainPath(main) {
|
||||
}
|
||||
|
||||
+
|
||||
const defaultType = getOptionValue('--experimental-default-type');
|
||||
/** @type {string} */
|
||||
let mainPath;
|
||||
@@ -50,6 +58,13 @@ function resolveMainPath(main) {
|
||||
* @param {string} mainPath - Absolute path to the main entry point
|
||||
*/
|
||||
function shouldUseESMLoader(mainPath) {
|
||||
+ // For built-in modules used as the main entry point we _never_
|
||||
+ // want to waste cycles resolving them to file paths on disk
|
||||
@@ -52,6 +77,7 @@ index 0bfe7b11241416bfca0d470047b14777ad99307f..c86add4395ed59cee0d880961e7572b0
|
||||
+ if (typeof mainPath === 'string' && StringPrototypeStartsWith(mainPath, 'electron/js2c')) {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
if (getOptionValue('--experimental-default-type') === 'module') { return true; }
|
||||
|
||||
/**
|
||||
* @type {string[]} userLoaders A list of custom loaders registered by the user
|
||||
* (or an empty list when none have been registered).
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: fix: expose the built-in electron module via the ESM loader
|
||||
This allows usage of `import { app } from 'electron'` and `import('electron')` natively in the browser + non-sandboxed renderer
|
||||
|
||||
diff --git a/lib/internal/modules/esm/get_format.js b/lib/internal/modules/esm/get_format.js
|
||||
index 4ac9c011d153f4cb39cb7d4f46de0f8e65f70a56..f8462b69368aa7987e1e8ac8cd73e4ff2d921c51 100644
|
||||
index 1931688e85d05ee2da4f88efb05d635cb43be233..afccc24392abff9eef2b9953fcffeb79ee71ad15 100644
|
||||
--- a/lib/internal/modules/esm/get_format.js
|
||||
+++ b/lib/internal/modules/esm/get_format.js
|
||||
@@ -27,6 +27,7 @@ const protocolHandlers = {
|
||||
@@ -30,6 +30,7 @@ const protocolHandlers = {
|
||||
'http:': getHttpProtocolModuleFormat,
|
||||
'https:': getHttpProtocolModuleFormat,
|
||||
'node:'() { return 'builtin'; },
|
||||
@@ -18,20 +18,19 @@ index 4ac9c011d153f4cb39cb7d4f46de0f8e65f70a56..f8462b69368aa7987e1e8ac8cd73e4ff
|
||||
|
||||
/**
|
||||
diff --git a/lib/internal/modules/esm/load.js b/lib/internal/modules/esm/load.js
|
||||
index d064296d11c463616111d28a32b7ad3f6a72bebd..14d5236d0ead946acf9a2f63bf979e7193bfbf56 100644
|
||||
index 6f9b73abd8a76191714f12d68c01a881653d8d4a..f108b567a910805ff86f0baf75fa1a6102ad28d6 100644
|
||||
--- a/lib/internal/modules/esm/load.js
|
||||
+++ b/lib/internal/modules/esm/load.js
|
||||
@@ -123,7 +123,8 @@ async function defaultLoad(url, context = kEmptyObject) {
|
||||
@@ -140,7 +140,7 @@ async function defaultLoad(url, context = kEmptyObject) {
|
||||
// Now that we have the source for the module, run `defaultGetFormat` again in case we detect ESM syntax.
|
||||
format ??= await defaultGetFormat(urlInstance, contextToPass);
|
||||
|
||||
if (
|
||||
format === 'builtin' ||
|
||||
- format === 'commonjs'
|
||||
+ format === 'commonjs' ||
|
||||
+ format === 'electron'
|
||||
) {
|
||||
source = null;
|
||||
} else if (source == null) {
|
||||
@@ -201,6 +202,7 @@ function throwIfUnsupportedURLScheme(parsed, experimentalNetworkImports) {
|
||||
- if (format === 'commonjs' && contextToPass !== context) {
|
||||
+ if ((format === 'commonjs' || format === 'electron') && contextToPass !== context) {
|
||||
// For backward compatibility reasons, we need to discard the source in
|
||||
// order for the CJS loader to re-fetch it.
|
||||
source = null;
|
||||
@@ -221,6 +221,7 @@ function throwIfUnsupportedURLScheme(parsed, experimentalNetworkImports) {
|
||||
protocol !== 'file:' &&
|
||||
protocol !== 'data:' &&
|
||||
protocol !== 'node:' &&
|
||||
@@ -39,7 +38,7 @@ index d064296d11c463616111d28a32b7ad3f6a72bebd..14d5236d0ead946acf9a2f63bf979e71
|
||||
(
|
||||
!experimentalNetworkImports ||
|
||||
(
|
||||
@@ -209,7 +211,7 @@ function throwIfUnsupportedURLScheme(parsed, experimentalNetworkImports) {
|
||||
@@ -229,7 +230,7 @@ function throwIfUnsupportedURLScheme(parsed, experimentalNetworkImports) {
|
||||
)
|
||||
)
|
||||
) {
|
||||
@@ -49,19 +48,19 @@ index d064296d11c463616111d28a32b7ad3f6a72bebd..14d5236d0ead946acf9a2f63bf979e71
|
||||
ArrayPrototypePush(schemes, 'https', 'http');
|
||||
}
|
||||
diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js
|
||||
index acb5ddca8af3d2495ce27d6426b28e6ff73a8f33..acfcc1f1f92548117ded857fa8d4dd140e07ab2b 100644
|
||||
index 58e7df07ca5275e3a684f30c3d0a3f901d000fb8..2d077cc182b40e0bdce2d71d0471e96e6d30222a 100644
|
||||
--- a/lib/internal/modules/esm/resolve.js
|
||||
+++ b/lib/internal/modules/esm/resolve.js
|
||||
@@ -725,6 +725,8 @@ function parsePackageName(specifier, base) {
|
||||
return { packageName, packageSubpath, isScoped };
|
||||
@@ -731,6 +731,8 @@ function packageImportsResolve(name, base, conditions) {
|
||||
throw importNotDefined(name, packageJSONUrl, base);
|
||||
}
|
||||
|
||||
+const electronTypes = ['electron', 'electron/main', 'electron/common', 'electron/renderer'];
|
||||
+
|
||||
/**
|
||||
* @param {string} specifier
|
||||
* @param {string | URL | undefined} base
|
||||
@@ -736,6 +738,11 @@ function packageResolve(specifier, base, conditions) {
|
||||
* Returns the package type for a given URL.
|
||||
* @param {URL} url - The URL to get the package type for.
|
||||
@@ -791,6 +793,11 @@ function packageResolve(specifier, base, conditions) {
|
||||
return new URL('node:' + specifier);
|
||||
}
|
||||
|
||||
@@ -74,10 +73,10 @@ index acb5ddca8af3d2495ce27d6426b28e6ff73a8f33..acfcc1f1f92548117ded857fa8d4dd14
|
||||
parsePackageName(specifier, base);
|
||||
|
||||
diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js
|
||||
index b143cd0ad34d0e039db3e7493be00d923cc68b2d..178f362b2869173d51b2e97a8d35a16ab4ed4962 100644
|
||||
index 7a62615cfe4210c9fd83c6bfa3b5da19eec5fff2..bda102b266b17936efc453d039213517c4ef921c 100644
|
||||
--- a/lib/internal/modules/esm/translators.js
|
||||
+++ b/lib/internal/modules/esm/translators.js
|
||||
@@ -220,7 +220,7 @@ function createCJSModuleWrap(url, source, isMain, loadCJS = loadCJSModule) {
|
||||
@@ -280,7 +280,7 @@ function createCJSModuleWrap(url, source, isMain, loadCJS = loadCJSModule) {
|
||||
|
||||
const { exportNames, module } = cjsPreparseModuleExports(filename, source);
|
||||
cjsCache.set(url, module);
|
||||
@@ -86,20 +85,18 @@ index b143cd0ad34d0e039db3e7493be00d923cc68b2d..178f362b2869173d51b2e97a8d35a16a
|
||||
[...exportNames] : ['default', ...exportNames];
|
||||
|
||||
if (isMain) {
|
||||
@@ -241,9 +241,9 @@ function createCJSModuleWrap(url, source, isMain, loadCJS = loadCJSModule) {
|
||||
} else {
|
||||
@@ -302,8 +302,8 @@ function createCJSModuleWrap(url, source, isMain, loadCJS = loadCJSModule) {
|
||||
({ exports } = module);
|
||||
}
|
||||
- for (const exportName of exportNames) {
|
||||
for (const exportName of exportNames) {
|
||||
- if (!ObjectPrototypeHasOwnProperty(exports, exportName) ||
|
||||
- exportName === 'default')
|
||||
+ for (const exportName of namesWithDefault) {
|
||||
- exportName === 'default') {
|
||||
+ if (exportName === 'default' ||
|
||||
+ !ObjectPrototypeHasOwnProperty(exports, exportName))
|
||||
+ !ObjectPrototypeHasOwnProperty(exports, exportName)) {
|
||||
continue;
|
||||
}
|
||||
// We might trigger a getter -> dont fail.
|
||||
let value;
|
||||
@@ -267,6 +267,10 @@ translators.set('require-commonjs', (url, source, isMain) => {
|
||||
@@ -328,6 +328,10 @@ translators.set('require-commonjs', (url, source, isMain) => {
|
||||
return createCJSModuleWrap(url, source);
|
||||
});
|
||||
|
||||
@@ -111,7 +108,7 @@ index b143cd0ad34d0e039db3e7493be00d923cc68b2d..178f362b2869173d51b2e97a8d35a16a
|
||||
// or as the initial entry point when the ESM loader handles a CommonJS entry.
|
||||
translators.set('commonjs', async function commonjsStrategy(url, source,
|
||||
diff --git a/lib/internal/url.js b/lib/internal/url.js
|
||||
index 8d5926e8fcb9df031e37698588075a34a80aea6c..6df0b68c8d35445d5f02475678484a6d5157762e 100644
|
||||
index a58f96aee7cc424ce18fe647afff8724f8a179a0..ae618cdeac1dfa1fd0ddcceb9edc83e06c59fc4b 100644
|
||||
--- a/lib/internal/url.js
|
||||
+++ b/lib/internal/url.js
|
||||
@@ -1389,6 +1389,8 @@ function fileURLToPath(path) {
|
||||
|
||||
@@ -22,7 +22,7 @@ index 6a6164b6d294430b6f2fe826cdcef5a9cc3f9660..035f495687856b0cfbcc4e87ba6e90d5
|
||||
int thread_pool_size,
|
||||
node::tracing::TracingController* tracing_controller) {
|
||||
diff --git a/src/node.h b/src/node.h
|
||||
index ca01c42e8af484def476ba27cb270a0cc90226c9..dcce529664e1d126115545d6ba7f5b8492b0e921 100644
|
||||
index f2740116a4710be31d8c8d3a03f9ea3925301b31..74a097279d3e5dc3ee6c5e609fd35cf44e5002f5 100644
|
||||
--- a/src/node.h
|
||||
+++ b/src/node.h
|
||||
@@ -132,6 +132,7 @@ struct SnapshotData;
|
||||
@@ -33,7 +33,7 @@ index ca01c42e8af484def476ba27cb270a0cc90226c9..dcce529664e1d126115545d6ba7f5b84
|
||||
class TracingController;
|
||||
|
||||
}
|
||||
@@ -772,6 +773,8 @@ NODE_EXTERN void GetNodeReport(Environment* env,
|
||||
@@ -774,6 +775,8 @@ NODE_EXTERN void GetNodeReport(Environment* env,
|
||||
NODE_EXTERN MultiIsolatePlatform* GetMultiIsolatePlatform(Environment* env);
|
||||
NODE_EXTERN MultiIsolatePlatform* GetMultiIsolatePlatform(IsolateData* env);
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Charles Kerr <charles@charleskerr.com>
|
||||
Date: Wed, 19 Jul 2023 16:00:08 -0500
|
||||
Subject: fix ftbfs Werror Wextra-semi
|
||||
|
||||
Fix a deps warning that causes FTBFS when building with -Werror.
|
||||
|
||||
This patch can be removed if fixed upstream.
|
||||
Upstream PR: https://github.com/nodejs/uvwasi/pull/217
|
||||
|
||||
diff --git a/deps/uvwasi/src/uvwasi.c b/deps/uvwasi/src/uvwasi.c
|
||||
index 9e7fc7681664b8430bbd2d2324352be8c6735106..708a52b0621666133b5215790cb9d5fd6a71d4fa 100644
|
||||
--- a/deps/uvwasi/src/uvwasi.c
|
||||
+++ b/deps/uvwasi/src/uvwasi.c
|
||||
@@ -2564,7 +2564,7 @@ uvwasi_errno_t uvwasi_sock_accept(uvwasi_t* uvwasi,
|
||||
/* TODO(mhdawson): Needs implementation */
|
||||
UVWASI_DEBUG("uvwasi_sock_accept(uvwasi=%p, unimplemented)\n", uvwasi);
|
||||
return UVWASI_ENOTSUP;
|
||||
-};
|
||||
+}
|
||||
|
||||
|
||||
const char* uvwasi_embedder_err_code_to_string(uvwasi_errno_t code) {
|
||||
@@ -2651,4 +2651,4 @@ const char* uvwasi_embedder_err_code_to_string(uvwasi_errno_t code) {
|
||||
default:
|
||||
return "UVWASI_UNKNOWN_ERROR";
|
||||
}
|
||||
-}
|
||||
+}
|
||||
\ No newline at end of file
|
||||
@@ -104,7 +104,7 @@ index c6120a655ec853aef11c66ed37d7ca0ffb957dd3..a52ca15cb0ab592d4196d4bd0f113324
|
||||
if (!Set(env->context(),
|
||||
obj,
|
||||
diff --git a/src/crypto/crypto_context.cc b/src/crypto/crypto_context.cc
|
||||
index 3876adf7d72211d8d8c5a94564168094ecfc660b..ccd166d9439a821328d2ad35352488960206f65e 100644
|
||||
index 6e5bbe07d0c337b36f3157c2e6404fdc91849fd1..7ec682833213de9054a8c30751436d12baaea235 100644
|
||||
--- a/src/crypto/crypto_context.cc
|
||||
+++ b/src/crypto/crypto_context.cc
|
||||
@@ -63,7 +63,7 @@ inline X509_STORE* GetOrCreateRootCertStore() {
|
||||
@@ -240,6 +240,28 @@ index 3fa4a415dc911a13afd90dfb31c1ed4ad0fd268f..fa48dffc31342c44a1c1207b9d4c3dc7
|
||||
if (EVP_PKEY_paramgen(param_ctx.get(), &raw_params) <= 0)
|
||||
return EVPKeyCtxPointer();
|
||||
|
||||
diff --git a/src/crypto/crypto_keys.cc b/src/crypto/crypto_keys.cc
|
||||
index c5dd2fb8fce40f2bf6f9a8543047ffb50cc08084..d850af9257cc194ee385130ce3cd2c0101b2455f 100644
|
||||
--- a/src/crypto/crypto_keys.cc
|
||||
+++ b/src/crypto/crypto_keys.cc
|
||||
@@ -1241,6 +1241,7 @@ void KeyObjectHandle::GetAsymmetricKeyType(
|
||||
}
|
||||
|
||||
bool KeyObjectHandle::CheckEcKeyData() const {
|
||||
+#ifndef OPENSSL_IS_BORINGSSL
|
||||
MarkPopErrorOnReturn mark_pop_error_on_return;
|
||||
|
||||
const ManagedEVPPKey& key = data_->GetAsymmetricKey();
|
||||
@@ -1259,6 +1260,9 @@ bool KeyObjectHandle::CheckEcKeyData() const {
|
||||
#else
|
||||
return EVP_PKEY_public_check(ctx.get()) == 1;
|
||||
#endif
|
||||
+#else
|
||||
+ return true;
|
||||
+#endif
|
||||
}
|
||||
|
||||
void KeyObjectHandle::CheckEcKeyData(const FunctionCallbackInfo<Value>& args) {
|
||||
diff --git a/src/crypto/crypto_random.cc b/src/crypto/crypto_random.cc
|
||||
index 245f352918696413f8f0f7cec94dbcec687685af..35c1c1ce9f0e3d59b75e3966d485bf70b846de5b 100644
|
||||
--- a/src/crypto/crypto_random.cc
|
||||
@@ -254,10 +276,10 @@ index 245f352918696413f8f0f7cec94dbcec687685af..35c1c1ce9f0e3d59b75e3966d485bf70
|
||||
THROW_ERR_CRYPTO_OPERATION_FAILED(env, "could not generate prime");
|
||||
return Nothing<bool>();
|
||||
diff --git a/src/crypto/crypto_rsa.cc b/src/crypto/crypto_rsa.cc
|
||||
index 3f8499457cf10765fa55e5018a26580f2c5ef15d..31647423be528949db744cbea43586ece5243bac 100644
|
||||
index f222ab9cf5ccbc5dd3399b18d7688efda6672c93..349abd4d06e7f624a071b994271dedc31dc9229a 100644
|
||||
--- a/src/crypto/crypto_rsa.cc
|
||||
+++ b/src/crypto/crypto_rsa.cc
|
||||
@@ -610,10 +610,11 @@ Maybe<bool> GetRsaKeyDetail(
|
||||
@@ -616,10 +616,11 @@ Maybe<bool> GetRsaKeyDetail(
|
||||
}
|
||||
|
||||
if (params->saltLength != nullptr) {
|
||||
@@ -361,7 +383,7 @@ index cf051585e779e2b03bd7b95fe5008b89cc7f8162..9de49c6828468fdf846dcd4ad445390f
|
||||
#if NODE_OPENSSL_HAS_QUIC
|
||||
#include <openssl/quic.h>
|
||||
diff --git a/src/node_options.cc b/src/node_options.cc
|
||||
index b544f1209143c0d4a01b1df3257e5b2ba1d5bfee..f711ac936e76f9c16d15d7db759d0081a9eb018d 100644
|
||||
index 29cb7fc6b29b89946856990032645ad4edb8529c..faca807e31daaadb0103556001a16629a3822c1f 100644
|
||||
--- a/src/node_options.cc
|
||||
+++ b/src/node_options.cc
|
||||
@@ -6,7 +6,7 @@
|
||||
@@ -374,7 +396,7 @@ index b544f1209143c0d4a01b1df3257e5b2ba1d5bfee..f711ac936e76f9c16d15d7db759d0081
|
||||
#endif
|
||||
|
||||
diff --git a/src/node_options.h b/src/node_options.h
|
||||
index bc18a45e681a3cd8d26ea94862d7a6eb3a6631fc..08141c540c0c3fe4f2a4fe66bf75557a71a1d8e6 100644
|
||||
index 30955c779714ce5ad9b79f11e4cfefbcada7fa05..f02c07cd418fa2e3c64221bd37acd380a130f608 100644
|
||||
--- a/src/node_options.h
|
||||
+++ b/src/node_options.h
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Mon, 2 Oct 2023 16:03:43 +0200
|
||||
Subject: fix: handle possible disabled SharedArrayBuffer
|
||||
|
||||
It's possible for SharedArrayBuffer to be disabled with the -no-harmony-sharedarraybuffer
|
||||
flag, and so we should guard uses with a check for potential undefined-ness.
|
||||
|
||||
This should be upstreamed to Node.js.
|
||||
|
||||
diff --git a/lib/internal/crypto/webidl.js b/lib/internal/crypto/webidl.js
|
||||
index 9f5340c223902c5ff61def05e8a4f470b4f328e8..d6dbfa482f9ebff3f99fb810e072cf9a03d1cd4d 100644
|
||||
--- a/lib/internal/crypto/webidl.js
|
||||
+++ b/lib/internal/crypto/webidl.js
|
||||
@@ -183,7 +183,10 @@ function isNonSharedArrayBuffer(V) {
|
||||
return ObjectPrototypeIsPrototypeOf(ArrayBufferPrototype, V);
|
||||
}
|
||||
|
||||
+// SharedArrayBuffers can be disabled with --no-harmony-sharedarraybuffer.
|
||||
function isSharedArrayBuffer(V) {
|
||||
+ if (SharedArrayBuffer === undefined)
|
||||
+ return false;
|
||||
return ObjectPrototypeIsPrototypeOf(SharedArrayBuffer.prototype, V);
|
||||
}
|
||||
|
||||
diff --git a/lib/internal/main/worker_thread.js b/lib/internal/main/worker_thread.js
|
||||
index 4460042d7bfbb8286a9b2abcbfb9e44f21b5d944..027a2de1878d5f09dc5d44b1b21af7163ea1b999 100644
|
||||
--- a/lib/internal/main/worker_thread.js
|
||||
+++ b/lib/internal/main/worker_thread.js
|
||||
@@ -112,6 +112,7 @@ port.on('message', (message) => {
|
||||
|
||||
require('internal/worker').assignEnvironmentData(environmentData);
|
||||
|
||||
+ // SharedArrayBuffers can be disabled with --no-harmony-sharedarraybuffer.
|
||||
if (SharedArrayBuffer !== undefined) {
|
||||
// The counter is only passed to the workers created by the main thread,
|
||||
// not to workers created by other workers.
|
||||
@@ -6,12 +6,12 @@ Subject: fix: lazyload fs in esm loaders to apply asar patches
|
||||
Changes { foo } from fs to just "fs.foo" so that our patching of fs is applied to esm loaders
|
||||
|
||||
diff --git a/lib/internal/modules/esm/load.js b/lib/internal/modules/esm/load.js
|
||||
index 14d5236d0ead946acf9a2f63bf979e7193bfbf56..74136abfb9aae1fc8ab746908be752056b6d7c5a 100644
|
||||
index f108b567a910805ff86f0baf75fa1a6102ad28d6..8406e8ca319533d6186c5d457e951b7a845b6b72 100644
|
||||
--- a/lib/internal/modules/esm/load.js
|
||||
+++ b/lib/internal/modules/esm/load.js
|
||||
@@ -10,7 +10,7 @@ const { kEmptyObject } = require('internal/util');
|
||||
const { defaultGetFormat } = require('internal/modules/esm/get_format');
|
||||
const { validateAssertions } = require('internal/modules/esm/assert');
|
||||
const { validateAttributes, emitImportAssertionWarning } = require('internal/modules/esm/assert');
|
||||
const { getOptionValue } = require('internal/options');
|
||||
-const { readFileSync } = require('fs');
|
||||
+const fs = require('fs');
|
||||
@@ -38,7 +38,7 @@ index 14d5236d0ead946acf9a2f63bf979e7193bfbf56..74136abfb9aae1fc8ab746908be75205
|
||||
const match = RegExpPrototypeExec(DATA_URL_PATTERN, url.pathname);
|
||||
if (!match) {
|
||||
diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js
|
||||
index acfcc1f1f92548117ded857fa8d4dd140e07ab2b..ce8092b96aee8d09ff382110db4be62dcd760cce 100644
|
||||
index 2d077cc182b40e0bdce2d71d0471e96e6d30222a..34fd6613fa24d628fc026ac11e5be7217a20fff4 100644
|
||||
--- a/lib/internal/modules/esm/resolve.js
|
||||
+++ b/lib/internal/modules/esm/resolve.js
|
||||
@@ -24,7 +24,7 @@ const {
|
||||
@@ -50,7 +50,7 @@ index acfcc1f1f92548117ded857fa8d4dd140e07ab2b..ce8092b96aee8d09ff382110db4be62d
|
||||
const { getOptionValue } = require('internal/options');
|
||||
// Do not eagerly grab .manifest, it may be in TDZ
|
||||
const policy = getOptionValue('--experimental-policy') ?
|
||||
@@ -235,7 +235,7 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
|
||||
@@ -257,7 +257,7 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
|
||||
}
|
||||
|
||||
if (!preserveSymlinks) {
|
||||
@@ -60,28 +60,19 @@ index acfcc1f1f92548117ded857fa8d4dd140e07ab2b..ce8092b96aee8d09ff382110db4be62d
|
||||
});
|
||||
const { search, hash } = resolved;
|
||||
diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js
|
||||
index 178f362b2869173d51b2e97a8d35a16ab4ed4962..4c3a0d8c484a402fe419a0bd45c7e2b1d717cb4a 100644
|
||||
index bda102b266b17936efc453d039213517c4ef921c..dbbe37474c70addfbf8cf805c29732dcd38c74f6 100644
|
||||
--- a/lib/internal/modules/esm/translators.js
|
||||
+++ b/lib/internal/modules/esm/translators.js
|
||||
@@ -25,7 +25,7 @@ function lazyTypes() {
|
||||
}
|
||||
@@ -32,7 +32,7 @@ function lazyTypes() {
|
||||
|
||||
const { containsModuleSyntax } = internalBinding('contextify');
|
||||
const assert = require('internal/assert');
|
||||
-const { readFileSync } = require('fs');
|
||||
+const fs = require('fs');
|
||||
const { dirname, extname, isAbsolute } = require('path');
|
||||
const {
|
||||
hasEsmSyntax,
|
||||
@@ -132,7 +132,7 @@ translators.set('module', async function moduleStrategy(url, source, isMain) {
|
||||
*/
|
||||
function enrichCJSError(err, content, filename) {
|
||||
if (err != null && ObjectGetPrototypeOf(err) === SyntaxErrorPrototype &&
|
||||
- hasEsmSyntax(content || readFileSync(filename, 'utf-8'))) {
|
||||
+ hasEsmSyntax(content || fs.readFileSync(filename, 'utf-8'))) {
|
||||
// Emit the warning synchronously because we are in the middle of handling
|
||||
// a SyntaxError that will throw and likely terminate the process before an
|
||||
// asynchronous warning would be emitted.
|
||||
@@ -294,7 +294,7 @@ translators.set('commonjs', async function commonjsStrategy(url, source,
|
||||
loadBuiltinModule,
|
||||
@@ -355,7 +355,7 @@ translators.set('commonjs', async function commonjsStrategy(url, source,
|
||||
|
||||
try {
|
||||
// We still need to read the FS to detect the exports.
|
||||
@@ -90,12 +81,12 @@ index 178f362b2869173d51b2e97a8d35a16ab4ed4962..4c3a0d8c484a402fe419a0bd45c7e2b1
|
||||
} catch {
|
||||
// Continue regardless of error.
|
||||
}
|
||||
@@ -357,7 +357,7 @@ function cjsPreparseModuleExports(filename, source) {
|
||||
@@ -424,7 +424,7 @@ function cjsPreparseModuleExports(filename, source) {
|
||||
isAbsolute(resolved)) {
|
||||
// TODO: this should be calling the `load` hook chain to get the source
|
||||
// (and fallback to reading the FS only if the source is nullish).
|
||||
- const source = readFileSync(resolved, 'utf-8');
|
||||
+ const source = fs.readFileSync(resolved, 'utf-8');
|
||||
const { exportNames: reexportNames } = cjsPreparseModuleExports(resolved, source);
|
||||
for (const name of reexportNames)
|
||||
for (const name of reexportNames) {
|
||||
exportNames.add(name);
|
||||
|
||||
@@ -13,7 +13,7 @@ causing the following error:
|
||||
This should be upstreamed.
|
||||
|
||||
diff --git a/src/module_wrap.h b/src/module_wrap.h
|
||||
index c51eb99ce3eb54bc30ae922e0357b637b09d53c6..55317ced78ee9ceaa13f7e00477c59370eb335fa 100644
|
||||
index 23a0d7aee1dfa0ebe26e0507e31eacb0b4d137ed..0733017d8e1ac6e60589082b402bd44a98ddc312 100644
|
||||
--- a/src/module_wrap.h
|
||||
+++ b/src/module_wrap.h
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Charles Kerr <charles@charleskerr.com>
|
||||
Date: Thu, 22 Jun 2023 11:59:47 -0500
|
||||
Subject: fix: Wunreachable-code warning in ares__init_rand_engine()
|
||||
|
||||
Fix upstream Win32 FTBFS when building with -Werror,-Wunreachable-code.
|
||||
|
||||
This patch can be removed after the fix is picked up in Node.js.
|
||||
Upstream PR @ https://github.com/c-ares/c-ares/pull/531
|
||||
|
||||
diff --git a/deps/cares/src/lib/ares_rand.c b/deps/cares/src/lib/ares_rand.c
|
||||
index 766c1e6ea9bda1784cfb611dbac66424806cd23a..12d943921e3ba61cbf7a2ed3194fcd5a6c61da8a 100644
|
||||
--- a/deps/cares/src/lib/ares_rand.c
|
||||
+++ b/deps/cares/src/lib/ares_rand.c
|
||||
@@ -55,6 +55,7 @@ BOOLEAN WINAPI SystemFunction036(PVOID RandomBuffer, ULONG RandomBufferLength);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+#if !defined(HAVE_ARC4RANDOM_BUF) && !defined(_WIN32)
|
||||
|
||||
#define ARES_RC4_KEY_LEN 32 /* 256 bits */
|
||||
|
||||
@@ -129,6 +130,7 @@ static void ares_rc4_init(ares_rand_rc4 *rc4_state)
|
||||
rc4_state->i = 0;
|
||||
rc4_state->j = 0;
|
||||
}
|
||||
+#endif
|
||||
|
||||
/* Just outputs the key schedule, no need to XOR with any data since we have none */
|
||||
static void ares_rc4_prng(ares_rand_rc4 *rc4_state, unsigned char *buf, size_t len)
|
||||
@@ -166,13 +168,13 @@ static int ares__init_rand_engine(ares_rand_state *state)
|
||||
return 1;
|
||||
}
|
||||
/* Fall-Thru on failure to RC4 */
|
||||
-#endif
|
||||
|
||||
state->type = ARES_RAND_RC4;
|
||||
ares_rc4_init(&state->state.rc4);
|
||||
|
||||
/* Currently cannot fail */
|
||||
return 1;
|
||||
+#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -276,4 +278,3 @@ unsigned short ares__generate_new_id(ares_rand_state *state)
|
||||
ares__rand_bytes(state, (unsigned char *)&r, sizeof(r));
|
||||
return r;
|
||||
}
|
||||
-
|
||||
@@ -1,155 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= <targos@protonmail.com>
|
||||
Date: Thu, 28 Sep 2023 14:50:20 +0200
|
||||
Subject: lib,test: do not hardcode Buffer.kMaxLength
|
||||
|
||||
V8 will soon support typed arrays as large as the maximum array buffer
|
||||
length. This patch replaces hardcoded values related to
|
||||
Buffer.kMaxLength with the actual constant.
|
||||
It also fixes a test that was passing by accident.
|
||||
|
||||
Refs: https://github.com/v8/v8/commit/44b299590083b888637c79fb5632806e607ab861
|
||||
PR-URL: https://github.com/nodejs/node/pull/49876
|
||||
Reviewed-By: Richard Lau <rlau@redhat.com>
|
||||
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
|
||||
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
|
||||
(cherry picked from commit a4fdb1abe0844d86b4cbfcc4051794656e7d746e)
|
||||
|
||||
diff --git a/lib/internal/blob.js b/lib/internal/blob.js
|
||||
index d0e47c1a4397a875c937d43c3b72dbd1e1de35a7..400d2c5fd21bc962a8befc4d80527216baddd6d5 100644
|
||||
--- a/lib/internal/blob.js
|
||||
+++ b/lib/internal/blob.js
|
||||
@@ -24,6 +24,9 @@ const {
|
||||
concat,
|
||||
getDataObject,
|
||||
} = internalBinding('blob');
|
||||
+const {
|
||||
+ kMaxLength,
|
||||
+} = internalBinding('buffer');
|
||||
|
||||
const {
|
||||
TextDecoder,
|
||||
@@ -62,7 +65,6 @@ const {
|
||||
} = require('internal/errors');
|
||||
|
||||
const {
|
||||
- isUint32,
|
||||
validateDictionary,
|
||||
} = require('internal/validators');
|
||||
|
||||
@@ -158,8 +160,8 @@ class Blob {
|
||||
return src;
|
||||
});
|
||||
|
||||
- if (!isUint32(length))
|
||||
- throw new ERR_BUFFER_TOO_LARGE(0xFFFFFFFF);
|
||||
+ if (length > kMaxLength)
|
||||
+ throw new ERR_BUFFER_TOO_LARGE(kMaxLength);
|
||||
|
||||
this[kHandle] = _createBlob(sources_, length);
|
||||
this[kLength] = length;
|
||||
diff --git a/test/parallel/test-blob-buffer-too-large.js b/test/parallel/test-blob-buffer-too-large.js
|
||||
index 2fd8b8754bd593a0da069044d33fcd6bba82f9c9..a9cf53b025bbff58a8d5783e4f807d79f5d68e2b 100644
|
||||
--- a/test/parallel/test-blob-buffer-too-large.js
|
||||
+++ b/test/parallel/test-blob-buffer-too-large.js
|
||||
@@ -3,17 +3,17 @@
|
||||
|
||||
const common = require('../common');
|
||||
const assert = require('assert');
|
||||
-const { Blob } = require('buffer');
|
||||
+const { Blob, kMaxLength } = require('buffer');
|
||||
|
||||
if (common.isFreeBSD)
|
||||
common.skip('Oversized buffer make the FreeBSD CI runner crash');
|
||||
|
||||
try {
|
||||
- new Blob([new Uint8Array(0xffffffff), [1]]);
|
||||
+ new Blob([new Uint8Array(kMaxLength), [1]]);
|
||||
} catch (e) {
|
||||
if (
|
||||
e.message === 'Array buffer allocation failed' ||
|
||||
- e.message === 'Invalid typed array length: 4294967295'
|
||||
+ e.message === `Invalid typed array length: ${kMaxLength}`
|
||||
) {
|
||||
common.skip(
|
||||
'Insufficient memory on this platform for oversized buffer test.'
|
||||
diff --git a/test/parallel/test-buffer-alloc.js b/test/parallel/test-buffer-alloc.js
|
||||
index c6b728027057ece38c2b7fcc6bf7b18b959125d2..aad9c6bcab69e971c02281928885d94aa21c8199 100644
|
||||
--- a/test/parallel/test-buffer-alloc.js
|
||||
+++ b/test/parallel/test-buffer-alloc.js
|
||||
@@ -4,13 +4,16 @@ const common = require('../common');
|
||||
const assert = require('assert');
|
||||
const vm = require('vm');
|
||||
|
||||
-const SlowBuffer = require('buffer').SlowBuffer;
|
||||
+const {
|
||||
+ SlowBuffer,
|
||||
+ kMaxLength,
|
||||
+} = require('buffer');
|
||||
|
||||
// Verify the maximum Uint8Array size. There is no concrete limit by spec. The
|
||||
// internal limits should be updated if this fails.
|
||||
assert.throws(
|
||||
- () => new Uint8Array(2 ** 32 + 1),
|
||||
- { message: 'Invalid typed array length: 4294967297' }
|
||||
+ () => new Uint8Array(kMaxLength + 1),
|
||||
+ { message: `Invalid typed array length: ${kMaxLength + 1}` },
|
||||
);
|
||||
|
||||
const b = Buffer.allocUnsafe(1024);
|
||||
diff --git a/test/parallel/test-buffer-over-max-length.js b/test/parallel/test-buffer-over-max-length.js
|
||||
index d2df358cc00ca4b238252d6d11bdad3b77fad114..f29d6b62d4aa408fb3a67ffe71b14436fbbff907 100644
|
||||
--- a/test/parallel/test-buffer-over-max-length.js
|
||||
+++ b/test/parallel/test-buffer-over-max-length.js
|
||||
@@ -12,18 +12,8 @@ const bufferMaxSizeMsg = {
|
||||
name: 'RangeError',
|
||||
};
|
||||
|
||||
-assert.throws(() => Buffer((-1 >>> 0) + 2), bufferMaxSizeMsg);
|
||||
-assert.throws(() => SlowBuffer((-1 >>> 0) + 2), bufferMaxSizeMsg);
|
||||
-assert.throws(() => Buffer.alloc((-1 >>> 0) + 2), bufferMaxSizeMsg);
|
||||
-assert.throws(() => Buffer.allocUnsafe((-1 >>> 0) + 2), bufferMaxSizeMsg);
|
||||
-assert.throws(() => Buffer.allocUnsafeSlow((-1 >>> 0) + 2), bufferMaxSizeMsg);
|
||||
-
|
||||
assert.throws(() => Buffer(kMaxLength + 1), bufferMaxSizeMsg);
|
||||
assert.throws(() => SlowBuffer(kMaxLength + 1), bufferMaxSizeMsg);
|
||||
assert.throws(() => Buffer.alloc(kMaxLength + 1), bufferMaxSizeMsg);
|
||||
assert.throws(() => Buffer.allocUnsafe(kMaxLength + 1), bufferMaxSizeMsg);
|
||||
assert.throws(() => Buffer.allocUnsafeSlow(kMaxLength + 1), bufferMaxSizeMsg);
|
||||
-
|
||||
-// issue GH-4331
|
||||
-assert.throws(() => Buffer.allocUnsafe(0x100000001), bufferMaxSizeMsg);
|
||||
-assert.throws(() => Buffer.allocUnsafe(0xFFFFFFFFF), bufferMaxSizeMsg);
|
||||
diff --git a/test/parallel/test-buffer-tostring-rangeerror.js b/test/parallel/test-buffer-tostring-rangeerror.js
|
||||
index d2e1e0d6e46438f20d6b8f1196ebd936d4fa3436..0ebea759b5c42be0c294093256ea3cad7034a98b 100644
|
||||
--- a/test/parallel/test-buffer-tostring-rangeerror.js
|
||||
+++ b/test/parallel/test-buffer-tostring-rangeerror.js
|
||||
@@ -1,17 +1,22 @@
|
||||
'use strict';
|
||||
require('../common');
|
||||
|
||||
-// This test ensures that Node.js throws a RangeError when trying to convert a
|
||||
-// gigantic buffer into a string.
|
||||
+// This test ensures that Node.js throws an Error when trying to convert a
|
||||
+// large buffer into a string.
|
||||
// Regression test for https://github.com/nodejs/node/issues/649.
|
||||
|
||||
const assert = require('assert');
|
||||
-const SlowBuffer = require('buffer').SlowBuffer;
|
||||
+const {
|
||||
+ SlowBuffer,
|
||||
+ constants: {
|
||||
+ MAX_STRING_LENGTH,
|
||||
+ },
|
||||
+} = require('buffer');
|
||||
|
||||
-const len = 1422561062959;
|
||||
+const len = MAX_STRING_LENGTH + 1;
|
||||
const message = {
|
||||
- code: 'ERR_OUT_OF_RANGE',
|
||||
- name: 'RangeError',
|
||||
+ code: 'ERR_STRING_TOO_LONG',
|
||||
+ name: 'Error',
|
||||
};
|
||||
assert.throws(() => Buffer(len).toString('utf8'), message);
|
||||
assert.throws(() => SlowBuffer(len).toString('utf8'), message);
|
||||
@@ -6,10 +6,10 @@ Subject: Pass all globals through "require"
|
||||
(cherry picked from commit 7d015419cb7a0ecfe6728431a4ed2056cd411d62)
|
||||
|
||||
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
|
||||
index 19a7d7e671f5abfa55b62290dcf3796a2c4e9013..3161afa33889f1682a1689e76fbcadc397f4b01c 100644
|
||||
index b077ee386bb40ea32208fc6655de88a3449b7eb2..f408d6c152d6acabea5ff3e262fe344909046595 100644
|
||||
--- a/lib/internal/modules/cjs/loader.js
|
||||
+++ b/lib/internal/modules/cjs/loader.js
|
||||
@@ -142,6 +142,13 @@ const {
|
||||
@@ -146,6 +146,13 @@ const {
|
||||
CHAR_FORWARD_SLASH,
|
||||
} = require('internal/constants');
|
||||
|
||||
@@ -23,8 +23,8 @@ index 19a7d7e671f5abfa55b62290dcf3796a2c4e9013..3161afa33889f1682a1689e76fbcadc3
|
||||
const {
|
||||
isProxy,
|
||||
} = require('internal/util/types');
|
||||
@@ -1236,10 +1243,12 @@ Module.prototype._compile = function(content, filename) {
|
||||
if (requireDepth === 0) statCache = new SafeMap();
|
||||
@@ -1371,10 +1378,12 @@ Module.prototype._compile = function(content, filename) {
|
||||
if (requireDepth === 0) { statCache = new SafeMap(); }
|
||||
if (inspectorWrapper) {
|
||||
result = inspectorWrapper(compiledWrapper, thisValue, exports,
|
||||
- require, module, filename, dirname);
|
||||
@@ -37,4 +37,4 @@ index 19a7d7e671f5abfa55b62290dcf3796a2c4e9013..3161afa33889f1682a1689e76fbcadc3
|
||||
+ dirname, process, localGlobal, localBuffer]);
|
||||
}
|
||||
hasLoadedAnyUserCJSModule = true;
|
||||
if (requireDepth === 0) statCache = null;
|
||||
if (requireDepth === 0) { statCache = null; }
|
||||
|
||||
@@ -22,21 +22,20 @@ index 7a773d5208e250abd8b0efb6dde66c45060bbee4..45e38ca0a122e3b1c5d8d59865f9610c
|
||||
const binding = internalBinding('builtins');
|
||||
|
||||
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
|
||||
index 3161afa33889f1682a1689e76fbcadc397f4b01c..84fea979d482d3d5cacfad4b09237e6345675cad 100644
|
||||
index f408d6c152d6acabea5ff3e262fe344909046595..ea3b411a78495d0414b1956503b86cbd5f0ed765 100644
|
||||
--- a/lib/internal/modules/cjs/loader.js
|
||||
+++ b/lib/internal/modules/cjs/loader.js
|
||||
@@ -91,7 +91,7 @@ const fs = require('fs');
|
||||
const internalFS = require('internal/fs/utils');
|
||||
@@ -96,6 +96,7 @@ const assert = require('internal/assert');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { sep } = path;
|
||||
-const { internalModuleStat } = internalBinding('fs');
|
||||
const { internalModuleStat } = internalBinding('fs');
|
||||
+const internalFsBinding = internalBinding('fs');
|
||||
const { safeGetenv } = internalBinding('credentials');
|
||||
const {
|
||||
privateSymbols: {
|
||||
@@ -182,7 +182,7 @@ function stat(filename) {
|
||||
@@ -195,7 +196,7 @@ function stat(filename) {
|
||||
const result = statCache.get(filename);
|
||||
if (result !== undefined) return result;
|
||||
if (result !== undefined) { return result; }
|
||||
}
|
||||
- const result = internalModuleStat(filename);
|
||||
+ const result = internalFsBinding.internalModuleStat(filename);
|
||||
@@ -44,19 +43,18 @@ index 3161afa33889f1682a1689e76fbcadc397f4b01c..84fea979d482d3d5cacfad4b09237e63
|
||||
// Only set cache when `internalModuleStat(filename)` succeeds.
|
||||
statCache.set(filename, result);
|
||||
diff --git a/lib/internal/modules/package_json_reader.js b/lib/internal/modules/package_json_reader.js
|
||||
index c6377faae6f5a827fc9b5c271ebc85f2df2f7177..8143e83ee39a03871642cfd6e7b8671fc4c3454d 100644
|
||||
index 88c079d10d116107aa34dc9281f64c799c48c0b5..146e2e49dc46c7f5302638f75cca4af548509d77 100644
|
||||
--- a/lib/internal/modules/package_json_reader.js
|
||||
+++ b/lib/internal/modules/package_json_reader.js
|
||||
@@ -8,7 +8,7 @@ const {
|
||||
const {
|
||||
@@ -13,6 +13,7 @@ const {
|
||||
ERR_INVALID_PACKAGE_CONFIG,
|
||||
} = require('internal/errors').codes;
|
||||
-const { internalModuleReadJSON } = internalBinding('fs');
|
||||
const { internalModuleReadJSON } = internalBinding('fs');
|
||||
+const internalFsBinding = internalBinding('fs');
|
||||
const { toNamespacedPath } = require('path');
|
||||
const { resolve, sep, toNamespacedPath } = require('path');
|
||||
const permission = require('internal/process/permission');
|
||||
const { kEmptyObject } = require('internal/util');
|
||||
|
||||
@@ -48,7 +48,7 @@ function read(jsonPath, { base, specifier, isESM } = kEmptyObject) {
|
||||
@@ -53,7 +54,7 @@ function read(jsonPath, { base, specifier, isESM } = kEmptyObject) {
|
||||
const {
|
||||
0: string,
|
||||
1: containsKeys,
|
||||
|
||||
@@ -55,10 +55,10 @@ index c9a455be8c395a2f231f56e0a54211466362aa1d..448075e354c760a2dbd1dd763f40b7a6
|
||||
void UntrackContext(v8::Local<v8::Context> context);
|
||||
|
||||
diff --git a/src/js_native_api_v8.cc b/src/js_native_api_v8.cc
|
||||
index 92f765eb0a99f92eac3ce77011e0ec787ccfcb8d..7e77c4692b4d9c4c5daa6ba01878a2219646eb62 100644
|
||||
index f08294a26a43923cfb47dde080e42b5cde0803a5..8d48105cb4822dde19982ce1c132f521ff8b27c9 100644
|
||||
--- a/src/js_native_api_v8.cc
|
||||
+++ b/src/js_native_api_v8.cc
|
||||
@@ -925,11 +925,8 @@ napi_define_class(napi_env env,
|
||||
@@ -961,11 +961,8 @@ napi_define_class(napi_env env,
|
||||
env, p->setter, p->data, &setter_tpl));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,151 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Wed, 18 Oct 2023 10:40:34 +0200
|
||||
Subject: test: fix edge snapshot stack traces
|
||||
|
||||
https://github.com/nodejs/node/pull/49659
|
||||
|
||||
diff --git a/test/common/assertSnapshot.js b/test/common/assertSnapshot.js
|
||||
index 838ee86f74ea89e052676a5c25e23481369857fa..3aacfa064561c64c218fcc4e3090f7952cb1d218 100644
|
||||
--- a/test/common/assertSnapshot.js
|
||||
+++ b/test/common/assertSnapshot.js
|
||||
@@ -8,6 +8,10 @@ const assert = require('node:assert/strict');
|
||||
const stackFramesRegexp = /(?<=\n)(\s+)((.+?)\s+\()?(?:\(?(.+?):(\d+)(?::(\d+))?)\)?(\s+\{)?(\[\d+m)?(\n|$)/g;
|
||||
const windowNewlineRegexp = /\r/g;
|
||||
|
||||
+function replaceNodeVersion(str) {
|
||||
+ return str.replaceAll(process.version, '*');
|
||||
+}
|
||||
+
|
||||
function replaceStackTrace(str, replacement = '$1*$7$8\n') {
|
||||
return str.replace(stackFramesRegexp, replacement);
|
||||
}
|
||||
@@ -84,6 +88,7 @@ async function spawnAndAssert(filename, transform = (x) => x, { tty = false, ...
|
||||
module.exports = {
|
||||
assertSnapshot,
|
||||
getSnapshotPath,
|
||||
+ replaceNodeVersion,
|
||||
replaceFullPaths,
|
||||
replaceStackTrace,
|
||||
replaceWindowsLineEndings,
|
||||
diff --git a/test/fixtures/errors/force_colors.snapshot b/test/fixtures/errors/force_colors.snapshot
|
||||
index be1d45d0d8e8ba7b637754e32fe379cb2cf1e6ac..21410d492db861876ecfcb82dcc3c1815cba6d09 100644
|
||||
--- a/test/fixtures/errors/force_colors.snapshot
|
||||
+++ b/test/fixtures/errors/force_colors.snapshot
|
||||
@@ -4,11 +4,12 @@ throw new Error('Should include grayed stack trace')
|
||||
|
||||
Error: Should include grayed stack trace
|
||||
at Object.<anonymous> [90m(/[39mtest*force_colors.js:1:7[90m)[39m
|
||||
-[90m at Module._compile (node:internal*modules*cjs*loader:1241:14)[39m
|
||||
-[90m at Module._extensions..js (node:internal*modules*cjs*loader:1295:10)[39m
|
||||
-[90m at Module.load (node:internal*modules*cjs*loader:1091:32)[39m
|
||||
-[90m at Module._load (node:internal*modules*cjs*loader:938:12)[39m
|
||||
-[90m at Function.executeUserEntryPoint [as runMain] (node:internal*modules*run_main:83:12)[39m
|
||||
-[90m at node:internal*main*run_main_module:23:47[39m
|
||||
+[90m at *[39m
|
||||
+[90m at *[39m
|
||||
+[90m at *[39m
|
||||
+[90m at *[39m
|
||||
+[90m at *[39m
|
||||
+[90m at *[39m
|
||||
+[90m at *[39m
|
||||
|
||||
Node.js *
|
||||
diff --git a/test/fixtures/source-map/output/source_map_sourcemapping_url_string.snapshot b/test/fixtures/source-map/output/source_map_sourcemapping_url_string.snapshot
|
||||
index 2c1e11eeb9eab1bcb101f8f5af909461b26036ec..6a109c904e115503b743d5c4e0418ae693ca9856 100644
|
||||
--- a/test/fixtures/source-map/output/source_map_sourcemapping_url_string.snapshot
|
||||
+++ b/test/fixtures/source-map/output/source_map_sourcemapping_url_string.snapshot
|
||||
@@ -1,3 +1,3 @@
|
||||
Error: an exception.
|
||||
at Object.<anonymous> (*typescript-sourcemapping_url_string.ts:3:7)
|
||||
- at Module._compile (node:internal*modules*cjs*loader:1241:14)
|
||||
+ *
|
||||
diff --git a/test/parallel/test-node-output-errors.mjs b/test/parallel/test-node-output-errors.mjs
|
||||
index b08bcd40cdf26093e158c0bb9ae566c76f2c731e..bf8eacbac479a2bf5698ed29ede648e149f185b5 100644
|
||||
--- a/test/parallel/test-node-output-errors.mjs
|
||||
+++ b/test/parallel/test-node-output-errors.mjs
|
||||
@@ -10,15 +10,15 @@ const skipForceColors =
|
||||
process.config.variables.node_shared_openssl ||
|
||||
(common.isWindows && (Number(os.release().split('.')[0]) !== 10 || Number(os.release().split('.')[2]) < 14393)); // See https://github.com/nodejs/node/pull/33132
|
||||
|
||||
-
|
||||
-function replaceNodeVersion(str) {
|
||||
- return str.replaceAll(process.version, '*');
|
||||
-}
|
||||
-
|
||||
function replaceStackTrace(str) {
|
||||
return snapshot.replaceStackTrace(str, '$1at *$7\n');
|
||||
}
|
||||
|
||||
+function replaceForceColorsStackTrace(str) {
|
||||
+ // eslint-disable-next-line no-control-regex
|
||||
+ return str.replaceAll(/(\[90m\W+)at .*node:.*/g, '$1at *[39m');
|
||||
+}
|
||||
+
|
||||
describe('errors output', { concurrency: true }, () => {
|
||||
function normalize(str) {
|
||||
return str.replaceAll(snapshot.replaceWindowsPaths(process.cwd()), '')
|
||||
@@ -35,9 +35,12 @@ describe('errors output', { concurrency: true }, () => {
|
||||
}
|
||||
const common = snapshot
|
||||
.transform(snapshot.replaceWindowsLineEndings, snapshot.replaceWindowsPaths);
|
||||
- const defaultTransform = snapshot.transform(common, normalize, replaceNodeVersion);
|
||||
- const errTransform = snapshot.transform(common, normalizeNoNumbers, replaceNodeVersion);
|
||||
- const promiseTransform = snapshot.transform(common, replaceStackTrace, normalizeNoNumbers, replaceNodeVersion);
|
||||
+ const defaultTransform = snapshot.transform(common, normalize, snapshot.replaceNodeVersion);
|
||||
+ const errTransform = snapshot.transform(common, normalizeNoNumbers, snapshot.replaceNodeVersion);
|
||||
+ const promiseTransform = snapshot.transform(common, replaceStackTrace,
|
||||
+ normalizeNoNumbers, snapshot.replaceNodeVersion);
|
||||
+ const forceColorsTransform = snapshot.transform(common, normalize,
|
||||
+ replaceForceColorsStackTrace, snapshot.replaceNodeVersion);
|
||||
|
||||
const tests = [
|
||||
{ name: 'errors/async_error_eval_cjs.js' },
|
||||
@@ -57,7 +60,11 @@ describe('errors output', { concurrency: true }, () => {
|
||||
{ name: 'errors/throw_in_line_with_tabs.js', transform: errTransform },
|
||||
{ name: 'errors/throw_non_error.js', transform: errTransform },
|
||||
{ name: 'errors/promise_always_throw_unhandled.js', transform: promiseTransform },
|
||||
- { skip: skipForceColors, name: 'errors/force_colors.js', env: { FORCE_COLOR: 1 } },
|
||||
+ !skipForceColors ? {
|
||||
+ name: 'errors/force_colors.js',
|
||||
+ transform: forceColorsTransform,
|
||||
+ env: { FORCE_COLOR: 1 }
|
||||
+ } : null,
|
||||
];
|
||||
for (const { name, transform = defaultTransform, env, skip = false } of tests) {
|
||||
it(name, { skip }, async () => {
|
||||
diff --git a/test/parallel/test-node-output-sourcemaps.mjs b/test/parallel/test-node-output-sourcemaps.mjs
|
||||
index 2043fa57f06a8d2326a4ea1ba24341502c8b7471..b01f30765c7de81a4d956b9c1124affea0fc2aef 100644
|
||||
--- a/test/parallel/test-node-output-sourcemaps.mjs
|
||||
+++ b/test/parallel/test-node-output-sourcemaps.mjs
|
||||
@@ -4,10 +4,6 @@ import * as snapshot from '../common/assertSnapshot.js';
|
||||
import * as path from 'node:path';
|
||||
import { describe, it } from 'node:test';
|
||||
|
||||
-function replaceNodeVersion(str) {
|
||||
- return str.replaceAll(process.version, '*');
|
||||
-}
|
||||
-
|
||||
describe('sourcemaps output', { concurrency: true }, () => {
|
||||
function normalize(str) {
|
||||
const result = str
|
||||
@@ -16,7 +12,8 @@ describe('sourcemaps output', { concurrency: true }, () => {
|
||||
.replaceAll('/Users/bencoe/oss/coffee-script-test', '')
|
||||
.replaceAll(/\/(\w)/g, '*$1')
|
||||
.replaceAll('*test*', '*')
|
||||
- .replaceAll('*fixtures*source-map*', '*');
|
||||
+ .replaceAll('*fixtures*source-map*', '*')
|
||||
+ .replaceAll(/(\W+).*node:internal\*modules.*/g, '$1*');
|
||||
if (common.isWindows) {
|
||||
const currentDeviceLetter = path.parse(process.cwd()).root.substring(0, 1).toLowerCase();
|
||||
const regex = new RegExp(`${currentDeviceLetter}:/?`, 'gi');
|
||||
@@ -25,7 +22,8 @@ describe('sourcemaps output', { concurrency: true }, () => {
|
||||
return result;
|
||||
}
|
||||
const defaultTransform = snapshot
|
||||
- .transform(snapshot.replaceWindowsLineEndings, snapshot.replaceWindowsPaths, normalize, replaceNodeVersion);
|
||||
+ .transform(snapshot.replaceWindowsLineEndings, snapshot.replaceWindowsPaths,
|
||||
+ normalize, snapshot.replaceNodeVersion);
|
||||
|
||||
const tests = [
|
||||
{ name: 'source-map/output/source_map_disabled_by_api.js' },
|
||||
@@ -7,13 +7,13 @@ Instead of disabling the tests, flag them as flaky so they still run
|
||||
but don't cause CI failures on flakes.
|
||||
|
||||
diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status
|
||||
index fe8ddee7cbf05e0d4dbbe970cdc357ec6841390c..1ba65e26d293e9524e6c756b3a66693d46b4bdfd 100644
|
||||
index fa425fdcfc475ba2d5ba9a2492ea4481914a7cce..840c2f657467ede0e3737ea1aee55e07e39f353a 100644
|
||||
--- a/test/parallel/parallel.status
|
||||
+++ b/test/parallel/parallel.status
|
||||
@@ -7,6 +7,13 @@ prefix parallel
|
||||
@@ -5,6 +5,13 @@ prefix parallel
|
||||
# sample-test : PASS,FLAKY
|
||||
|
||||
[true] # This section applies to all platforms
|
||||
# https://github.com/nodejs/node/issues/49853
|
||||
test-runner-output: PASS,FLAKY
|
||||
+test-inspector-multisession-ws: PASS, FLAKY
|
||||
+test-heapsnapshot-near-heap-limit-by-api-in-worker: PASS, FLAKY
|
||||
+test-heapsnapshot-near-heap-limit-worker: PASS, FLAKY
|
||||
@@ -25,7 +25,7 @@ index fe8ddee7cbf05e0d4dbbe970cdc357ec6841390c..1ba65e26d293e9524e6c756b3a66693d
|
||||
[$system==win32]
|
||||
# https://github.com/nodejs/node/issues/41206
|
||||
diff --git a/test/sequential/sequential.status b/test/sequential/sequential.status
|
||||
index 5cefcb95773bedc80bc462e058a11045be176741..33f50be5898754af696468499bcfa8e3c721434d 100644
|
||||
index a5e2d38ff31aa8b90f3b99783b16cec086b4f30e..b8afe3d88b5af4756663f45fad81105e9b7f0e7e 100644
|
||||
--- a/test/sequential/sequential.status
|
||||
+++ b/test/sequential/sequential.status
|
||||
@@ -7,6 +7,18 @@ prefix sequential
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
chore_allow_customizing_microtask_policy_per_context.patch
|
||||
build_expose_mksnapshot_to_embedders.patch
|
||||
build_correctly_expose_public_symbols_with_v8_expose_public_symbols.patch
|
||||
deps_add_v8_object_setinternalfieldfornodecore.patch
|
||||
revert_api_dcheck-fail_when_we_reenter_v8_while_terminating.patch
|
||||
|
||||
@@ -1,220 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cheng Zhao <zcbenz@gmail.com>
|
||||
Date: Mon, 27 Nov 2023 20:02:16 +0900
|
||||
Subject: build: correctly expose public symbols with v8_expose_public_symbols
|
||||
|
||||
Backport: https://chromium-review.googlesource.com/c/v8/v8/+/5052302
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index 206f1084252a264b060239e7218331d88a858764..68633c7cad5d6c6d64eeae51bad44b6bf803c5ea 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -723,6 +723,10 @@ if (v8_enable_single_generation == true) {
|
||||
assert(!v8_enable_snapshot_compression || v8_use_zlib,
|
||||
"Snapshot compression requires zlib")
|
||||
|
||||
+if (v8_expose_public_symbols == "") {
|
||||
+ v8_expose_public_symbols = v8_expose_symbols
|
||||
+}
|
||||
+
|
||||
v8_random_seed = "314159265"
|
||||
v8_toolset_for_shell = "host"
|
||||
|
||||
@@ -757,6 +761,8 @@ config("internal_config") {
|
||||
]
|
||||
|
||||
if (is_component_build) {
|
||||
+ defines += [ "BUILDING_V8_SHARED_PRIVATE" ]
|
||||
+ } else if (v8_expose_public_symbols) {
|
||||
defines += [ "BUILDING_V8_SHARED" ]
|
||||
}
|
||||
|
||||
@@ -827,7 +833,10 @@ config("external_config") {
|
||||
configs = [ ":headers_config" ]
|
||||
defines = []
|
||||
if (is_component_build) {
|
||||
- defines += [ "USING_V8_SHARED" ]
|
||||
+ defines += [
|
||||
+ "USING_V8_SHARED",
|
||||
+ "USING_V8_SHARED_PRIVATE",
|
||||
+ ]
|
||||
}
|
||||
|
||||
if (current_cpu == "riscv64" || current_cpu == "riscv32") {
|
||||
diff --git a/gni/v8.gni b/gni/v8.gni
|
||||
index b2cc02ec80d468d5fb6ae55006aa6776901fe099..a72edb4ca320b933525ccaaf7f6bbfe805d509f9 100644
|
||||
--- a/gni/v8.gni
|
||||
+++ b/gni/v8.gni
|
||||
@@ -48,7 +48,11 @@ declare_args() {
|
||||
# Enable monolithic static library for embedders.
|
||||
v8_monolithic = false
|
||||
|
||||
- # Expose symbols for dynamic linking.
|
||||
+ # Expose public symbols for native modules of Node.js and Electron. Default
|
||||
+ # is false.
|
||||
+ v8_expose_public_symbols = ""
|
||||
+
|
||||
+ # Deprecated for v8_expose_public_symbols.
|
||||
v8_expose_symbols = false
|
||||
|
||||
# Implement tracing using Perfetto (https://perfetto.dev).
|
||||
@@ -86,7 +90,8 @@ declare_args() {
|
||||
# Enable runtime call stats.
|
||||
# TODO(liviurau): Remove old name after Chromium config update
|
||||
# https://crbug.com/1476977.
|
||||
- v8_enable_runtime_call_stats = !(is_on_release_branch || v8_is_on_release_branch)
|
||||
+ v8_enable_runtime_call_stats =
|
||||
+ !(is_on_release_branch || v8_is_on_release_branch)
|
||||
|
||||
# Add fuzzilli fuzzer support.
|
||||
v8_fuzzilli = false
|
||||
@@ -257,8 +262,7 @@ if (v8_symbol_level != symbol_level) {
|
||||
}
|
||||
}
|
||||
|
||||
-if ((is_posix || is_fuchsia) &&
|
||||
- (v8_enable_backtrace || v8_monolithic || v8_expose_symbols)) {
|
||||
+if ((is_posix || is_fuchsia) && (v8_enable_backtrace || v8_monolithic)) {
|
||||
v8_remove_configs += [ "//build/config/gcc:symbol_visibility_hidden" ]
|
||||
v8_add_configs += [ "//build/config/gcc:symbol_visibility_default" ]
|
||||
}
|
||||
diff --git a/include/v8config.h b/include/v8config.h
|
||||
index f407c289b1bd984d883a9b2a8670d21ba1eba7aa..ae42abde643f44349d3aecc1ab4e207982aa0d0f 100644
|
||||
--- a/include/v8config.h
|
||||
+++ b/include/v8config.h
|
||||
@@ -700,6 +700,11 @@ path. Add it with -I<path> to the command line
|
||||
#define V8_CLANG_NO_SANITIZE(what)
|
||||
#endif
|
||||
|
||||
+// Exposing private symbols requires exposing public symbols too.
|
||||
+#ifdef BUILDING_V8_SHARED_PRIVATE
|
||||
+#define BUILDING_V8_SHARED
|
||||
+#endif
|
||||
+
|
||||
#if defined(BUILDING_V8_SHARED) && defined(USING_V8_SHARED)
|
||||
#error Inconsistent build configuration: To build the V8 shared library \
|
||||
set BUILDING_V8_SHARED, to include its headers for linking against the \
|
||||
diff --git a/src/base/macros.h b/src/base/macros.h
|
||||
index 56ff8736b3000644905f128fd365797424761798..8994d888b508f41f1141c9d9b2f0bbe78919fea7 100644
|
||||
--- a/src/base/macros.h
|
||||
+++ b/src/base/macros.h
|
||||
@@ -388,9 +388,9 @@ bool is_inbounds(float_t v) {
|
||||
|
||||
// Setup for Windows shared library export.
|
||||
#define V8_EXPORT_ENUM
|
||||
-#ifdef BUILDING_V8_SHARED
|
||||
+#ifdef BUILDING_V8_SHARED_PRIVATE
|
||||
#define V8_EXPORT_PRIVATE __declspec(dllexport)
|
||||
-#elif USING_V8_SHARED
|
||||
+#elif USING_V8_SHARED_PRIVATE
|
||||
#define V8_EXPORT_PRIVATE __declspec(dllimport)
|
||||
#else
|
||||
#define V8_EXPORT_PRIVATE
|
||||
@@ -400,7 +400,7 @@ bool is_inbounds(float_t v) {
|
||||
|
||||
// Setup for Linux shared library export.
|
||||
#if V8_HAS_ATTRIBUTE_VISIBILITY
|
||||
-#ifdef BUILDING_V8_SHARED
|
||||
+#ifdef BUILDING_V8_SHARED_PRIVATE
|
||||
#define V8_EXPORT_PRIVATE __attribute__((visibility("default")))
|
||||
#define V8_EXPORT_ENUM V8_EXPORT_PRIVATE
|
||||
#else
|
||||
diff --git a/src/common/ptr-compr-inl.h b/src/common/ptr-compr-inl.h
|
||||
index d5a3d5a55bfa860e19765e62c1b1c77285859d85..4a9ec6f448496daa103bd996729e9db725d68a64 100644
|
||||
--- a/src/common/ptr-compr-inl.h
|
||||
+++ b/src/common/ptr-compr-inl.h
|
||||
@@ -44,7 +44,8 @@ Address V8HeapCompressionScheme::GetPtrComprCageBaseAddress(
|
||||
// static
|
||||
void V8HeapCompressionScheme::InitBase(Address base) {
|
||||
CHECK_EQ(base, GetPtrComprCageBaseAddress(base));
|
||||
-#if defined(USING_V8_SHARED) && defined(V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE)
|
||||
+#if defined(USING_V8_SHARED_PRIVATE) && \
|
||||
+ defined(V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE)
|
||||
set_base_non_inlined(base);
|
||||
#else
|
||||
base_ = base;
|
||||
@@ -53,7 +54,8 @@ void V8HeapCompressionScheme::InitBase(Address base) {
|
||||
|
||||
// static
|
||||
V8_CONST Address V8HeapCompressionScheme::base() {
|
||||
-#if defined(USING_V8_SHARED) && defined(V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE)
|
||||
+#if defined(USING_V8_SHARED_PRIVATE) && \
|
||||
+ defined(V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE)
|
||||
Address base = base_non_inlined();
|
||||
#else
|
||||
Address base = base_;
|
||||
@@ -148,7 +150,8 @@ Address ExternalCodeCompressionScheme::GetPtrComprCageBaseAddress(
|
||||
// static
|
||||
void ExternalCodeCompressionScheme::InitBase(Address base) {
|
||||
CHECK_EQ(base, PrepareCageBaseAddress(base));
|
||||
-#if defined(USING_V8_SHARED) && defined(V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE)
|
||||
+#if defined(USING_V8_SHARED_PRIVATE) && \
|
||||
+ defined(V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE)
|
||||
set_base_non_inlined(base);
|
||||
#else
|
||||
base_ = base;
|
||||
@@ -157,7 +160,8 @@ void ExternalCodeCompressionScheme::InitBase(Address base) {
|
||||
|
||||
// static
|
||||
V8_CONST Address ExternalCodeCompressionScheme::base() {
|
||||
-#if defined(USING_V8_SHARED) && defined(V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE)
|
||||
+#if defined(USING_V8_SHARED_PRIVATE) && \
|
||||
+ defined(V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE)
|
||||
Address base = base_non_inlined();
|
||||
#else
|
||||
Address base = base_;
|
||||
diff --git a/src/trap-handler/trap-handler.h b/src/trap-handler/trap-handler.h
|
||||
index 289a755d3b119cd90b88ee9d76ea13b709fe3a80..674706220c64d63727b8bd461903abd5412fc137 100644
|
||||
--- a/src/trap-handler/trap-handler.h
|
||||
+++ b/src/trap-handler/trap-handler.h
|
||||
@@ -58,11 +58,11 @@ namespace trap_handler {
|
||||
#endif
|
||||
|
||||
// Setup for shared library export.
|
||||
-#if defined(BUILDING_V8_SHARED) && defined(V8_OS_WIN)
|
||||
+#if defined(BUILDING_V8_SHARED_PRIVATE) && defined(V8_OS_WIN)
|
||||
#define TH_EXPORT_PRIVATE __declspec(dllexport)
|
||||
-#elif defined(BUILDING_V8_SHARED)
|
||||
+#elif defined(BUILDING_V8_SHARED_PRIVATE)
|
||||
#define TH_EXPORT_PRIVATE __attribute__((visibility("default")))
|
||||
-#elif defined(USING_V8_SHARED) && defined(V8_OS_WIN)
|
||||
+#elif defined(USING_V8_SHARED_PRIVATE) && defined(V8_OS_WIN)
|
||||
#define TH_EXPORT_PRIVATE __declspec(dllimport)
|
||||
#else
|
||||
#define TH_EXPORT_PRIVATE
|
||||
diff --git a/src/utils/v8dll-main.cc b/src/utils/v8dll-main.cc
|
||||
index 9bdd97f365a87994b2648456eb2b9759e58f1109..c153431a7321129c8b52288a65280deac6aad33b 100644
|
||||
--- a/src/utils/v8dll-main.cc
|
||||
+++ b/src/utils/v8dll-main.cc
|
||||
@@ -5,6 +5,7 @@
|
||||
// The GYP based build ends up defining USING_V8_SHARED when compiling this
|
||||
// file.
|
||||
#undef USING_V8_SHARED
|
||||
+#undef USING_V8_SHARED_PRIVATE
|
||||
#include "include/v8config.h"
|
||||
|
||||
#if V8_OS_WIN
|
||||
diff --git a/third_party/googletest/BUILD.gn b/third_party/googletest/BUILD.gn
|
||||
index bc82c635da35c2a98162acad470d8fcc56019255..1cf84b3d8f495128d4d008823b1a7028630cb902 100644
|
||||
--- a/third_party/googletest/BUILD.gn
|
||||
+++ b/third_party/googletest/BUILD.gn
|
||||
@@ -94,8 +94,7 @@ source_set("gtest") {
|
||||
# V8-only workaround for http://crbug.com/chromium/1191946. Ensures that
|
||||
# googletest is compiled with the same visibility such as the rest of V8, see
|
||||
# https://source.chromium.org/chromium/chromium/src/+/master:v8/gni/v8.gni
|
||||
- if ((is_posix || is_fuchsia) &&
|
||||
- (v8_enable_backtrace || v8_monolithic || v8_expose_symbols)) {
|
||||
+ if ((is_posix || is_fuchsia) && (v8_enable_backtrace || v8_monolithic)) {
|
||||
configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
|
||||
configs += [ "//build/config/gcc:symbol_visibility_default" ]
|
||||
}
|
||||
@@ -147,8 +146,7 @@ source_set("gmock") {
|
||||
# V8-only workaround for http://crbug.com/chromium/1191946. Ensures that
|
||||
# googletest is compiled with the same visibility such as the rest of V8, see
|
||||
# https://source.chromium.org/chromium/chromium/src/+/master:v8/gni/v8.gni
|
||||
- if ((is_posix || is_fuchsia) &&
|
||||
- (v8_enable_backtrace || v8_monolithic || v8_expose_symbols)) {
|
||||
+ if ((is_posix || is_fuchsia) && (v8_enable_backtrace || v8_monolithic)) {
|
||||
configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
|
||||
configs += [ "//build/config/gcc:symbol_visibility_default" ]
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cheng Zhao <zcbenz@gmail.com>
|
||||
Date: Wed, 22 Nov 2023 17:21:29 +0900
|
||||
Subject: build: expose mksnapshot to embedders
|
||||
|
||||
Backport: https://chromium-review.googlesource.com/c/v8/v8/+/5052522
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index 17a0e5dd1a693b0f461396d9dcfb9ea812885472..206f1084252a264b060239e7218331d88a858764 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -6913,8 +6913,6 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
|
||||
if (current_toolchain == v8_snapshot_toolchain) {
|
||||
v8_executable("mksnapshot") {
|
||||
- visibility = [ ":*" ] # Only targets in this file can depend on this.
|
||||
-
|
||||
sources = [
|
||||
"src/snapshot/embedded/embedded-empty.cc",
|
||||
"src/snapshot/embedded/embedded-file-writer.cc",
|
||||
@@ -46,10 +46,10 @@ index 6cdf53b19c7d058bb66b9fcbe745874cc48daa99..8d112008c2667db97ed5b5af3f87c40d
|
||||
V8_INLINE static void* GetAlignedPointerFromInternalField(
|
||||
const BasicTracedReference<Object>& object, int index) {
|
||||
diff --git a/src/api/api.cc b/src/api/api.cc
|
||||
index 694aec891a48337fa0387d60bcc34e05752ff2f0..a4931493e9d1a5cb0d5aded2611729f630819dc5 100644
|
||||
index 759fff5cbeb291b0ae4eea140b2c0554fa2cae16..9a01bf15dc8e2353a3ef1490707fa7a015a41cff 100644
|
||||
--- a/src/api/api.cc
|
||||
+++ b/src/api/api.cc
|
||||
@@ -6318,14 +6318,33 @@ Local<Data> v8::Object::SlowGetInternalField(int index) {
|
||||
@@ -6320,14 +6320,33 @@ Local<Data> v8::Object::SlowGetInternalField(int index) {
|
||||
isolate);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: clavin <clavin@DESKTOP-QVNUS47.fastel.com>
|
||||
Date: Thu, 7 Dec 2023 16:11:40 -0500
|
||||
Subject: Revert "[api] DCHECK-fail when we reenter V8 while terminating"
|
||||
|
||||
This reverts commit 3eed17c6a12a0f33639aa5cffb822ebe42931ec8.
|
||||
|
||||
This change causes Electron to crash. :(
|
||||
|
||||
This patch is meant to be temporary and should be removed after more
|
||||
investigation and potentially a refactor.
|
||||
|
||||
Xref: https://chromium-review.googlesource.com/c/v8/v8/+/5075293
|
||||
Xref: https://github.com/electron/electron/issues/40741
|
||||
|
||||
diff --git a/src/api/api-macros.h b/src/api/api-macros.h
|
||||
index fa272148c4553a2cbfe2438b2770d2fe5cde9a38..08fa9f799b217eb1565d28aa4f86eb5e0001422e 100644
|
||||
--- a/src/api/api-macros.h
|
||||
+++ b/src/api/api-macros.h
|
||||
@@ -48,7 +48,9 @@
|
||||
#define ENTER_V8_HELPER_INTERNAL(i_isolate, context, class_name, \
|
||||
function_name, bailout_value, \
|
||||
HandleScopeClass, do_callback) \
|
||||
- DCHECK(!i_isolate->is_execution_terminating()); \
|
||||
+ if (i_isolate->is_execution_terminating()) { \
|
||||
+ return bailout_value; \
|
||||
+ } \
|
||||
HandleScopeClass handle_scope(i_isolate); \
|
||||
CallDepthScope<do_callback> call_depth_scope(i_isolate, context); \
|
||||
API_RCS_SCOPE(i_isolate, class_name, function_name); \
|
||||
@@ -56,7 +58,9 @@
|
||||
bool has_pending_exception = false
|
||||
|
||||
#define PREPARE_FOR_DEBUG_INTERFACE_EXECUTION_WITH_ISOLATE(i_isolate, T) \
|
||||
- DCHECK(!i_isolate->is_execution_terminating()); \
|
||||
+ if (i_isolate->is_execution_terminating()) { \
|
||||
+ return MaybeLocal<T>(); \
|
||||
+ } \
|
||||
InternalEscapableScope handle_scope(i_isolate); \
|
||||
CallDepthScope<false> call_depth_scope(i_isolate, v8::Local<v8::Context>()); \
|
||||
i::VMState<v8::OTHER> __state__((i_isolate)); \
|
||||
@@ -1,5 +1,6 @@
|
||||
[
|
||||
"abort/test-abort-backtrace",
|
||||
"es-module/test-vm-compile-function-lineoffset",
|
||||
"parallel/test-bootstrap-modules",
|
||||
"parallel/test-child-process-fork-exec-path",
|
||||
"parallel/test-code-cache",
|
||||
@@ -21,9 +22,9 @@
|
||||
"parallel/test-dgram-send-cb-quelches-error",
|
||||
"parallel/test-fs-utimes-y2K38",
|
||||
"parallel/test-http2-clean-output",
|
||||
"parallel/test-http2-https-fallback.js",
|
||||
"parallel/test-http2-server-unknown-protocol.js",
|
||||
"parallel/test-tls-alpn-server-client.js",
|
||||
"parallel/test-http2-https-fallback",
|
||||
"parallel/test-http2-server-unknown-protocol",
|
||||
"parallel/test-tls-alpn-server-client",
|
||||
"parallel/test-https-agent-session-reuse",
|
||||
"parallel/test-https-options-boolean-check",
|
||||
"parallel/test-icu-env",
|
||||
|
||||
@@ -158,7 +158,7 @@ int NodeMain(int argc, char* argv[]) {
|
||||
|
||||
// Initialize feature list.
|
||||
auto feature_list = std::make_unique<base::FeatureList>();
|
||||
feature_list->InitializeFromCommandLine("", "");
|
||||
feature_list->InitFromCommandLine("", "");
|
||||
base::FeatureList::SetInstance(std::move(feature_list));
|
||||
|
||||
// Explicitly register electron's builtin bindings.
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
#include "ui/base/x/x11_display_util.h"
|
||||
#include "ui/base/x/x11_util.h"
|
||||
#include "ui/display/util/edid_parser.h" // nogncheck
|
||||
#include "ui/gfx/x/atom_cache.h"
|
||||
#include "ui/gfx/x/randr.h"
|
||||
#include "ui/gfx/x/x11_atom_cache.h"
|
||||
#endif // defined(USE_OZONE_PLATFORM_X11)
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ void InitializeFeatureList() {
|
||||
// 'custom dictionary word list API' spec to crash.
|
||||
std::string(",") + spellcheck::kWinDelaySpellcheckServiceInit.name;
|
||||
#endif
|
||||
base::FeatureList::InitializeInstance(enable_features, disable_features);
|
||||
base::FeatureList::InitInstance(enable_features, disable_features);
|
||||
}
|
||||
|
||||
void InitializeFieldTrials() {
|
||||
|
||||
@@ -73,9 +73,9 @@
|
||||
#include "shell/browser/ui/x/event_disabler.h"
|
||||
#include "shell/browser/ui/x/x_window_utils.h"
|
||||
#include "ui/base/x/x11_util.h"
|
||||
#include "ui/gfx/x/atom_cache.h"
|
||||
#include "ui/gfx/x/connection.h"
|
||||
#include "ui/gfx/x/shape.h"
|
||||
#include "ui/gfx/x/x11_atom_cache.h"
|
||||
#include "ui/gfx/x/xproto.h"
|
||||
#endif
|
||||
#if defined(USE_OZONE)
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
#include "components/viz/common/frame_sinks/delay_based_time_source.h"
|
||||
#include "components/viz/common/quads/compositor_render_pass.h"
|
||||
#include "content/browser/renderer_host/cursor_manager.h" // nogncheck
|
||||
#include "content/browser/renderer_host/input/synthetic_gesture_target.h" // nogncheck
|
||||
#include "content/browser/renderer_host/render_widget_host_delegate.h" // nogncheck
|
||||
#include "content/browser/renderer_host/render_widget_host_owner_delegate.h" // nogncheck
|
||||
#include "content/common/input/synthetic_gesture.h" // nogncheck
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/context_factory.h"
|
||||
|
||||
@@ -35,6 +35,10 @@ class TrayIconCocoa : public TrayIcon {
|
||||
void SetContextMenu(raw_ptr<ElectronMenuModel> menu_model) override;
|
||||
gfx::Rect GetBounds() override;
|
||||
|
||||
base::WeakPtr<TrayIconCocoa> GetWeakPtr() {
|
||||
return weak_factory_.GetWeakPtr();
|
||||
}
|
||||
|
||||
private:
|
||||
// Electron custom view for NSStatusItem.
|
||||
StatusItemView* __strong status_item_view_;
|
||||
|
||||
@@ -249,7 +249,15 @@
|
||||
useDefaultAccelerator:NO];
|
||||
// Hacky way to mimic design of ordinary tray menu.
|
||||
[statusItem_ setMenu:[menuController menu]];
|
||||
base::WeakPtr<electron::TrayIconCocoa> weak_tray_icon =
|
||||
trayIcon_->GetWeakPtr();
|
||||
[[statusItem_ button] performClick:self];
|
||||
// /⚠️ \ Warning! Arbitrary JavaScript and who knows what else has been run
|
||||
// during -performClick:. This object may have been deleted.
|
||||
// We check if |trayIcon_| is still alive as it owns us and has the same
|
||||
// lifetime.
|
||||
if (!weak_tray_icon)
|
||||
return;
|
||||
[statusItem_ setMenu:[menuController_ menu]];
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "shell/browser/ui/views/frameless_view.h"
|
||||
#include "ui/base/hit_test.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/models/image_model.h"
|
||||
#include "ui/gfx/canvas.h"
|
||||
#include "ui/gfx/font_list.h"
|
||||
#include "ui/gfx/geometry/insets.h"
|
||||
@@ -380,9 +381,9 @@ void ClientFrameViewLinux::UpdateButtonImages() {
|
||||
state_id++) {
|
||||
views::Button::ButtonState state =
|
||||
static_cast<views::Button::ButtonState>(state_id);
|
||||
button.button->SetImage(
|
||||
state, nav_button_provider_->GetImage(
|
||||
button.type, ButtonStateToNavButtonProviderState(state)));
|
||||
button.button->SetImageModel(
|
||||
state, ui::ImageModel::FromImageSkia(nav_button_provider_->GetImage(
|
||||
button.type, ButtonStateToNavButtonProviderState(state))));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
#include "dbus/object_proxy.h"
|
||||
#include "shell/common/thread_restrictions.h"
|
||||
#include "ui/base/x/x11_util.h"
|
||||
#include "ui/gfx/x/atom_cache.h"
|
||||
#include "ui/gfx/x/connection.h"
|
||||
#include "ui/gfx/x/x11_atom_cache.h"
|
||||
#include "ui/gfx/x/xproto.h"
|
||||
|
||||
namespace electron {
|
||||
@@ -28,7 +28,8 @@ void SetWMSpecState(x11::Window window, bool enabled, x11::Atom state) {
|
||||
|
||||
void SetWindowType(x11::Window window, const std::string& type) {
|
||||
std::string type_prefix = "_NET_WM_WINDOW_TYPE_";
|
||||
x11::Atom window_type = x11::GetAtom(type_prefix + base::ToUpperASCII(type));
|
||||
std::string window_type_str = type_prefix + base::ToUpperASCII(type);
|
||||
x11::Atom window_type = x11::GetAtom(window_type_str.c_str());
|
||||
auto* connection = x11::Connection::Get();
|
||||
connection->SetProperty(window, x11::GetAtom("_NET_WM_WINDOW_TYPE"),
|
||||
x11::Atom::ATOM, window_type);
|
||||
|
||||
@@ -202,6 +202,7 @@ const device::mojom::UsbDeviceInfo* ElectronUsbDelegate::GetDeviceInfo(
|
||||
|
||||
bool ElectronUsbDelegate::HasDevicePermission(
|
||||
content::BrowserContext* browser_context,
|
||||
content::RenderFrameHost* frame,
|
||||
const url::Origin& origin,
|
||||
const device::mojom::UsbDeviceInfo& device) {
|
||||
if (IsDevicePermissionAutoGranted(origin, device))
|
||||
|
||||
@@ -57,6 +57,7 @@ class ElectronUsbDelegate : public content::UsbDelegate {
|
||||
content::BrowserContext* browser_context,
|
||||
const std::string& guid) override;
|
||||
bool HasDevicePermission(content::BrowserContext* browser_context,
|
||||
content::RenderFrameHost* frame,
|
||||
const url::Origin& origin,
|
||||
const device::mojom::UsbDeviceInfo& device) override;
|
||||
void GetDevices(
|
||||
|
||||
@@ -57,112 +57,34 @@
|
||||
"id": "Tab",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"minimum": -1,
|
||||
"optional": true,
|
||||
"description": "The ID of the tab. Tab IDs are unique within a browser session. Under some circumstances a tab may not be assigned an ID; for example, when querying foreign tabs using the $(ref:sessions) API, in which case a session ID may be present. Tab ID can also be set to <code>chrome.tabs.TAB_ID_NONE</code> for apps and devtools windows."
|
||||
},
|
||||
"index": {
|
||||
"type": "integer",
|
||||
"minimum": -1,
|
||||
"description": "The zero-based index of the tab within its window."
|
||||
},
|
||||
"groupId": {
|
||||
"type": "integer",
|
||||
"minimum": -1,
|
||||
"description": "The ID of the group that the tab belongs to."
|
||||
},
|
||||
"windowId": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "The ID of the window that contains the tab."
|
||||
},
|
||||
"openerTabId": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"optional": true,
|
||||
"description": "The ID of the tab that opened this tab, if any. This property is only present if the opener tab still exists."
|
||||
},
|
||||
"selected": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the tab is selected.",
|
||||
"deprecated": "Please use $(ref:tabs.Tab.highlighted)."
|
||||
},
|
||||
"highlighted": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the tab is highlighted."
|
||||
},
|
||||
"active": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the tab is active in its window. Does not necessarily mean the window is focused."
|
||||
},
|
||||
"pinned": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the tab is pinned."
|
||||
},
|
||||
"audible": {
|
||||
"type": "boolean",
|
||||
"optional": true,
|
||||
"description": "Whether the tab has produced sound over the past couple of seconds (but it might not be heard if also muted). Equivalent to whether the 'speaker audio' indicator is showing."
|
||||
},
|
||||
"discarded": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the tab is discarded. A discarded tab is one whose content has been unloaded from memory, but is still visible in the tab strip. Its content is reloaded the next time it is activated."
|
||||
},
|
||||
"autoDiscardable": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the tab can be discarded automatically by the browser when resources are low."
|
||||
},
|
||||
"mutedInfo": {
|
||||
"$ref": "MutedInfo",
|
||||
"optional": true,
|
||||
"description": "The tab's muted state and the reason for the last state change."
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": "The last committed URL of the main frame of the tab. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission and may be an empty string if the tab has not yet committed. See also $(ref:Tab.pendingUrl)."
|
||||
},
|
||||
"pendingUrl": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": "The URL the tab is navigating to, before it has committed. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission and there is a pending navigation."
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": "The title of the tab. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission."
|
||||
},
|
||||
"favIconUrl": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": "The URL of the tab's favicon. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission. It may also be an empty string if the tab is loading."
|
||||
},
|
||||
"id": {"type": "integer", "minimum": -1, "optional": true, "description": "The ID of the tab. Tab IDs are unique within a browser session. Under some circumstances a tab may not be assigned an ID; for example, when querying foreign tabs using the $(ref:sessions) API, in which case a session ID may be present. Tab ID can also be set to <code>chrome.tabs.TAB_ID_NONE</code> for apps and devtools windows."},
|
||||
// TODO(kalman): Investigate how this is ending up as -1 (based on window type? a bug?) and whether it should be optional instead.
|
||||
"index": {"type": "integer", "minimum": -1, "description": "The zero-based index of the tab within its window."},
|
||||
"groupId": {"type": "integer", "minimum": -1, "description": "The ID of the group that the tab belongs to."},
|
||||
"windowId": {"type": "integer", "minimum": 0, "description": "The ID of the window that contains the tab."},
|
||||
"openerTabId": {"type": "integer", "minimum": 0, "optional": true, "description": "The ID of the tab that opened this tab, if any. This property is only present if the opener tab still exists."},
|
||||
"selected": {"type": "boolean", "description": "Whether the tab is selected.", "deprecated": "Please use $(ref:tabs.Tab.highlighted)."},
|
||||
"lastAccessed": {"type": "number", "optional": true, "description": "The last time the tab was accessed as the number of milliseconds since epoch."},
|
||||
"highlighted": {"type": "boolean", "description": "Whether the tab is highlighted."},
|
||||
"active": {"type": "boolean", "description": "Whether the tab is active in its window. Does not necessarily mean the window is focused."},
|
||||
"pinned": {"type": "boolean", "description": "Whether the tab is pinned."},
|
||||
"audible": {"type": "boolean", "optional": true, "description": "Whether the tab has produced sound over the past couple of seconds (but it might not be heard if also muted). Equivalent to whether the 'speaker audio' indicator is showing."},
|
||||
"discarded": {"type": "boolean", "description": "Whether the tab is discarded. A discarded tab is one whose content has been unloaded from memory, but is still visible in the tab strip. Its content is reloaded the next time it is activated."},
|
||||
"autoDiscardable": {"type": "boolean", "description": "Whether the tab can be discarded automatically by the browser when resources are low."},
|
||||
"mutedInfo": {"$ref": "MutedInfo", "optional": true, "description": "The tab's muted state and the reason for the last state change."},
|
||||
"url": {"type": "string", "optional": true, "description": "The last committed URL of the main frame of the tab. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission and may be an empty string if the tab has not yet committed. See also $(ref:Tab.pendingUrl)."},
|
||||
"pendingUrl": {"type": "string", "optional": true, "description": "The URL the tab is navigating to, before it has committed. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission and there is a pending navigation."},
|
||||
"title": {"type": "string", "optional": true, "description": "The title of the tab. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission."},
|
||||
"favIconUrl": {"type": "string", "optional": true, "description": "The URL of the tab's favicon. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission. It may also be an empty string if the tab is loading."},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"$ref": "TabStatus",
|
||||
"optional": true,
|
||||
"description": "Either <em>loading</em> or <em>complete</em>."
|
||||
"description": "The tab's loading status."
|
||||
},
|
||||
"incognito": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the tab is in an incognito window."
|
||||
},
|
||||
"width": {
|
||||
"type": "integer",
|
||||
"optional": true,
|
||||
"description": "The width of the tab in pixels."
|
||||
},
|
||||
"height": {
|
||||
"type": "integer",
|
||||
"optional": true,
|
||||
"description": "The height of the tab in pixels."
|
||||
},
|
||||
"sessionId": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": "The session ID used to uniquely identify a tab obtained from the $(ref:sessions) API."
|
||||
}
|
||||
"incognito": {"type": "boolean", "description": "Whether the tab is in an incognito window."},
|
||||
"width": {"type": "integer", "optional": true, "description": "The width of the tab in pixels."},
|
||||
"height": {"type": "integer", "optional": true, "description": "The height of the tab in pixels."},
|
||||
"sessionId": {"type": "string", "optional": true, "description": "The session ID used to uniquely identify a tab obtained from the $(ref:sessions) API."}
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1086,4 +1008,4 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
@@ -391,8 +391,8 @@ v8::MaybeLocal<v8::Value> PassValueToOtherContext(
|
||||
blink::WebElement::FromV8Value(destination_context->GetIsolate(), value);
|
||||
if (!elem.IsNull()) {
|
||||
v8::Context::Scope destination_context_scope(destination_context);
|
||||
return v8::MaybeLocal<v8::Value>(elem.ToV8Value(
|
||||
destination_context->Global(), destination_context->GetIsolate()));
|
||||
return v8::MaybeLocal<v8::Value>(
|
||||
elem.ToV8Value(destination_context->GetIsolate()));
|
||||
}
|
||||
|
||||
// Custom logic to "clone" Blob references
|
||||
|
||||
@@ -5,7 +5,6 @@ import * as Busboy from 'busboy';
|
||||
import * as path from 'node:path';
|
||||
import { ifdescribe, ifit, defer, startRemoteControlApp, repeatedly, listen } from './lib/spec-helpers';
|
||||
import { app } from 'electron/main';
|
||||
import { crashReporter } from 'electron/common';
|
||||
import { EventEmitter } from 'node:events';
|
||||
import * as fs from 'node:fs';
|
||||
import * as uuid from 'uuid';
|
||||
@@ -583,16 +582,20 @@ ifdescribe(!isLinuxOnArm && !process.mas && !process.env.DISABLE_CRASH_REPORTER_
|
||||
});
|
||||
|
||||
describe('start() option validation', () => {
|
||||
it('requires that the submitURL option be specified', () => {
|
||||
expect(() => {
|
||||
it('requires that the submitURL option be specified', async () => {
|
||||
const { remotely } = await startRemoteControlApp();
|
||||
await expect(remotely(() => {
|
||||
const { crashReporter } = require('electron');
|
||||
crashReporter.start({} as any);
|
||||
}).to.throw('submitURL must be specified when uploadToServer is true');
|
||||
})).to.be.rejectedWith('submitURL must be specified when uploadToServer is true');
|
||||
});
|
||||
|
||||
it('allows the submitURL option to be omitted when uploadToServer is false', () => {
|
||||
expect(() => {
|
||||
it('allows the submitURL option to be omitted when uploadToServer is false', async () => {
|
||||
const { remotely } = await startRemoteControlApp();
|
||||
await expect(remotely(() => {
|
||||
const { crashReporter } = require('electron');
|
||||
crashReporter.start({ uploadToServer: false } as any);
|
||||
}).not.to.throw();
|
||||
})).to.be.fulfilled();
|
||||
});
|
||||
|
||||
it('can be called twice', async () => {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user