mirror of
https://github.com/electron/electron.git
synced 2026-10-28 11:44:46 +08:00
* chore: bump chromium in DEPS to 156.0.8073.0 * 8409748: Update RenderWidgetHostViewBase::host_ lifetime Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8409748 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8410048: [dcheck-to-check] Convert DCHECKs in content/browser/ [34/n] Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8410048 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8401889: [Win] Read GetLastError() right after CreateFile() in ProcessSingleton Upstream now reads GetLastError() inside the TRACE_EVENT0 scope, which is the same fix this patch carried, so drop that hunk. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8401889 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8293899: Android: Enable ThemeService for WebUI NTP Upstream moved the //chrome/browser/themes dependency from a per-platform conditional into the unconditional deps of the mixers target, so the patch now removes it from that list instead. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8293899 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8412026: [mac] Support video capture lock on macOS Keep the compositor unsuspended when the window is headless, visible, or has an active video capture lock. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8412026 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8404074: [posix] Don't call SetNonBlocking() inside DCHECK() in ProcessSingleton Upstream made the same change, so drop the hunk from this patch. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8404074 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8421647: media: Move GPU/graphics client utilities to media/gfx/ Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8421647 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8361191: [api] Add MicrotaskQueue::SetMicrotasksPolicy()/GetMicrotasksPolicy() V8 now exposes the per-queue microtasks policy on v8::MicrotaskQueue, so remove the patch that added it and switch node_util.cc to the upstream SetMicrotasksPolicy()/GetMicrotasksPolicy() names. Ref: https://chromium-review.googlesource.com/c/v8/v8/+/8361191 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: remove upstreamed patches Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8455783 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8455325 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8431509 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8402403 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8402402 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: update patches * chore: update siso revision * 8426326: Linux: Rename DarkModeManagerLinux to PortalSettingsLinux Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8426326 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8278613: Plumb navigation IDs to MIME handler streams Pass the navigation ID through StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent to the MIME handler stream manager, and only create the plugin response interceptor throttle for navigation requests, matching the upstream ChromeContentBrowserClient change. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8278613 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8403343: Bump clang revision The new clang package ships the raw_ptr plugin change from crrev.com/c/8358382, after which [chromium-containers] rejects T* template arguments in std::list, std::set and std::vector fields. Store raw_ptr<T> in those Electron containers instead. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8403343 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8362297: viz: Add `is_secure` flag to CopyOutputRequest and friends The new is_secure member brings VideoCaptureParams, together with the use_native_picker field this patch adds, over the chromium-style complexity threshold, so the implicit inline copy constructor is now rejected. Declare out-of-line copy and move constructors and assignment operators for the struct in the patch. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8362297 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8442576: Remove id from ChildProcessData Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8442576 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8421383: [RWS] Remove unused RWS cookie exclusion reason Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8421383 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8240331: Support targeting a network in NetworkService's WebSockets Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8240331 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8426064: Remove flag for restrict frame destinations to navigate The frame-destination check is now unconditional upstream, so drop the feature flag check in net.request. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8426064 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8292633: [atmemory] Add `blink::mojom::ScrollType` to the Autofill scroll callstack Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8292633 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8405125: FSA: rename UserAction to AccessTrigger and add programmatic triggers The former UserAction::kNone case is now split into AccessTrigger::kProgrammaticRead and kProgrammaticWrite; both keep the previous behavior of not granting access automatically and of replying to sensitive entry checks without prompting. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8405125 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8399046: Add chrome:// host and path mapping for component extensions ExtensionConfigMap::GetConfigProvider() now takes an Extension; use the new GetConfigProviderByExtensionId() for the id-based lookup. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8399046 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8445301: [Linux] Decouple //components/dbus from //ui/base and //net The //components/dbus component no longer depends on //components/dbus/menu, so depend on it directly for status_icon_linux_dbus.cc. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8445301 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8360557: [Extensions] Make generated features immutable FeatureProvider::AddFeature() no longer replaces an existing feature, so the entries Electron's feature files used to override core ones now fail a CHECK at startup. Drop the ones that duplicate the core definitions, or differ only in ChromeOS-only branches. Keep chrome.webstorePrivate unavailable by moving its delegated availability check into the core definition with a patch. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8360557 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 8427384: Generate CDP TypeScript definitions directly from in-tree PDL files Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8427384 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fixup! 8403343: Bump clang revision * chore: update patches Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 8397345: Move titlebar_config.h to chrome/browser/win The move switched the color mixers' Windows dependency from the narrow titlebar_config target to all of //chrome/browser/win, although the mixer uses nothing from it. On Windows that pulls //chrome/browser/profiles into Electron's link, where its ProfileKeyedServiceFactory collides with the one Electron provides for the spellchecker. Patch the unused dependency out. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8397345 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 8403320: [WebUI] Disallow devtools:// scheme for WebUI data sources by default URL data sources are no longer served to devtools:// unless they opt in, so DevTools failed to load its frontend. Opt Electron's bundle data source in, and let its theme data source serve colors.css to devtools:// as Chrome's ThemeSource does. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8403320 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 8394377: Migrate RefCountedDeleteOnSequence to start-from-one ref counting (4/4) Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8394377 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: bump chromium in DEPS to 156.0.8075.0 * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> * 8467669: [zoom] Key host-less zoom levels on the URL without its fragment Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8467669 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: update patches Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: bump chromium in DEPS to 156.0.8076.0 * 8468407: [gtk] Don't leave GDK_BACKEND set in the environment after GTK init Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8468407 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8457646: [snapshot] Include embedder string in version hash Upstream moved Version::Hash() out of line and now builds it with base::Hasher over the version number and embedder string. Fold the v8_version_hash_salt into that hasher the same way instead of carrying a separate FNV-1a helper and hash_combine() call. Ref: https://chromium-review.googlesource.com/c/v8/v8/+/8457646 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: update patches * 8459447: gin: Mark the stack-only helper classes STACK_ALLOCATED() gin::Dictionary is now STACK_ALLOCATED(), and the find-bad-constructs plugin conservatively treats any template instantiated with a stack-allocated type argument as stack-allocated too. Mark the two gin_helper::Promise<gin_helper::Dictionary> fields with STACK_ALLOCATED_IGNORE, since Promise<T> only names T as its resolve type and never stores one. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8459447 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8424587: mojo: Remove unused WrapPlatformFile and UnwrapPlatformFile helpers Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8424587 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fixup! 8403343: Bump clang revision notifications_ is now a std::set<raw_ptr<Notification>>, and libc++ has no heterogeneous set::erase, so erasing by key after Dismiss() built a temporary raw_ptr from the notification. On macOS Dismiss() has already destroyed it by then, so that took a BackupRefPtr reference on freed memory. Find it with the transparent comparator, which compares addresses without constructing a raw_ptr, and erase by iterator. Also drop NotifyIconHost::NotifyIcons, unused since notify_icons_ became a std::vector<raw_ptr<NotifyIcon>>. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fixup! 8426064: Remove flag for restrict frame destinations to navigate Drop the network features include; its only use was the kRestrictFrameDestinationsToNavigate check this CL removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: electron-claude[bot] <279139701+electron-claude[bot]@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: clavin <clavin@electronjs.org> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
157 lines
5.7 KiB
Python
157 lines
5.7 KiB
Python
#!/usr/bin/env python3
|
|
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
import zipfile
|
|
|
|
EXTENSIONS_TO_SKIP = [
|
|
'.pdb',
|
|
'.mojom.js',
|
|
'.mojom-lite.js',
|
|
'.info',
|
|
'.m.js',
|
|
|
|
# These are only needed for Chromium tests we don't run. Listed in
|
|
# 'extensions' because the mksnapshot zip has these under a subdirectory, and
|
|
# the PATHS_TO_SKIP is checked with |startswith|.
|
|
'dbgcore.dll',
|
|
'dbghelp.dll',
|
|
# msdia140.dll is copied to the output dir alongside dbghelp.dll (dbghelp
|
|
# dynamically loads it to symbolize stack traces). Since we don't ship
|
|
# dbghelp.dll/dbgcore.dll, msdia140.dll is unneeded in the distribution.
|
|
'msdia140.dll',
|
|
]
|
|
|
|
PATHS_TO_SKIP = [
|
|
# Skip because it is an output of //ui/gl that we don't need.
|
|
'angledata',
|
|
# //electron:electron_wer ships this as <exe name>_wer.dll.
|
|
'./crashpad_wer.dll',
|
|
# Skip because ANGLE is statically linked; these are dummy stubs
|
|
# that upstream generates only for Chromium bot infrastructure and nothing
|
|
# loads them at runtime. See the TODO(crbug.com/514229803) in ui/gl/BUILD.gn.
|
|
'./libEGL',
|
|
'./libGLESv2',
|
|
# Skip because these are outputs that we don't need.
|
|
'./libVkICD_mock_',
|
|
# Skip because these are outputs that we don't need.
|
|
'./VkICD_mock_',
|
|
# Skip because its an output of create_bundle from
|
|
# //build/config/mac/rules.gni that we don't need
|
|
'Electron.dSYM',
|
|
# Refs https://chromium-review.googlesource.com/c/angle/angle/+/2425197.
|
|
# Remove this when Angle themselves remove the file:
|
|
# https://issuetracker.google.com/issues/168736059
|
|
'gen/angle/angle_commit.h',
|
|
# //chrome/browser:resources depends on this via
|
|
# //chrome/browser/resources/ssl/ssl_error_assistant, but we don't need to
|
|
# ship it.
|
|
'pyproto',
|
|
# Skip because these are outputs that we don't need.
|
|
'resources/inspector',
|
|
'gen/third_party/blink/public/devtools_protocol/types',
|
|
'gen/third_party/chromium-bidi/src',
|
|
'gen/third_party/devtools-frontend/src',
|
|
'gen/ui/webui',
|
|
# Skip because these get zipped separately in script/zip-symbols.py
|
|
'debug',
|
|
]
|
|
|
|
def skip_path(dep, dist_zip, target_cpu):
|
|
# Skip specific paths and extensions as well as the following special case:
|
|
# snapshot_blob.bin is a dependency of mksnapshot.zip because
|
|
# v8_context_generator needs it, but this file does not get generated for arm
|
|
# and arm 64 binaries of mksnapshot since they are built on x64 hardware.
|
|
# Consumers of arm and arm64 mksnapshot can generate snapshot_blob.bin
|
|
# themselves by running mksnapshot.
|
|
#
|
|
# Outputs of a secondary toolchain live under $root_out_dir/<toolchain>/
|
|
# (e.g. clang_x64_v8_arm64/gen/...), so match PATHS_TO_SKIP against the
|
|
# path relative to that toolchain dir too.
|
|
candidates = [dep]
|
|
if dep.startswith('clang_') and '/' in dep:
|
|
toolchain_relative_dep = dep.split('/', 1)[1]
|
|
candidates += [toolchain_relative_dep, './' + toolchain_relative_dep]
|
|
should_skip = (
|
|
any(c.startswith(path) for c in candidates for path in PATHS_TO_SKIP) or
|
|
any(dep.endswith(ext) for ext in EXTENSIONS_TO_SKIP) or
|
|
(
|
|
"arm" in target_cpu
|
|
and dist_zip == "mksnapshot.zip"
|
|
and "snapshot_blob.bin" in candidates
|
|
) or
|
|
# electron_xcache links V8 but is always handed the target's blob.
|
|
(dist_zip == "xcache.zip" and "snapshot_blob.bin" in candidates)
|
|
)
|
|
if should_skip and os.environ.get('ELECTRON_DEBUG_ZIP_SKIP') == '1':
|
|
print("Skipping {}".format(dep))
|
|
return should_skip
|
|
|
|
def execute(argv):
|
|
try:
|
|
output = subprocess.check_output(argv, stderr=subprocess.STDOUT)
|
|
return output
|
|
except subprocess.CalledProcessError as e:
|
|
print(e.output)
|
|
raise e
|
|
|
|
def main(argv):
|
|
dist_zip, runtime_deps, target_cpu, _, flatten_val, flatten_relative_to = argv
|
|
should_flatten = flatten_val == "true"
|
|
dist_files = set()
|
|
with open(runtime_deps) as f:
|
|
for dep in f.readlines():
|
|
dep = dep.strip()
|
|
if not skip_path(dep, dist_zip, target_cpu):
|
|
dist_files.add(dep)
|
|
# On Linux, filter out any files which have a .stripped companion
|
|
if sys.platform == 'linux':
|
|
dist_files = {
|
|
dep for dep in dist_files if f"{dep.removeprefix('./')}.stripped" not in dist_files
|
|
}
|
|
if sys.platform == 'darwin' and not should_flatten:
|
|
execute(['zip', '-r', '-y', dist_zip] + list(dist_files))
|
|
else:
|
|
with zipfile.ZipFile(
|
|
dist_zip, 'w', zipfile.ZIP_DEFLATED, allowZip64=True
|
|
) as z:
|
|
written = set()
|
|
for dep in dist_files:
|
|
if os.path.isdir(dep):
|
|
for root, _, files in os.walk(dep):
|
|
for filename in files:
|
|
z.write(os.path.join(root, filename))
|
|
else:
|
|
basename = os.path.basename(dep)
|
|
dirname = os.path.dirname(dep)
|
|
arcname = (
|
|
os.path.join(dirname, 'chrome-sandbox')
|
|
if basename.removesuffix('.stripped') == 'chrome_sandbox'
|
|
else dep
|
|
)
|
|
name_to_write = arcname
|
|
# On Linux, strip the .stripped suffix from the name before zipping
|
|
if sys.platform == 'linux':
|
|
name_to_write = name_to_write.removesuffix('.stripped')
|
|
if should_flatten:
|
|
if flatten_relative_to:
|
|
if name_to_write.startswith(flatten_relative_to):
|
|
name_to_write = name_to_write[len(flatten_relative_to):]
|
|
else:
|
|
name_to_write = os.path.basename(arcname)
|
|
else:
|
|
name_to_write = os.path.basename(arcname)
|
|
# Flattening can map several deps onto one name (e.g. the same
|
|
# file built by two toolchains); keep the first.
|
|
if name_to_write in written:
|
|
continue
|
|
written.add(name_to_write)
|
|
z.write(
|
|
dep,
|
|
name_to_write,
|
|
)
|
|
|
|
if __name__ == '__main__':
|
|
sys.exit(main(sys.argv[1:]))
|