Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgpatch: electron22 #2806

Merged
merged 1 commit into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions electron22/electron22-deps-parser.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from importlib.util import spec_from_loader, module_from_spec
from importlib.machinery import SourceFileLoader
import sys
import re

spec = spec_from_loader("deps", SourceFileLoader("deps", sys.argv[2]))
deps = module_from_spec(spec)

# The DEPS file is not a standard python file
# Let's apply some hacks to trick the interpreter.
deps.Str = str
deps.Var = str

spec.loader.exec_module(deps)

match sys.argv[1]:
case 'infra':
# Return the commit of infra repo
infra_rev = deps.vars['luci_go']
print(infra_rev.split(':')[-1])
case 'luci_go':
# Return the commit of luci repo
luci_go_rev = deps.deps["infra/go/src/go.chromium.org/luci"]
print(luci_go_rev.split('@')[-1])
case 'esbuild':
esbuild_ver_full = deps.deps["src/third_party/devtools-frontend/src/third_party/esbuild"]["packages"][0]["version"]
esbuild_ver = re.match("^(.+)\.chromium.*$", esbuild_ver_full.split("@")[-1])[1]
print(esbuild_ver)
case _:
print("Unsupported arguments!", file=sys.stderr)
sys.exit(-1)
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- extensions/common/api/runtime.json.orig 2023-07-11 07:42:27.856148697 -0400
+++ extensions/common/api/runtime.json 2023-07-11 07:43:54.566062017 -0400
@@ -92,14 +92,14 @@
{
"id": "PlatformArch",
"type": "string",
- "enum": ["arm", "arm64", "x86-32", "x86-64", "mips", "mips64"],
+ "enum": ["arm", "arm64", "x86-32", "x86-64", "mips", "mips64", "riscv64"],
"description": "The machine's processor architecture."
},
{
"id": "PlatformNaclArch",
"description": "The native client architecture. This may be different from arch on some platforms.",
"type": "string",
- "enum": ["arm", "x86-32", "x86-64", "mips", "mips64"]
+ "enum": ["arm", "x86-32", "x86-64", "mips", "mips64", "riscv64"]
},
{
"id": "PlatformInfo",
25 changes: 0 additions & 25 deletions electron22/electron22-grab-commit.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
From 7d1394bd639e3bcf68082ac3fc33eeed6a00d2e6 Mon Sep 17 00:00:00 2001
From: Elly Fong-Jones <[email protected]>
Date: Thu, 02 Mar 2023 00:15:11 +0000
Subject: [PATCH] sql: relax constraints on VirtualCursor layout

VirtualCursor::FromSqliteCursor required that VirtualCursor had a
standard layout, but in fact VirtualCursor shouldn't have a standard
layout, and the fact that it does with libc++ is a deviation from the
C++ standard. This change:

1. Relaxes the requirement that VirtualCursor has a standard layout, and
2. Relaxes the requirement that the sqlite_cursor_ field has to be at
offset 0

by use of offsetof() and pointer subtraction. This change both improves
standards compliance and makes this code build with libstdc++.

Bug: 1380656
Change-Id: I9c47abd9197b187da0360ca5619ccf7dadab4f33
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4292313
Reviewed-by: Austin Sullivan <[email protected]>
Commit-Queue: Elly Fong-Jones <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1111925}
---

diff --git a/sql/recover_module/cursor.h b/sql/recover_module/cursor.h
index 1970bdca..4cb0655 100644
--- a/sql/recover_module/cursor.h
+++ b/sql/recover_module/cursor.h
@@ -63,12 +63,10 @@
// |sqlite_cursor| must have been returned by VirtualTable::SqliteCursor().
static inline VirtualCursor* FromSqliteCursor(
sqlite3_vtab_cursor* sqlite_cursor) {
- static_assert(std::is_standard_layout<VirtualCursor>::value,
- "needed for the reinterpret_cast below");
- static_assert(offsetof(VirtualCursor, sqlite_cursor_) == 0,
- "sqlite_cursor_ must be the first member of the class");
- VirtualCursor* result = reinterpret_cast<VirtualCursor*>(sqlite_cursor);
- DCHECK_EQ(sqlite_cursor, &result->sqlite_cursor_);
+ VirtualCursor* result = reinterpret_cast<VirtualCursor*>(
+ (reinterpret_cast<char*>(sqlite_cursor) -
+ offsetof(VirtualCursor, sqlite_cursor_)));
+ CHECK_EQ(sqlite_cursor, &result->sqlite_cursor_);
return result;
}

Loading
Loading