ci: auto-3way patches and detect changes (#23032)

This commit is contained in:
Jeremy Apthorp
2020-04-08 15:31:00 -07:00
committed by GitHub
parent 34be80602c
commit 58c6ea5de8
35 changed files with 366 additions and 302 deletions

View File

@@ -215,7 +215,25 @@ step-gclient-sync: &step-gclient-sync
$GCLIENT_EXTRA_ARGS \
"$CIRCLE_REPOSITORY_URL"
gclient sync --with_branch_heads --with_tags
ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES=1 gclient sync --with_branch_heads --with_tags
# Re-export all the patches to check if there were changes.
python src/electron/script/export_all_patches.py src/electron/patches/config.json
cd src/electron
git update-index --refresh || true
if ! git diff-index --quiet HEAD --; then
# There are changes to the patches. Make a git commit with the updated patches
git add patches
GIT_COMMITTER_NAME="Electron Bot" GIT_COMMITTER_EMAIL="anonymous@electronjs.org" git commit -m "update patches" --author="Electron Bot <anonymous@electronjs.org>"
# Export it
mkdir -p ../../patches
git format-patch -1 --stdout --keep-subject --no-stat --full-index > ../../patches/update-patches.patch
echo
echo "======================================================================"
echo "There were changes to the patches when applying."
echo "Check the CI artifacts for a patch you can apply to fix it."
echo "======================================================================"
exit 1
fi
fi
step-setup-env-for-build: &step-setup-env-for-build
@@ -895,6 +913,8 @@ steps-checkout-and-save-cache: &steps-checkout-and-save-cache
- *step-set-git-cache-path
# This sync call only runs if .circle-sync-done is an EMPTY file
- *step-gclient-sync
- store_artifacts:
path: patches
- *step-save-git-cache
# These next few steps reset Electron to the correct commit regardless of which cache was restored
- run:
@@ -1258,6 +1278,8 @@ commands:
- *step-set-git-cache-path
# This sync call only runs if .circle-sync-done is an EMPTY file
- *step-gclient-sync
- store_artifacts:
path: patches
# These next few steps reset Electron to the correct commit regardless of which cache was restored
- when:
condition: << parameters.preserve-vendor-dirs >>

2
DEPS
View File

@@ -152,3 +152,5 @@ hooks = [
recursedeps = [
'src',
]
# Touch DEPS to bust cache

View File

@@ -1,3 +1,3 @@
expose_ripemd160.patch
expose_aes-cfb.patch
fix_add_RSA-PSS_keygen_functions.patch
fix_add_RSA-PSS_keygen_functions.patch

View File

@@ -97,7 +97,7 @@ index 85378bb565de617b1bd611d28c8714361747a357..d67d558b91b49835dfa9278930939480
}
return VKEY_UNKNOWN;
}
@@ -192,7 +199,10 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy,
@@ -192,7 +199,10 @@ CGEventRef MediaKeysListenerImpl::EventTapCallback(CGEventTapProxy proxy,
int key_code = (data1 & 0xFFFF0000) >> 16;
if (key_code != NX_KEYTYPE_PLAY && key_code != NX_KEYTYPE_NEXT &&
key_code != NX_KEYTYPE_PREVIOUS && key_code != NX_KEYTYPE_FAST &&

View File

@@ -9,7 +9,7 @@ diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/cont
index 5bec9c5d258c06fe338c8abe3e233e0b9b937234..92d2fa2343d1272dcadfa37c07ed368d18488ef8 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -477,7 +477,11 @@
@@ -477,7 +477,11 @@ void RenderWidgetHostViewMac::WasOccluded() {
return;
host()->WasHidden();

View File

@@ -12,7 +12,7 @@ diff --git a/chrome/browser/extensions/global_shortcut_listener_mac.mm b/chrome/
index befe726af9c10b1563a7fc0bb77cc55f65943d5c..bac51f33f35f96fe4ecc764cf5ca887176642f74 100644
--- a/chrome/browser/extensions/global_shortcut_listener_mac.mm
+++ b/chrome/browser/extensions/global_shortcut_listener_mac.mm
@@ -39,7 +39,7 @@
@@ -39,7 +39,7 @@ GlobalShortcutListenerMac::GlobalShortcutListenerMac()
// global MediaKeysListener to receive media keys.
if (!content::MediaKeysListenerManager::IsMediaKeysListenerManagerEnabled()) {
media_keys_listener_ = ui::MediaKeysListener::Create(

View File

@@ -9,7 +9,7 @@ diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
index 2a83d4d8158422c1056725679309c6ced1e531bd..f52934712f8de78193127c426d02982b36e9d422 100644
--- a/base/mac/foundation_util.mm
+++ b/base/mac/foundation_util.mm
@@ -27,7 +27,6 @@
@@ -27,7 +27,6 @@ CFTypeID SecKeyGetTypeID();
#if !defined(OS_IOS)
CFTypeID SecACLGetTypeID();
CFTypeID SecTrustedApplicationGetTypeID();
@@ -17,7 +17,7 @@ index 2a83d4d8158422c1056725679309c6ced1e531bd..f52934712f8de78193127c426d02982b
#endif
} // extern "C"
@@ -316,8 +315,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) {
@@ -316,8 +315,7 @@ NSFont* CFToNSCast(CTFontRef cf_val) {
const_cast<NSFont*>(reinterpret_cast<const NSFont*>(cf_val));
DCHECK(!cf_val ||
CTFontGetTypeID() == CFGetTypeID(cf_val) ||
@@ -27,7 +27,7 @@ index 2a83d4d8158422c1056725679309c6ced1e531bd..f52934712f8de78193127c426d02982b
return ns_val;
}
@@ -385,9 +383,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) {
@@ -385,9 +383,6 @@ CFCast<CTFontRef>(const CFTypeRef& cf_val) {
return (CTFontRef)(cf_val);
}

View File

@@ -18,7 +18,7 @@ index 94afefcee81b87c05bf9b1199d90d3d4b5ea84a6..2ec7f04c71824b47de1ddbf1f0e8625d
extern "C" {
// Kill ring calls. Would be better to use NSKillRing.h, but that's not
@@ -39,38 +40,53 @@
@@ -39,38 +40,53 @@ NSString* _NSYankFromKillRing();
void _NSNewKillRingSequence();
void _NSSetKillRingToYankedState();
}
@@ -92,7 +92,7 @@ index 8f4ae94bc1d8188d041654c50511f3346eee79de..fa06f47abbff3dcda937bf0b794f616e
namespace blink {
@@ -95,10 +97,12 @@ void _NSDrawCarbonThemeListBox(NSRect frame,
@@ -95,10 +97,12 @@ bool ThemePainterMac::PaintTextField(const Node* node,
// behavior change while remaining a fragile solution.
// https://bugs.chromium.org/p/chromium/issues/detail?id=658085#c3
if (!use_ns_text_field_cell) {
@@ -105,7 +105,7 @@ index 8f4ae94bc1d8188d041654c50511f3346eee79de..fa06f47abbff3dcda937bf0b794f616e
return false;
}
@@ -186,10 +190,12 @@ void _NSDrawCarbonThemeListBox(NSRect frame,
@@ -186,10 +190,12 @@ bool ThemePainterMac::PaintTextArea(const Node* node,
const IntRect& r) {
ScopedColorSchemeAppearance appearance(style.UsedColorScheme());
LocalCurrentGraphicsContext local_context(paint_info.context, r);

View File

@@ -18,7 +18,7 @@ index 1ffb647e85e00ff60d84234e47f5d7d385f65245..439cc6df5e0cc1ec3732d6f2a2e00d54
@interface NSWindow (PrivateBrowserNativeWidgetAPI)
+ (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle;
@end
@@ -69,10 +70,13 @@ - (NSRect)_draggableFrame NS_DEPRECATED_MAC(10_10, 10_11) {
@@ -69,10 +70,13 @@
@end
@@ -32,7 +32,7 @@ index 1ffb647e85e00ff60d84234e47f5d7d385f65245..439cc6df5e0cc1ec3732d6f2a2e00d54
+ (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle {
// - NSThemeFrame and its subclasses will be nil if it's missing at runtime.
if ([BrowserWindowFrame class])
@@ -87,6 +91,8 @@ - (BOOL)_usesCustomDrawing {
@@ -87,6 +91,8 @@
return NO;
}
@@ -54,7 +54,7 @@ index 8416c7c6e052dafb2aad61c0bd3224c36e945d23..cd356beda023ab2409b16d58ca38c70b
@interface NSWindow (PrivateAPI)
+ (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle;
@end
@@ -18,8 +20,12 @@ - (CGFloat)_titlebarHeight {
@@ -18,8 +20,12 @@
}
@end
@@ -67,7 +67,7 @@ index 8416c7c6e052dafb2aad61c0bd3224c36e945d23..cd356beda023ab2409b16d58ca38c70b
+ (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle {
if ([NativeWidgetMacFramelessNSWindowFrame class]) {
return [NativeWidgetMacFramelessNSWindowFrame class];
@@ -27,4 +33,6 @@ + (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle {
@@ -27,4 +33,6 @@
return [super frameViewClassForStyleMask:windowStyle];
}
@@ -108,7 +108,7 @@ index 576ef14c1d67ce7f4a1b2095124d1d302440635c..dd068fc339b80c3e99d89e6d7cc73db8
- (BOOL)hasKeyAppearance;
- (long long)_resizeDirectionForMouseLocation:(CGPoint)location;
- (BOOL)_isConsideredOpenForPersistentState;
@@ -57,6 +59,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event {
@@ -57,6 +59,8 @@
}
@end
@@ -117,7 +117,7 @@ index 576ef14c1d67ce7f4a1b2095124d1d302440635c..dd068fc339b80c3e99d89e6d7cc73db8
@implementation NativeWidgetMacNSWindowTitledFrame
- (void)mouseDown:(NSEvent*)event {
if (self.window.isMovable)
@@ -78,6 +82,8 @@ - (BOOL)usesCustomDrawing {
@@ -78,6 +82,8 @@
}
@end
@@ -126,7 +126,7 @@ index 576ef14c1d67ce7f4a1b2095124d1d302440635c..dd068fc339b80c3e99d89e6d7cc73db8
@implementation NativeWidgetMacNSWindow {
@private
base::scoped_nsobject<CommandDispatcher> commandDispatcher_;
@@ -159,6 +165,8 @@ - (BOOL)hasViewsMenuActive {
@@ -159,6 +165,8 @@
// NSWindow overrides.
@@ -135,7 +135,7 @@ index 576ef14c1d67ce7f4a1b2095124d1d302440635c..dd068fc339b80c3e99d89e6d7cc73db8
+ (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
if (windowStyle & NSWindowStyleMaskTitled) {
if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class])
@@ -170,6 +178,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
@@ -170,6 +178,8 @@
return [super frameViewClassForStyleMask:windowStyle];
}

View File

@@ -10,7 +10,7 @@ diff --git a/components/remote_cocoa/app_shim/application_bridge.mm b/components
index 9ddda9116e7284cbccde8a51e23ad7560dd06367..e846091ad99b0154636489e53491209ff3cbfaaa 100644
--- a/components/remote_cocoa/app_shim/application_bridge.mm
+++ b/components/remote_cocoa/app_shim/application_bridge.mm
@@ -49,6 +49,7 @@
@@ -49,6 +49,7 @@ class NativeWidgetBridgeOwner : public NativeWidgetNSWindowHostHelper {
// NativeWidgetNSWindowHostHelper:
id GetNativeViewAccessible() override {
@@ -18,7 +18,7 @@ index 9ddda9116e7284cbccde8a51e23ad7560dd06367..e846091ad99b0154636489e53491209f
if (!remote_accessibility_element_) {
int64_t browser_pid = 0;
std::vector<uint8_t> element_token;
@@ -59,6 +60,9 @@ id GetNativeViewAccessible() override {
@@ -59,6 +60,9 @@ class NativeWidgetBridgeOwner : public NativeWidgetNSWindowHostHelper {
ui::RemoteAccessibility::GetRemoteElementFromToken(element_token);
}
return remote_accessibility_element_.get();
@@ -28,7 +28,7 @@ index 9ddda9116e7284cbccde8a51e23ad7560dd06367..e846091ad99b0154636489e53491209f
}
void DispatchKeyEvent(ui::KeyEvent* event) override {
bool event_handled = false;
@@ -96,8 +100,10 @@ void GetWordAt(const gfx::Point& location_in_content,
@@ -96,8 +100,10 @@ class NativeWidgetBridgeOwner : public NativeWidgetNSWindowHostHelper {
mojo::AssociatedRemote<mojom::TextInputHost> text_input_host_remote_;
std::unique_ptr<NativeWidgetNSWindowBridge> bridge_;
@@ -43,7 +43,7 @@ diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
index 53659a0483967a959acada632cd6b504563d95ad..1fbdc2980386583c33eb7a801794cbd8c522bd79 100644
--- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
+++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
@@ -556,10 +556,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
@@ -556,10 +556,12 @@ void NativeWidgetNSWindowBridge::CreateContentView(uint64_t ns_view_id,
// this should be treated as an error and caught early.
CHECK(bridged_view_);
@@ -60,7 +60,7 @@ diff --git a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm b/cont
index a8e5c8888cb7ea8a85de7c8e8c613cc2b3c5be15..d01468fe77703b2812865b0198b84b0b645283c4 100644
--- a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
+++ b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
@@ -66,8 +66,10 @@ id GetFocusedBrowserAccessibilityElement() override {
@@ -66,8 +66,10 @@ class RenderWidgetHostNSViewBridgeOwner
return nil;
}
void SetAccessibilityWindow(NSWindow* window) override {
@@ -71,7 +71,7 @@ index a8e5c8888cb7ea8a85de7c8e8c613cc2b3c5be15..d01468fe77703b2812865b0198b84b0b
}
void ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& key_event,
@@ -126,8 +128,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override {
@@ -126,8 +128,10 @@ class RenderWidgetHostNSViewBridgeOwner
mojo::AssociatedRemote<mojom::RenderWidgetHostNSViewHost> host_;
std::unique_ptr<RenderWidgetHostNSViewBridge> bridge_;
@@ -113,7 +113,7 @@ diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/cont
index b6897c88c2c433e73f092f2ccebf29f097db35b0..5bec9c5d258c06fe338c8abe3e233e0b9b937234 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -239,8 +239,10 @@
@@ -239,8 +239,10 @@ RenderWidgetHostViewMac::~RenderWidgetHostViewMac() {
void RenderWidgetHostViewMac::MigrateNSViewBridge(
remote_cocoa::mojom::Application* remote_cocoa_application,
uint64_t parent_ns_view_id) {
@@ -124,7 +124,7 @@ index b6897c88c2c433e73f092f2ccebf29f097db35b0..5bec9c5d258c06fe338c8abe3e233e0b
// Disconnect from the previous bridge (this will have the effect of
// destroying the associated bridge), and close the receiver (to allow it
@@ -1373,8 +1375,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1373,8 +1375,10 @@ RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessible() {
gfx::NativeViewAccessible
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
@@ -135,7 +135,7 @@ index b6897c88c2c433e73f092f2ccebf29f097db35b0..5bec9c5d258c06fe338c8abe3e233e0b
return [GetInProcessNSView() window];
}
@@ -1406,9 +1410,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1406,9 +1410,11 @@ id RenderWidgetHostViewMac::GetFocusedBrowserAccessibilityElement() {
}
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
@@ -147,7 +147,7 @@ index b6897c88c2c433e73f092f2ccebf29f097db35b0..5bec9c5d258c06fe338c8abe3e233e0b
}
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
@@ -1889,12 +1895,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1889,12 +1895,14 @@ void RenderWidgetHostViewMac::StopSpeaking() {
void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
const std::vector<uint8_t>& window_token) {
@@ -232,7 +232,7 @@ diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa
index dd9e195a4fd0d506f15de93e9c3536efd4bae627..205910ac9a3f2bb12bddf38f50580c21618ef497 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
@@ -296,14 +296,22 @@ bool PositionWindowInScreenCoordinates(Widget* widget,
@@ -296,14 +296,22 @@ gfx::NativeViewAccessible
NativeWidgetMacNSWindowHost::GetNativeViewAccessibleForNSView() const {
if (in_process_ns_window_bridge_)
return in_process_ns_window_bridge_->ns_view();
@@ -255,7 +255,7 @@ index dd9e195a4fd0d506f15de93e9c3536efd4bae627..205910ac9a3f2bb12bddf38f50580c21
}
remote_cocoa::mojom::NativeWidgetNSWindow*
@@ -1177,6 +1185,7 @@ bool PositionWindowInScreenCoordinates(Widget* widget,
@@ -1177,6 +1185,7 @@ void NativeWidgetMacNSWindowHost::OnFocusWindowToolbar() {
void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
const std::vector<uint8_t>& window_token,
const std::vector<uint8_t>& view_token) {
@@ -263,7 +263,7 @@ index dd9e195a4fd0d506f15de93e9c3536efd4bae627..205910ac9a3f2bb12bddf38f50580c21
remote_window_accessible_ =
ui::RemoteAccessibility::GetRemoteElementFromToken(window_token);
remote_view_accessible_ =
@@ -1184,14 +1193,17 @@ bool PositionWindowInScreenCoordinates(Widget* widget,
@@ -1184,14 +1193,17 @@ void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
[remote_view_accessible_ setWindowUIElement:remote_window_accessible_.get()];
[remote_view_accessible_
setTopLevelUIElement:remote_window_accessible_.get()];

View File

@@ -33,7 +33,7 @@ diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.mm b/gpu/ipc/se
index c1af03a268dc409b043ce3a085a7365f07e0f9e7..b883883ad52b0d625ec7be6e3b0c86503ab33582 100644
--- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm
+++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
@@ -63,6 +63,7 @@
@@ -63,6 +63,7 @@ ImageTransportSurfaceOverlayMacBase<
template <typename BaseClass>
bool ImageTransportSurfaceOverlayMacBase<BaseClass>::Initialize(
gl::GLSurfaceFormat format) {
@@ -41,7 +41,7 @@ index c1af03a268dc409b043ce3a085a7365f07e0f9e7..b883883ad52b0d625ec7be6e3b0c8650
// Create the CAContext to send this to the GPU process, and the layer for
// the context.
if (use_remote_layer_api_) {
@@ -71,6 +72,7 @@
@@ -71,6 +72,7 @@ bool ImageTransportSurfaceOverlayMacBase<BaseClass>::Initialize(
[CAContext contextWithCGSConnection:connection_id options:@{}] retain]);
[ca_context_ setLayer:ca_layer_tree_coordinator_->GetCALayerForDisplay()];
}
@@ -49,7 +49,7 @@ index c1af03a268dc409b043ce3a085a7365f07e0f9e7..b883883ad52b0d625ec7be6e3b0c8650
return true;
}
@@ -139,7 +141,9 @@
@@ -139,7 +141,9 @@ ImageTransportSurfaceOverlayMacBase<BaseClass>::SwapBuffersInternal(
"GLImpl", static_cast<int>(gl::GetGLImplementation()),
"width", pixel_size_.width());
if (use_remote_layer_api_) {
@@ -63,7 +63,7 @@ diff --git a/ui/accelerated_widget_mac/display_ca_layer_tree.mm b/ui/accelerated
index 60abe639bd9c9cf6885f811c741a45eeb683ec58..c38eed5fbdefc96a3d60e4ab70d3b007264ccb3c 100644
--- a/ui/accelerated_widget_mac/display_ca_layer_tree.mm
+++ b/ui/accelerated_widget_mac/display_ca_layer_tree.mm
@@ -98,6 +98,7 @@ - (void)setContentsChanged;
@@ -98,6 +98,7 @@ void DisplayCALayerTree::UpdateCALayerTree(
}
void DisplayCALayerTree::GotCALayerFrame(uint32_t ca_context_id) {
@@ -71,7 +71,7 @@ index 60abe639bd9c9cf6885f811c741a45eeb683ec58..c38eed5fbdefc96a3d60e4ab70d3b007
// Early-out if the remote layer has not changed.
if ([remote_layer_ contextId] == ca_context_id)
return;
@@ -122,6 +123,9 @@ - (void)setContentsChanged;
@@ -122,6 +123,9 @@ void DisplayCALayerTree::GotCALayerFrame(uint32_t ca_context_id) {
[io_surface_layer_ removeFromSuperlayer];
io_surface_layer_.reset();
}

View File

@@ -53,7 +53,7 @@ diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/cont
index e82b89ff5e92c4ff1e62fd8592915ae331a1adc5..917660269257bb51716e902d5ad70578793a4bb1 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
@@ -207,6 +207,7 @@
@@ -207,6 +207,7 @@ NSString* const
NSString* const NSAccessibilityLengthForTextMarkerRangeParameterizedAttribute =
@"AXLengthForTextMarkerRange";
@@ -61,7 +61,7 @@ index e82b89ff5e92c4ff1e62fd8592915ae331a1adc5..917660269257bb51716e902d5ad70578
// Private attributes that can be used for testing text markers, e.g. in dump
// tree tests.
NSString* const
@@ -218,6 +219,7 @@
@@ -218,6 +219,7 @@ NSString* const
NSString* const
NSAccessibilityTextMarkerNodeDebugDescriptionParameterizedAttribute =
@"AXTextMarkerNodeDebugDescription";
@@ -69,7 +69,7 @@ index e82b89ff5e92c4ff1e62fd8592915ae331a1adc5..917660269257bb51716e902d5ad70578
// Other private attributes.
NSString* const NSAccessibilitySelectTextWithCriteriaParameterizedAttribute =
@@ -241,6 +243,7 @@
@@ -241,6 +243,7 @@ NSDictionary* attributeToMethodNameMap = nil;
// VoiceOver uses -1 to mean "no limit" for AXResultsLimit.
const int kAXResultsLimitNoLimit = -1;
@@ -77,7 +77,7 @@ index e82b89ff5e92c4ff1e62fd8592915ae331a1adc5..917660269257bb51716e902d5ad70578
extern "C" {
// The following are private accessibility APIs required for cursor navigation
@@ -480,6 +483,7 @@ void AddMisspelledTextAttributes(const AXPlatformRange& ax_range,
@@ -480,6 +483,7 @@ NSAttributedString* GetAttributedTextForTextMarkerRange(id marker_range) {
AddMisspelledTextAttributes(ax_range, attributed_text);
return attributed_text;
}
@@ -85,7 +85,7 @@ index e82b89ff5e92c4ff1e62fd8592915ae331a1adc5..917660269257bb51716e902d5ad70578
// Returns an autoreleased copy of the AXNodeData's attribute.
NSString* NSStringForStringAttribute(BrowserAccessibility* browserAccessibility,
@@ -748,7 +752,9 @@ + (void)initialize {
@@ -748,7 +752,9 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
{NSAccessibilityEditableAncestorAttribute, @"editableAncestor"},
{NSAccessibilityElementBusyAttribute, @"elementBusy"},
{NSAccessibilityEnabledAttribute, @"enabled"},
@@ -95,7 +95,7 @@ index e82b89ff5e92c4ff1e62fd8592915ae331a1adc5..917660269257bb51716e902d5ad70578
{NSAccessibilityExpandedAttribute, @"expanded"},
{NSAccessibilityFocusableAncestorAttribute, @"focusableAncestor"},
{NSAccessibilityFocusedAttribute, @"focused"},
@@ -760,8 +766,10 @@ + (void)initialize {
@@ -760,8 +766,10 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
{NSAccessibilityHighestEditableAncestorAttribute,
@"highestEditableAncestor"},
{NSAccessibilityIndexAttribute, @"index"},
@@ -106,7 +106,7 @@ index e82b89ff5e92c4ff1e62fd8592915ae331a1adc5..917660269257bb51716e902d5ad70578
{NSAccessibilityInvalidAttribute, @"invalid"},
{NSAccessibilityIsMultiSelectableAttribute, @"isMultiSelectable"},
{NSAccessibilityLanguageAttribute, @"language"},
@@ -783,13 +791,17 @@ + (void)initialize {
@@ -783,13 +791,17 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
{NSAccessibilityRowsAttribute, @"rows"},
// TODO(aboxhall): expose
// NSAccessibilityServesAsTitleForUIElementsAttribute
@@ -124,7 +124,7 @@ index e82b89ff5e92c4ff1e62fd8592915ae331a1adc5..917660269257bb51716e902d5ad70578
{NSAccessibilitySizeAttribute, @"size"},
{NSAccessibilitySortDirectionAttribute, @"sortDirection"},
{NSAccessibilitySubroleAttribute, @"subrole"},
@@ -1285,6 +1297,7 @@ - (NSNumber*)enabled {
@@ -1285,6 +1297,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
ax::mojom::Restriction::kDisabled];
}
@@ -132,7 +132,7 @@ index e82b89ff5e92c4ff1e62fd8592915ae331a1adc5..917660269257bb51716e902d5ad70578
// Returns a text marker that points to the last character in the document that
// can be selected with VoiceOver.
- (id)endTextMarker {
@@ -1295,6 +1308,7 @@ - (id)endTextMarker {
@@ -1295,6 +1308,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
return CreateTextMarker(position->CreatePositionAtEndOfAnchor());
}
@@ -140,7 +140,7 @@ index e82b89ff5e92c4ff1e62fd8592915ae331a1adc5..917660269257bb51716e902d5ad70578
- (NSNumber*)expanded {
if (![self instanceActive])
@@ -1444,6 +1458,8 @@ - (NSNumber*)index {
@@ -1444,6 +1458,8 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
return nil;
}
@@ -149,7 +149,7 @@ index e82b89ff5e92c4ff1e62fd8592915ae331a1adc5..917660269257bb51716e902d5ad70578
- (NSNumber*)insertionPointLineNumber {
if (![self instanceActive])
return nil;
@@ -1466,6 +1482,7 @@ - (NSNumber*)insertionPointLineNumber {
@@ -1466,6 +1482,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
caretPosition->AsTextPosition()->text_offset());
return @(std::distance(lineBreaks.begin(), iterator));
}
@@ -157,7 +157,7 @@ index e82b89ff5e92c4ff1e62fd8592915ae331a1adc5..917660269257bb51716e902d5ad70578
// Returns whether or not this node should be ignored in the
// accessibility tree.
@@ -2145,6 +2162,7 @@ - (NSArray*)selectedChildren {
@@ -2145,6 +2162,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
return ret;
}
@@ -165,7 +165,7 @@ index e82b89ff5e92c4ff1e62fd8592915ae331a1adc5..917660269257bb51716e902d5ad70578
- (NSString*)selectedText {
if (![self instanceActive])
return nil;
@@ -2156,11 +2174,13 @@ - (NSString*)selectedText {
@@ -2156,11 +2174,13 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
return nil;
return base::SysUTF16ToNSString(range.GetText());
}
@@ -179,7 +179,7 @@ index e82b89ff5e92c4ff1e62fd8592915ae331a1adc5..917660269257bb51716e902d5ad70578
- (NSValue*)selectedTextRange {
if (![self instanceActive])
return nil;
@@ -2181,12 +2201,15 @@ - (NSValue*)selectedTextRange {
@@ -2181,12 +2201,15 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
int selLength = range.GetText().length();
return [NSValue valueWithRange:NSMakeRange(selStart, selLength)];
}
@@ -195,7 +195,7 @@ index e82b89ff5e92c4ff1e62fd8592915ae331a1adc5..917660269257bb51716e902d5ad70578
- (NSValue*)size {
if (![self instanceActive])
@@ -2219,6 +2242,7 @@ - (NSString*)sortDirection {
@@ -2219,6 +2242,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
return nil;
}
@@ -203,7 +203,7 @@ index e82b89ff5e92c4ff1e62fd8592915ae331a1adc5..917660269257bb51716e902d5ad70578
// Returns a text marker that points to the first character in the document that
// can be selected with VoiceOver.
- (id)startTextMarker {
@@ -2229,6 +2253,7 @@ - (id)startTextMarker {
@@ -2229,6 +2253,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
return CreateTextMarker(position->CreatePositionAtStartOfAnchor());
}
@@ -211,7 +211,7 @@ index e82b89ff5e92c4ff1e62fd8592915ae331a1adc5..917660269257bb51716e902d5ad70578
// Returns a subrole based upon the role.
- (NSString*)subrole {
@@ -2520,11 +2545,13 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
@@ -2520,11 +2545,13 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
NSMutableAttributedString* attributedValue =
[[[NSMutableAttributedString alloc] initWithString:value] autorelease];
@@ -225,7 +225,7 @@ index e82b89ff5e92c4ff1e62fd8592915ae331a1adc5..917660269257bb51716e902d5ad70578
return [attributedValue attributedSubstringFromRange:range];
}
@@ -2627,9 +2654,8 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
@@ -2627,9 +2654,8 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
return ToBrowserAccessibilityCocoa(cell);
}
@@ -237,7 +237,7 @@ index e82b89ff5e92c4ff1e62fd8592915ae331a1adc5..917660269257bb51716e902d5ad70578
BrowserAccessibilityPositionInstance position =
CreatePositionFromTextMarker(parameter);
if (!position->IsNullPosition())
@@ -2940,6 +2966,7 @@ AXPlatformRange range(std::move(lineStartPosition),
@@ -2940,6 +2966,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
return CreateTextMarker(root->CreatePositionAt(index));
}
@@ -245,7 +245,7 @@ index e82b89ff5e92c4ff1e62fd8592915ae331a1adc5..917660269257bb51716e902d5ad70578
if ([attribute isEqualToString:
NSAccessibilityBoundsForRangeParameterizedAttribute]) {
@@ -2973,6 +3000,7 @@ AXPlatformRange range(std::move(lineStartPosition),
@@ -2973,6 +3000,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
return nil;
}
@@ -253,7 +253,7 @@ index e82b89ff5e92c4ff1e62fd8592915ae331a1adc5..917660269257bb51716e902d5ad70578
if ([attribute
isEqualToString:
NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) {
@@ -3087,6 +3115,7 @@ AXPlatformRange range(std::move(lineStartPosition),
@@ -3087,6 +3115,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
return @(child->GetIndexInParent());
}
@@ -265,7 +265,7 @@ diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm
index 05e9b67b3e4d356ce4c90b2da577f169f8aeae0a..2833b50e78add4caa1d5927b697d91e728ee0a06 100644
--- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
+++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
@@ -532,6 +532,7 @@ void PostAnnouncementNotification(NSString* announcement) {
@@ -532,6 +532,7 @@ NSDictionary* BrowserAccessibilityManagerMac::
[user_info setObject:native_focus_object
forKey:NSAccessibilityTextChangeElement];
@@ -273,7 +273,7 @@ index 05e9b67b3e4d356ce4c90b2da577f169f8aeae0a..2833b50e78add4caa1d5927b697d91e7
id selected_text = [native_focus_object selectedTextMarkerRange];
if (selected_text) {
NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute =
@@ -539,6 +540,7 @@ void PostAnnouncementNotification(NSString* announcement) {
@@ -539,6 +540,7 @@ NSDictionary* BrowserAccessibilityManagerMac::
[user_info setObject:selected_text
forKey:NSAccessibilitySelectedTextMarkerRangeAttribute];
}
@@ -297,7 +297,7 @@ index e59ac93d0e1554a2df5d8c74db2beba25d090228..6657c48664bdec4964b382f80309d1bf
namespace content {
@@ -22,6 +24,7 @@
@@ -22,6 +24,7 @@ namespace {
// verifies there are no existing open connections), and then indicates that
// Chrome should continue execution without access to launchservicesd.
void DisableSystemServices() {
@@ -325,7 +325,7 @@ index b2425416b1993f037530619df0458d43d008bd03..39b096120b57c3192519a607d96c8a3d
extern "C" {
// Undocumented IOBluetooth Preference API [1]. Used by `blueutil` [2] and
// `Karabiner` [3] to programmatically control the Bluetooth state. Calling the
@@ -49,6 +50,7 @@
@@ -49,6 +50,7 @@ extern "C" {
// [4] https://support.apple.com/kb/PH25091
void IOBluetoothPreferenceSetControllerPowerState(int state);
}
@@ -333,7 +333,7 @@ index b2425416b1993f037530619df0458d43d008bd03..39b096120b57c3192519a607d96c8a3d
namespace {
@@ -121,8 +123,10 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
@@ -121,8 +123,10 @@ BluetoothAdapterMac::BluetoothAdapterMac()
controller_state_function_(
base::BindRepeating(&BluetoothAdapterMac::GetHostControllerState,
base::Unretained(this))),
@@ -344,7 +344,7 @@ index b2425416b1993f037530619df0458d43d008bd03..39b096120b57c3192519a607d96c8a3d
should_update_name_(true),
classic_discovery_manager_(
BluetoothDiscoveryManagerMac::CreateClassic(this)),
@@ -307,8 +311,12 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
@@ -307,8 +311,12 @@ base::WeakPtr<BluetoothAdapter> BluetoothAdapterMac::GetWeakPtr() {
}
bool BluetoothAdapterMac::SetPoweredImpl(bool powered) {

View File

@@ -25,7 +25,7 @@ diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/cont
index 917660269257bb51716e902d5ad70578793a4bb1..225d333884302310c8c4c0289043d8caad406c84 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
@@ -2090,7 +2090,9 @@ - (NSArray*)rows {
@@ -2090,7 +2090,9 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
return nil;
NSMutableArray* ret = [[[NSMutableArray alloc] init] autorelease];
@@ -36,7 +36,7 @@ index 917660269257bb51716e902d5ad70578793a4bb1..225d333884302310c8c4c0289043d8ca
for (BrowserAccessibilityCocoa* child in [self children]) {
if ([[child role] isEqualToString:NSAccessibilityRowRole])
[ret addObject:child];
@@ -2509,6 +2511,19 @@ - (id)window {
@@ -2509,6 +2511,19 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
return manager->GetWindow();
}

View File

@@ -20,7 +20,7 @@ index 320287e7cc5a2f11f135494a11e0a51d3818d41c..e88ed7afb6ea20c7a5cebba6cfe8c0b5
// These are not documented, so use only after checking -respondsToSelector:.
@interface NSApplication (UndocumentedSpeechMethods)
- (void)speakString:(NSString*)string;
@@ -572,6 +577,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
@@ -572,6 +577,9 @@ void ExtractUnderlines(NSAttributedString* string,
}
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
@@ -30,7 +30,7 @@ index 320287e7cc5a2f11f135494a11e0a51d3818d41c..e88ed7afb6ea20c7a5cebba6cfe8c0b5
return [self acceptsMouseEventsWhenInactive];
}
@@ -990,6 +998,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
@@ -990,6 +998,10 @@ void ExtractUnderlines(NSAttributedString* string,
eventType == NSKeyDown &&
!(modifierFlags & NSCommandKeyMask);
@@ -41,7 +41,7 @@ index 320287e7cc5a2f11f135494a11e0a51d3818d41c..e88ed7afb6ea20c7a5cebba6cfe8c0b5
// We only handle key down events and just simply forward other events.
if (eventType != NSKeyDown) {
hostHelper_->ForwardKeyboardEvent(event, latency_info);
@@ -1769,9 +1781,11 @@ - (NSAccessibilityRole)accessibilityRole {
@@ -1769,9 +1781,11 @@ void ExtractUnderlines(NSAttributedString* string,
// Since this implementation doesn't have to wait any IPC calls, this doesn't
// make any key-typing jank. --hbono 7/23/09
//
@@ -53,7 +53,7 @@ index 320287e7cc5a2f11f135494a11e0a51d3818d41c..e88ed7afb6ea20c7a5cebba6cfe8c0b5
- (NSArray*)validAttributesForMarkedText {
// This code is just copied from WebKit except renaming variables.
@@ -1780,7 +1794,10 @@ - (NSArray*)validAttributesForMarkedText {
@@ -1780,7 +1794,10 @@ extern NSString* NSTextInputReplacementRangeAttributeName;
initWithObjects:NSUnderlineStyleAttributeName,
NSUnderlineColorAttributeName,
NSMarkedClauseSegmentAttributeName,

View File

@@ -20,7 +20,7 @@ diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser
index c4638ac6e86d6a816848cdbbdfa3e70d45086d90..18bd2fb8171568745549d490ee93887418890157 100644
--- a/content/browser/web_contents/web_drag_dest_mac.mm
+++ b/content/browser/web_contents/web_drag_dest_mac.mm
@@ -336,6 +336,7 @@ - (void)setDragStartTrackersForProcess:(int)processID {
@@ -336,6 +336,7 @@ content::GlobalRoutingID GetRenderViewHostID(content::RenderViewHost* rvh) {
}
- (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH {

View File

@@ -5,10 +5,10 @@ Subject: export Environment::kNodeContextTagPtr
diff --git a/src/env.h b/src/env.h
index 82ed066f9cde4851fa3375d0faffe4bfcf2bf411..2dd6bdb75f02e2ccb07129996d16df99c0c4ccf2 100644
index 8e12764ea3a9a3d4441b276fdf9db9fce7109f72..6240aaf1a078a26b37adfe90023651559582f92d 100644
--- a/src/env.h
+++ b/src/env.h
@@ -1304,7 +1304,7 @@ class Environment : public MemoryRetainer {
@@ -1336,7 +1336,7 @@ class Environment : public MemoryRetainer {
uint64_t thread_id_;
std::unordered_set<worker::Worker*> sub_worker_contexts_;

View File

@@ -5,7 +5,7 @@ Subject: fix: Export node::Abort and Assert
diff --git a/src/node_errors.cc b/src/node_errors.cc
index 0214521144c607c084cabc941f006780bcd3cfa2..ea4113aa3b2b431c6d9bbfbf4b20f8ff59cd9182 100644
index d3a409b1ab455a018768982f24f644dbcddb72db..66da1c58340d7ad39a667d8dcb35dcdf4a165996 100644
--- a/src/node_errors.cc
+++ b/src/node_errors.cc
@@ -242,13 +242,13 @@ void AppendExceptionLine(Environment* env,

View File

@@ -5,7 +5,7 @@ Subject: fix: extern the NativeModuleEnv and options parser for debug builds
diff --git a/src/node_native_module_env.h b/src/node_native_module_env.h
index b91a5059cd1f19d87e5876c372f3ded60681a5df..f81cf8dfb892a8ddd9084c5d9477b17867cae82d 100644
index f662c67be50d404ee5b6cf6e2b8dd5991c59e723..da2d458344fb1006ac11c5b19c6ac5fbbca66a08 100644
--- a/src/node_native_module_env.h
+++ b/src/node_native_module_env.h
@@ -12,7 +12,7 @@ namespace native_module {
@@ -17,8 +17,21 @@ index b91a5059cd1f19d87e5876c372f3ded60681a5df..f81cf8dfb892a8ddd9084c5d9477b178
public:
static void Initialize(v8::Local<v8::Object> target,
v8::Local<v8::Value> unused,
diff --git a/src/node_options.cc b/src/node_options.cc
index b9db121250c77e1bc8c35af336361ee444c271e4..a8e287279b31cba12d18300d08f0fd3856069a03 100644
--- a/src/node_options.cc
+++ b/src/node_options.cc
@@ -243,7 +243,7 @@ const EnvironmentOptionsParser _eop_instance{_dop_instance};
// This Parse is not dead code. It is used by embedders (e.g., Electron).
template <>
-void Parse(
+void NODE_EXTERN Parse(
StringVector* const args, StringVector* const exec_args,
StringVector* const v8_args,
DebugOptions* const options,
diff --git a/src/node_options.h b/src/node_options.h
index ce86827024126c6b0d8462c811360057c298ec5b..d53307f9589d4487c220526b8e49b6c7fbd29daf 100644
index 4ce5551284bb5b1b4194905a9fe619f852933405..07f18b5a91c7c42da9f780408e077235a4985f57 100644
--- a/src/node_options.h
+++ b/src/node_options.h
@@ -44,7 +44,7 @@ class HostPort {
@@ -30,7 +43,7 @@ index ce86827024126c6b0d8462c811360057c298ec5b..d53307f9589d4487c220526b8e49b6c7
public:
virtual void CheckOptions(std::vector<std::string>* errors) {}
virtual ~Options() = default;
@@ -440,7 +440,7 @@ class NODE_EXTERN DebugOptionsParser : public OptionsParser<DebugOptions> {
@@ -444,7 +444,7 @@ class NODE_EXTERN DebugOptionsParser : public OptionsParser<DebugOptions> {
using StringVector = std::vector<std::string>;
template <class OptionsType, class = Options>
@@ -39,16 +52,3 @@ index ce86827024126c6b0d8462c811360057c298ec5b..d53307f9589d4487c220526b8e49b6c7
StringVector* const args, StringVector* const exec_args,
StringVector* const v8_args, OptionsType* const options,
OptionEnvvarSettings required_env_settings, StringVector* const errors);
diff --git a/src/node_options.cc b/src/node_options.cc
index 01dddb979042c098326a8b1ff37397642733f49b..f91a23c1d7ee8a141d349c486b7520c175094b8b 100644
--- a/src/node_options.cc
+++ b/src/node_options.cc
@@ -237,7 +237,7 @@ const EnvironmentOptionsParser _eop_instance{_dop_instance};
// This Parse is not dead code. It is used by embedders (e.g., Electron).
template <>
-void Parse(
+void NODE_EXTERN Parse(
StringVector* const args, StringVector* const exec_args,
StringVector* const v8_args,
DebugOptions* const options,

View File

@@ -11,10 +11,10 @@ test/parallel/test-inspector-connect-main-thread.js.
Upstreamed at https://github.com/nodejs/node/pull/30029.
diff --git a/src/env.h b/src/env.h
index 1df2907fe0bc8a4a2bee3c569bfa535465d9f289..084833e467fb815adbd7ee39c2cfd2e79ba96f62 100644
index 5b8465c8ba5335c8706b54dcf6e4ed46af31bcf0..d83fc3ab8d997e8044c5ee5ef12dcba3c44bb1a1 100644
--- a/src/env.h
+++ b/src/env.h
@@ -869,7 +869,7 @@ class Environment : public MemoryRetainer {
@@ -868,7 +868,7 @@ class Environment : public MemoryRetainer {
void CreateProperties();
// Should be called before InitializeInspector()
void InitializeDiagnostics();

View File

@@ -68,7 +68,7 @@ index 0a4bde77fa369b788bd7e2976441358254b13955..37835db411f7577d39e5e2af10590b6f
if (options) {
diff --git a/lib/internal/crypto/sig.js b/lib/internal/crypto/sig.js
index b6a3376e735094f970ef61a52ef9bb6d6101647a..bb70c2305fd44cfea46a8df5e65d1af5a86d40db 100644
index 9b9c32e59c8fd03a0e9170337ae705fd82443507..09084a3cdb878ec3fe9dcdfc2e0c497df726b72f 100644
--- a/lib/internal/crypto/sig.js
+++ b/lib/internal/crypto/sig.js
@@ -14,6 +14,10 @@ const {
@@ -82,7 +82,7 @@ index b6a3376e735094f970ef61a52ef9bb6d6101647a..bb70c2305fd44cfea46a8df5e65d1af5
const {
getDefaultEncoding,
kHandle,
@@ -54,14 +58,14 @@ Sign.prototype.update = function update(data, encoding) {
@@ -52,14 +56,14 @@ Sign.prototype.update = function update(data, encoding) {
};
function getPadding(options) {
@@ -100,7 +100,7 @@ index b6a3376e735094f970ef61a52ef9bb6d6101647a..bb70c2305fd44cfea46a8df5e65d1af5
const value = options[name];
if (value !== undefined) {
if (value === value >> 0) {
@@ -70,7 +74,7 @@ function getIntOption(name, options) {
@@ -68,7 +72,7 @@ function getIntOption(name, options) {
throw new ERR_INVALID_OPT_VALUE(name, value);
}
}
@@ -110,10 +110,10 @@ index b6a3376e735094f970ef61a52ef9bb6d6101647a..bb70c2305fd44cfea46a8df5e65d1af5
Sign.prototype.sign = function sign(options, encoding) {
diff --git a/src/env.h b/src/env.h
index ecb845803776f5ff6e7eec712ec7a5ebea2e8d0a..1516d77be8514ce55d8d21b78a7cd85ead2cb95f 100644
index b83eee0dc5b791748643c4918baf0b4db1efa75c..5b8465c8ba5335c8706b54dcf6e4ed46af31bcf0 100644
--- a/src/env.h
+++ b/src/env.h
@@ -173,7 +173,6 @@ constexpr size_t kFsStatsBufferLength = kFsStatsFieldsNumber * 2;
@@ -195,7 +195,6 @@ constexpr size_t kFsStatsBufferLength =
V(crypto_x25519_string, "x25519") \
V(crypto_x448_string, "x448") \
V(crypto_rsa_string, "rsa") \
@@ -122,10 +122,10 @@ index ecb845803776f5ff6e7eec712ec7a5ebea2e8d0a..1516d77be8514ce55d8d21b78a7cd85e
V(data_string, "data") \
V(dest_string, "dest") \
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index 1cc2372fe2e385e9a9db27e38f0da61d62de2e81..cd09cdb3f2244825f6631891b94e61eeb6bc60bf 100644
index 2c702d2f051d6b8f59ac53a4e2729ee02ba98a47..9250246a453a89f29bb607ebcc6c9d07642c3561 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -3727,8 +3727,6 @@ Local<Value> KeyObject::GetAsymmetricKeyType() const {
@@ -3879,8 +3879,6 @@ Local<Value> KeyObject::GetAsymmetricKeyType() const {
switch (EVP_PKEY_id(this->asymmetric_key_.get())) {
case EVP_PKEY_RSA:
return env()->crypto_rsa_string();
@@ -134,7 +134,7 @@ index 1cc2372fe2e385e9a9db27e38f0da61d62de2e81..cd09cdb3f2244825f6631891b94e61ee
case EVP_PKEY_DSA:
return env()->crypto_dsa_string();
case EVP_PKEY_EC:
@@ -4775,14 +4773,13 @@ void SignBase::CheckThrow(SignBase::Error error) {
@@ -4926,14 +4924,13 @@ void SignBase::CheckThrow(SignBase::Error error) {
static bool ApplyRSAOptions(const ManagedEVPPKey& pkey,
EVP_PKEY_CTX* pkctx,
int padding,
@@ -153,7 +153,7 @@ index 1cc2372fe2e385e9a9db27e38f0da61d62de2e81..cd09cdb3f2244825f6631891b94e61ee
return false;
}
}
@@ -4833,16 +4830,11 @@ void Sign::SignUpdate(const FunctionCallbackInfo<Value>& args) {
@@ -4984,16 +4981,11 @@ void Sign::SignUpdate(const FunctionCallbackInfo<Value>& args) {
sign->CheckThrow(err);
}
@@ -171,7 +171,7 @@ index 1cc2372fe2e385e9a9db27e38f0da61d62de2e81..cd09cdb3f2244825f6631891b94e61ee
unsigned char m[EVP_MAX_MD_SIZE];
unsigned int m_len;
@@ -4875,7 +4867,7 @@ static AllocatedBuffer Node_SignFinal(Environment* env,
@@ -5048,7 +5040,7 @@ static inline bool ValidateDSAParameters(EVP_PKEY* key) {
Sign::SignResult Sign::SignFinal(
const ManagedEVPPKey& pkey,
int padding,
@@ -180,7 +180,7 @@ index 1cc2372fe2e385e9a9db27e38f0da61d62de2e81..cd09cdb3f2244825f6631891b94e61ee
if (!mdctx_)
return SignResult(kSignNotInitialised);
@@ -4926,17 +4918,11 @@ void Sign::SignFinal(const FunctionCallbackInfo<Value>& args) {
@@ -5075,17 +5067,11 @@ void Sign::SignFinal(const FunctionCallbackInfo<Value>& args) {
if (!key)
return;
@@ -202,7 +202,7 @@ index 1cc2372fe2e385e9a9db27e38f0da61d62de2e81..cd09cdb3f2244825f6631891b94e61ee
SignResult ret = sign->SignFinal(
key,
@@ -4997,17 +4983,11 @@ void SignOneShot(const FunctionCallbackInfo<Value>& args) {
@@ -5122,17 +5108,11 @@ void SignOneShot(const FunctionCallbackInfo<Value>& args) {
return CheckThrow(env, SignBase::Error::kSignUnknownDigest);
}
@@ -224,7 +224,7 @@ index 1cc2372fe2e385e9a9db27e38f0da61d62de2e81..cd09cdb3f2244825f6631891b94e61ee
EVP_PKEY_CTX* pkctx = nullptr;
EVPMDPointer mdctx(EVP_MD_CTX_new());
@@ -5085,7 +5065,7 @@ SignBase::Error Verify::VerifyFinal(const ManagedEVPPKey& pkey,
@@ -5210,7 +5190,7 @@ SignBase::Error Verify::VerifyFinal(const ManagedEVPPKey& pkey,
const char* sig,
int siglen,
int padding,
@@ -233,7 +233,7 @@ index 1cc2372fe2e385e9a9db27e38f0da61d62de2e81..cd09cdb3f2244825f6631891b94e61ee
bool* verify_result) {
if (!mdctx_)
return kSignNotInitialised;
@@ -5129,17 +5109,11 @@ void Verify::VerifyFinal(const FunctionCallbackInfo<Value>& args) {
@@ -5254,17 +5234,11 @@ void Verify::VerifyFinal(const FunctionCallbackInfo<Value>& args) {
ArrayBufferViewContents<char> hbuf(args[offset]);
@@ -255,7 +255,7 @@ index 1cc2372fe2e385e9a9db27e38f0da61d62de2e81..cd09cdb3f2244825f6631891b94e61ee
bool verify_result;
Error err = verify->VerifyFinal(pkey, hbuf.data(), hbuf.length(), padding,
@@ -5172,17 +5146,11 @@ void VerifyOneShot(const FunctionCallbackInfo<Value>& args) {
@@ -5297,17 +5271,11 @@ void VerifyOneShot(const FunctionCallbackInfo<Value>& args) {
return CheckThrow(env, SignBase::Error::kSignUnknownDigest);
}
@@ -277,7 +277,7 @@ index 1cc2372fe2e385e9a9db27e38f0da61d62de2e81..cd09cdb3f2244825f6631891b94e61ee
EVP_PKEY_CTX* pkctx = nullptr;
EVPMDPointer mdctx(EVP_MD_CTX_new());
@@ -6181,48 +6149,6 @@ class RSAKeyPairGenerationConfig : public KeyPairGenerationConfig {
@@ -6343,48 +6311,6 @@ class RSAKeyPairGenerationConfig : public KeyPairGenerationConfig {
const unsigned int exponent_;
};
@@ -326,7 +326,7 @@ index 1cc2372fe2e385e9a9db27e38f0da61d62de2e81..cd09cdb3f2244825f6631891b94e61ee
class DSAKeyPairGenerationConfig : public KeyPairGenerationConfig {
public:
DSAKeyPairGenerationConfig(unsigned int modulus_bits, int divisor_bits)
@@ -6456,44 +6382,6 @@ void GenerateKeyPairRSA(const FunctionCallbackInfo<Value>& args) {
@@ -6618,44 +6544,6 @@ void GenerateKeyPairRSA(const FunctionCallbackInfo<Value>& args) {
GenerateKeyPair(args, 2, std::move(config));
}
@@ -371,7 +371,7 @@ index 1cc2372fe2e385e9a9db27e38f0da61d62de2e81..cd09cdb3f2244825f6631891b94e61ee
void GenerateKeyPairDSA(const FunctionCallbackInfo<Value>& args) {
CHECK(args[0]->IsUint32());
const uint32_t modulus_bits = args[0].As<Uint32>()->Value();
@@ -6945,7 +6833,6 @@ void Initialize(Local<Object> target,
@@ -7107,7 +6995,6 @@ void Initialize(Local<Object> target,
env->SetMethod(target, "pbkdf2", PBKDF2);
env->SetMethod(target, "generateKeyPairRSA", GenerateKeyPairRSA);
@@ -380,10 +380,10 @@ index 1cc2372fe2e385e9a9db27e38f0da61d62de2e81..cd09cdb3f2244825f6631891b94e61ee
env->SetMethod(target, "generateKeyPairEC", GenerateKeyPairEC);
env->SetMethod(target, "generateKeyPairNid", GenerateKeyPairNid);
diff --git a/src/node_crypto.h b/src/node_crypto.h
index 07ca412e8f7fc6281553ca90a4c3c8c18726c526..04a06affce1de8c567034d084c43b1a016076353 100644
index 206a19119a73216ffe16f935ee6a9423bff6865f..560694bfd2c1e2ce999b61682b0f3ea757f4f69e 100644
--- a/src/node_crypto.h
+++ b/src/node_crypto.h
@@ -660,7 +660,7 @@ class Sign : public SignBase {
@@ -666,7 +666,7 @@ class Sign : public SignBase {
SignResult SignFinal(
const ManagedEVPPKey& pkey,
int padding,
@@ -392,7 +392,7 @@ index 07ca412e8f7fc6281553ca90a4c3c8c18726c526..04a06affce1de8c567034d084c43b1a0
protected:
static void New(const v8::FunctionCallbackInfo<v8::Value>& args);
@@ -681,7 +681,7 @@ class Verify : public SignBase {
@@ -687,7 +687,7 @@ class Verify : public SignBase {
const char* sig,
int siglen,
int padding,

View File

@@ -8,10 +8,10 @@ The BoringSSL incompatibilities (OPENSSL_memdup) will be shimmed in and this sho
be removed when the associated update is rolled into Chromium.
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index d7eff663a5d7465d33f53930868edca6cb89bf49..863b48c614b331fa93a511b21b997891159bb86e 100644
index cc03ab2e175adbd0a8558097c2df4098c22e045a..dcb6e2c5a2a634c816b744e8fc50f99d885674f3 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -5264,17 +5264,6 @@ bool PublicKeyCipher::Cipher(Environment* env,
@@ -5232,17 +5232,6 @@ bool PublicKeyCipher::Cipher(Environment* env,
return false;
}

View File

@@ -8,7 +8,7 @@ Upstreamed at https://boringssl-review.googlesource.com/c/boringssl/+/38404
and can be removed when that is merged and rolled into Chromium.
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index 2c702d2f051d6b8f59ac53a4e2729ee02ba98a47..d7eff663a5d7465d33f53930868edca6cb89bf49 100644
index 9250246a453a89f29bb607ebcc6c9d07642c3561..cc03ab2e175adbd0a8558097c2df4098c22e045a 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -470,7 +470,6 @@ void SecureContext::Initialize(Environment* env, Local<Object> target) {
@@ -141,7 +141,7 @@ index 2c702d2f051d6b8f59ac53a4e2729ee02ba98a47..d7eff663a5d7465d33f53930868edca6
void SSLWrap<Base>::GetProtocol(const FunctionCallbackInfo<Value>& args) {
Base* w;
diff --git a/src/node_crypto.h b/src/node_crypto.h
index 206a19119a73216ffe16f935ee6a9423bff6865f..6aa4654d5deb07e6e97507c2b746b577ea8a0b17 100644
index 560694bfd2c1e2ce999b61682b0f3ea757f4f69e..0a9c684fa3d3092294b40c4df82d32f98ac6dd79 100644
--- a/src/node_crypto.h
+++ b/src/node_crypto.h
@@ -129,7 +129,6 @@ class SecureContext : public BaseObject {

View File

@@ -12,10 +12,10 @@ when we override ReallocateBufferMemory, so we therefore need to implement
Realloc on the v8 side.
diff --git a/include/v8.h b/include/v8.h
index f3a05531aa8b9d8c2b9c04ffaff505dbbef9e46d..fe86e1a17f2cad844ef92f45a8da6e7fee4eba49 100644
index caae20abef88b7330823ce74218bd300175d1c9a..9d73ba87bd938a3d04d2327de93d48c85ff70d1e 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -4926,6 +4926,13 @@ class V8_EXPORT ArrayBuffer : public Object {
@@ -4919,6 +4919,13 @@ class V8_EXPORT ArrayBuffer : public Object {
*/
virtual void* AllocateUninitialized(size_t length) = 0;
@@ -30,7 +30,7 @@ index f3a05531aa8b9d8c2b9c04ffaff505dbbef9e46d..fe86e1a17f2cad844ef92f45a8da6e7f
* Free the memory block of size |length|, pointed to by |data|.
* That memory is guaranteed to be previously allocated by |Allocate|.
diff --git a/src/api/api.cc b/src/api/api.cc
index 15ccbbe9cca3f15751a720c0cab10d815e59d51d..f6f2ba988d95660637f6733dafdd12db7acaa992 100644
index f64538ec1c47f62caf1ff6383b6b3812bb827c67..d21545a7f1a5ca5f593809d7a6475da20651c116 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -516,6 +516,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) {

View File

@@ -5,10 +5,10 @@ Subject: build_gn.patch
diff --git a/BUILD.gn b/BUILD.gn
index f67cce51b1ececd643271a8c55972571a45fd51d..23180f0a67ebc2eab3b7a0588dfb21823c5ecad9 100644
index 90b7e33972af8befd24b44e86a09f7e442bca881..11cf04af2193c486eb49cc24dff54a4085ad7c16 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -281,7 +281,7 @@ config("internal_config") {
@@ -290,7 +290,7 @@ config("internal_config") {
":v8_header_features",
]
@@ -17,7 +17,7 @@ index f67cce51b1ececd643271a8c55972571a45fd51d..23180f0a67ebc2eab3b7a0588dfb2182
defines += [ "BUILDING_V8_SHARED" ]
}
}
@@ -3780,7 +3780,7 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -3810,7 +3810,7 @@ if (current_toolchain == v8_generator_toolchain) {
"src/interpreter/bytecodes.h",
]
@@ -26,7 +26,7 @@ index f67cce51b1ececd643271a8c55972571a45fd51d..23180f0a67ebc2eab3b7a0588dfb2182
deps = [
":v8_libbase",
@@ -3813,6 +3813,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
@@ -3843,6 +3843,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
configs = [ ":internal_config" ]

View File

@@ -5,10 +5,10 @@ Subject: dcheck.patch
diff --git a/src/api/api.cc b/src/api/api.cc
index d753abd5d2d7e788b7dd96a200d5be0d85f87fe3..68ca3303470448d42fcbc1f3b7794404756b5972 100644
index 4e80aae91a871581261b04ec2a18781ef7836cb8..6228b23b890af55de1c5053d5b3b7b0d5142fa9a 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -8698,7 +8698,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
@@ -8757,7 +8757,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
}
void Isolate::RunMicrotasks() {
@@ -18,10 +18,10 @@ index d753abd5d2d7e788b7dd96a200d5be0d85f87fe3..68ca3303470448d42fcbc1f3b7794404
isolate->default_microtask_queue()->RunMicrotasks(isolate);
}
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 9c68990a7cb6e3160164fefbe8d800e1659e7760..a9935cc42ca3bd8805fb7d5c719676c0032be233 100644
index b7868e5e62f6b13f5e75f9a463b9b71a63612c5c..47ebb3c64f2823bfd541ec7a5f438e953f5d5423 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -5311,9 +5311,9 @@ void Heap::TearDown() {
@@ -5356,9 +5356,9 @@ void Heap::TearDown() {
void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback,
GCType gc_type, void* data) {
DCHECK_NOT_NULL(callback);

View File

@@ -22,7 +22,7 @@ Reviewed-By: Yang Guo <yangguo@chromium.org>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
diff --git a/include/v8.h b/include/v8.h
index fe86e1a17f2cad844ef92f45a8da6e7fee4eba49..3450677471b7276b631ea12a4cd39514c8105b46 100644
index 9d73ba87bd938a3d04d2327de93d48c85ff70d1e..72bcfea94c7d327b2e2f5e2115cac24105a820c7 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1330,6 +1330,10 @@ class V8_EXPORT PrimitiveArray {
@@ -36,7 +36,7 @@ index fe86e1a17f2cad844ef92f45a8da6e7fee4eba49..3450677471b7276b631ea12a4cd39514
void Set(Isolate* isolate, int index, Local<Primitive> item);
Local<Primitive> Get(Isolate* isolate, int index);
};
@@ -2078,6 +2082,8 @@ class V8_EXPORT StackTrace {
@@ -2085,6 +2089,8 @@ class V8_EXPORT StackTrace {
/**
* Returns a StackFrame at a particular index.
*/
@@ -45,7 +45,7 @@ index fe86e1a17f2cad844ef92f45a8da6e7fee4eba49..3450677471b7276b631ea12a4cd39514
Local<StackFrame> GetFrame(Isolate* isolate, uint32_t index) const;
/**
@@ -2774,6 +2780,15 @@ class V8_EXPORT Value : public Data {
@@ -2781,6 +2787,15 @@ class V8_EXPORT Value : public Data {
Local<Boolean> ToBoolean(Isolate* isolate) const;
@@ -61,7 +61,7 @@ index fe86e1a17f2cad844ef92f45a8da6e7fee4eba49..3450677471b7276b631ea12a4cd39514
/**
* Attempts to convert a string to an array index.
* Returns an empty handle if the conversion fails.
@@ -2790,7 +2805,14 @@ class V8_EXPORT Value : public Data {
@@ -2797,7 +2812,14 @@ class V8_EXPORT Value : public Data {
Local<Context> context) const;
V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
@@ -76,7 +76,7 @@ index fe86e1a17f2cad844ef92f45a8da6e7fee4eba49..3450677471b7276b631ea12a4cd39514
V8_WARN_UNUSED_RESULT Maybe<bool> Equals(Local<Context> context,
Local<Value> that) const;
bool StrictEquals(Local<Value> that) const;
@@ -2897,6 +2919,8 @@ class V8_EXPORT String : public Name {
@@ -2903,6 +2925,8 @@ class V8_EXPORT String : public Name {
* Returns the number of bytes in the UTF-8 encoded
* representation of this string.
*/
@@ -85,7 +85,7 @@ index fe86e1a17f2cad844ef92f45a8da6e7fee4eba49..3450677471b7276b631ea12a4cd39514
int Utf8Length(Isolate* isolate) const;
/**
@@ -2953,12 +2977,22 @@ class V8_EXPORT String : public Name {
@@ -2959,12 +2983,22 @@ class V8_EXPORT String : public Name {
// 16-bit character codes.
int Write(Isolate* isolate, uint16_t* buffer, int start = 0, int length = -1,
int options = NO_OPTIONS) const;
@@ -108,7 +108,7 @@ index fe86e1a17f2cad844ef92f45a8da6e7fee4eba49..3450677471b7276b631ea12a4cd39514
/**
* A zero length string.
@@ -3126,6 +3160,8 @@ class V8_EXPORT String : public Name {
@@ -3132,6 +3166,8 @@ class V8_EXPORT String : public Name {
*/
static Local<String> Concat(Isolate* isolate, Local<String> left,
Local<String> right);
@@ -117,7 +117,7 @@ index fe86e1a17f2cad844ef92f45a8da6e7fee4eba49..3450677471b7276b631ea12a4cd39514
/**
* Creates a new external string using the data defined in the given
@@ -3190,6 +3226,8 @@ class V8_EXPORT String : public Name {
@@ -3196,6 +3232,8 @@ class V8_EXPORT String : public Name {
*/
class V8_EXPORT Utf8Value {
public:
@@ -126,7 +126,7 @@ index fe86e1a17f2cad844ef92f45a8da6e7fee4eba49..3450677471b7276b631ea12a4cd39514
Utf8Value(Isolate* isolate, Local<v8::Value> obj);
~Utf8Value();
char* operator*() { return str_; }
@@ -3213,6 +3251,8 @@ class V8_EXPORT String : public Name {
@@ -3219,6 +3257,8 @@ class V8_EXPORT String : public Name {
*/
class V8_EXPORT Value {
public:
@@ -135,7 +135,7 @@ index fe86e1a17f2cad844ef92f45a8da6e7fee4eba49..3450677471b7276b631ea12a4cd39514
Value(Isolate* isolate, Local<v8::Value> obj);
~Value();
uint16_t* operator*() { return str_; }
@@ -5689,6 +5729,8 @@ class V8_EXPORT BooleanObject : public Object {
@@ -5706,6 +5746,8 @@ class V8_EXPORT BooleanObject : public Object {
class V8_EXPORT StringObject : public Object {
public:
static Local<Value> New(Isolate* isolate, Local<String> value);
@@ -144,7 +144,7 @@ index fe86e1a17f2cad844ef92f45a8da6e7fee4eba49..3450677471b7276b631ea12a4cd39514
Local<String> ValueOf() const;
@@ -11131,6 +11173,29 @@ template <class T> Value* Value::Cast(T* value) {
@@ -11234,6 +11276,29 @@ template <class T> Value* Value::Cast(T* value) {
}
@@ -175,10 +175,10 @@ index fe86e1a17f2cad844ef92f45a8da6e7fee4eba49..3450677471b7276b631ea12a4cd39514
#ifdef V8_ENABLE_CHECKS
CheckCast(value);
diff --git a/src/api/api.cc b/src/api/api.cc
index f6f2ba988d95660637f6733dafdd12db7acaa992..d753abd5d2d7e788b7dd96a200d5be0d85f87fe3 100644
index d21545a7f1a5ca5f593809d7a6475da20651c116..4e80aae91a871581261b04ec2a18781ef7836cb8 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -2199,6 +2199,10 @@ int PrimitiveArray::Length() const {
@@ -2200,6 +2200,10 @@ int PrimitiveArray::Length() const {
return array->length();
}
@@ -189,7 +189,7 @@ index f6f2ba988d95660637f6733dafdd12db7acaa992..d753abd5d2d7e788b7dd96a200d5be0d
void PrimitiveArray::Set(Isolate* v8_isolate, int index,
Local<Primitive> item) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
@@ -2212,6 +2216,10 @@ void PrimitiveArray::Set(Isolate* v8_isolate, int index,
@@ -2213,6 +2217,10 @@ void PrimitiveArray::Set(Isolate* v8_isolate, int index,
array->set(index, *i_item);
}
@@ -200,7 +200,7 @@ index f6f2ba988d95660637f6733dafdd12db7acaa992..d753abd5d2d7e788b7dd96a200d5be0d
Local<Primitive> PrimitiveArray::Get(Isolate* v8_isolate, int index) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
i::Handle<i::FixedArray> array = Utils::OpenHandle(this);
@@ -2975,6 +2983,10 @@ void Message::PrintCurrentStackTrace(Isolate* isolate, FILE* out) {
@@ -2996,6 +3004,10 @@ void Message::PrintCurrentStackTrace(Isolate* isolate, FILE* out) {
// --- S t a c k T r a c e ---
@@ -211,7 +211,7 @@ index f6f2ba988d95660637f6733dafdd12db7acaa992..d753abd5d2d7e788b7dd96a200d5be0d
Local<StackFrame> StackTrace::GetFrame(Isolate* v8_isolate,
uint32_t index) const {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
@@ -3562,6 +3574,34 @@ MaybeLocal<BigInt> Value::ToBigInt(Local<Context> context) const {
@@ -3583,6 +3595,34 @@ MaybeLocal<BigInt> Value::ToBigInt(Local<Context> context) const {
RETURN_ESCAPED(result);
}
@@ -246,7 +246,7 @@ index f6f2ba988d95660637f6733dafdd12db7acaa992..d753abd5d2d7e788b7dd96a200d5be0d
bool Value::BooleanValue(Isolate* v8_isolate) const {
return Utils::OpenHandle(this)->BooleanValue(
reinterpret_cast<i::Isolate*>(v8_isolate));
@@ -3951,6 +3991,11 @@ MaybeLocal<Uint32> Value::ToArrayIndex(Local<Context> context) const {
@@ -3972,6 +4012,11 @@ MaybeLocal<Uint32> Value::ToArrayIndex(Local<Context> context) const {
return Local<Uint32>();
}
@@ -258,7 +258,7 @@ index f6f2ba988d95660637f6733dafdd12db7acaa992..d753abd5d2d7e788b7dd96a200d5be0d
Maybe<bool> Value::Equals(Local<Context> context, Local<Value> that) const {
i::Isolate* isolate = Utils::OpenHandle(*context)->GetIsolate();
auto self = Utils::OpenHandle(this);
@@ -5168,6 +5213,10 @@ bool String::ContainsOnlyOneByte() const {
@@ -5189,6 +5234,10 @@ bool String::ContainsOnlyOneByte() const {
return helper.Check(*str);
}
@@ -269,7 +269,7 @@ index f6f2ba988d95660637f6733dafdd12db7acaa992..d753abd5d2d7e788b7dd96a200d5be0d
int String::Utf8Length(Isolate* isolate) const {
i::Handle<i::String> str = Utils::OpenHandle(this);
str = i::String::Flatten(reinterpret_cast<i::Isolate*>(isolate), str);
@@ -5320,6 +5369,14 @@ static int WriteUtf8Impl(i::Vector<const Char> string, char* write_start,
@@ -5341,6 +5390,14 @@ static int WriteUtf8Impl(i::Vector<const Char> string, char* write_start,
}
} // anonymous namespace
@@ -284,7 +284,7 @@ index f6f2ba988d95660637f6733dafdd12db7acaa992..d753abd5d2d7e788b7dd96a200d5be0d
int String::WriteUtf8(Isolate* v8_isolate, char* buffer, int capacity,
int* nchars_ref, int options) const {
i::Handle<i::String> str = Utils::OpenHandle(this);
@@ -5358,6 +5415,17 @@ static inline int WriteHelper(i::Isolate* isolate, const String* string,
@@ -5379,6 +5436,17 @@ static inline int WriteHelper(i::Isolate* isolate, const String* string,
return end - start;
}
@@ -302,7 +302,7 @@ index f6f2ba988d95660637f6733dafdd12db7acaa992..d753abd5d2d7e788b7dd96a200d5be0d
int String::WriteOneByte(Isolate* isolate, uint8_t* buffer, int start,
int length, int options) const {
return WriteHelper(reinterpret_cast<i::Isolate*>(isolate), this, buffer,
@@ -6269,6 +6337,11 @@ MaybeLocal<String> String::NewFromTwoByte(Isolate* isolate,
@@ -6323,6 +6391,11 @@ MaybeLocal<String> String::NewFromTwoByte(Isolate* isolate,
return result;
}
@@ -314,7 +314,7 @@ index f6f2ba988d95660637f6733dafdd12db7acaa992..d753abd5d2d7e788b7dd96a200d5be0d
Local<String> v8::String::Concat(Isolate* v8_isolate, Local<String> left,
Local<String> right) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
@@ -6539,6 +6612,10 @@ bool v8::BooleanObject::ValueOf() const {
@@ -6593,6 +6666,10 @@ bool v8::BooleanObject::ValueOf() const {
return js_primitive_wrapper->value().IsTrue(isolate);
}
@@ -325,7 +325,7 @@ index f6f2ba988d95660637f6733dafdd12db7acaa992..d753abd5d2d7e788b7dd96a200d5be0d
Local<v8::Value> v8::StringObject::New(Isolate* v8_isolate,
Local<String> value) {
i::Handle<i::String> string = Utils::OpenHandle(*value);
@@ -9078,6 +9155,9 @@ bool MicrotasksScope::IsRunningMicrotasks(Isolate* v8_isolate) {
@@ -9137,6 +9214,9 @@ bool MicrotasksScope::IsRunningMicrotasks(Isolate* v8_isolate) {
return microtask_queue->IsRunningMicrotasks();
}
@@ -335,7 +335,7 @@ index f6f2ba988d95660637f6733dafdd12db7acaa992..d753abd5d2d7e788b7dd96a200d5be0d
String::Utf8Value::Utf8Value(v8::Isolate* isolate, v8::Local<v8::Value> obj)
: str_(nullptr), length_(0) {
if (obj.IsEmpty()) return;
@@ -9095,6 +9175,9 @@ String::Utf8Value::Utf8Value(v8::Isolate* isolate, v8::Local<v8::Value> obj)
@@ -9154,6 +9234,9 @@ String::Utf8Value::Utf8Value(v8::Isolate* isolate, v8::Local<v8::Value> obj)
String::Utf8Value::~Utf8Value() { i::DeleteArray(str_); }

View File

@@ -12,10 +12,10 @@ This patch can be safely removed if, when it is removed, `node.lib` does not
contain any standard C++ library exports (e.g. `std::ostringstream`).
diff --git a/BUILD.gn b/BUILD.gn
index dd08294f26ba634330fd4d3b574708447f6809ce..58b4fb993e468bffc258c59fd7bf5c829e28446c 100644
index b1b2d17d19a706ba1a035484625de0000214c7f9..bb51f495489c8b52416744cb86111866a4bb7e5d 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -281,6 +281,10 @@ config("internal_config") {
@@ -290,6 +290,10 @@ config("internal_config") {
":v8_header_features",
]

View File

@@ -6,10 +6,10 @@ Subject: Export symbols needed for Windows build
These symbols are required to build v8 with BUILD_V8_SHARED on Windows.
diff --git a/src/objects/objects.h b/src/objects/objects.h
index c98b60d70fa889dc393ca63aba4d116fa8fb2ccd..9db7958f5ef23d5d781505d3ea724149427370bf 100644
index 4f06c40e11a0fc85adafcddb38e21594ba479910..6b3f5188605b247b1405a62bd9f4e5e410ab3c2b 100644
--- a/src/objects/objects.h
+++ b/src/objects/objects.h
@@ -811,7 +811,7 @@ enum class KeyCollectionMode {
@@ -803,7 +803,7 @@ enum class KeyCollectionMode {
// Utility superclass for stack-allocated objects that must be updated
// on gc. It provides two ways for the gc to update instances, either
// iterating or updating after gc.
@@ -19,7 +19,7 @@ index c98b60d70fa889dc393ca63aba4d116fa8fb2ccd..9db7958f5ef23d5d781505d3ea724149
explicit inline Relocatable(Isolate* isolate);
inline virtual ~Relocatable();
diff --git a/src/objects/ordered-hash-table.h b/src/objects/ordered-hash-table.h
index 21decaeba72246ef95be0f031c605c7f840715b1..d661a11cf48f51eb6080cc086a7a26b4bd497cae 100644
index 590846f1302775c0ee0f85767d23701bf99c9133..611874eaf7a5132478006a87ca1a5939fe754785 100644
--- a/src/objects/ordered-hash-table.h
+++ b/src/objects/ordered-hash-table.h
@@ -60,7 +60,7 @@ namespace internal {

View File

@@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch
Needed in order to target mksnapshot for mksnapshot zip.
diff --git a/BUILD.gn b/BUILD.gn
index 23180f0a67ebc2eab3b7a0588dfb21823c5ecad9..dd08294f26ba634330fd4d3b574708447f6809ce 100644
index 11cf04af2193c486eb49cc24dff54a4085ad7c16..b1b2d17d19a706ba1a035484625de0000214c7f9 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -3791,7 +3791,6 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -3821,7 +3821,6 @@ if (current_toolchain == v8_generator_toolchain) {
if (current_toolchain == v8_snapshot_toolchain) {
v8_executable("mksnapshot") {

View File

@@ -9,10 +9,10 @@ higher versions, but native module compiling with this version
will have an issue.
diff --git a/include/v8config.h b/include/v8config.h
index 40d23c35c186e4def1fcf59c28527de292d9fd7a..7d1ef7b5bf0ff6693b8a04afc1e319219c14e230 100644
index 2307dbe534da471da75fa020252f217b1e441004..3978c7d52db672aaa2c413f9030ad3edc1b8e1bf 100644
--- a/include/v8config.h
+++ b/include/v8config.h
@@ -388,10 +388,13 @@
@@ -389,10 +389,13 @@
# define V8_NOINLINE /* NOT SUPPORTED */
#endif
@@ -28,7 +28,7 @@ index 40d23c35c186e4def1fcf59c28527de292d9fd7a..7d1ef7b5bf0ff6693b8a04afc1e31921
#else
# define V8_DEPRECATED(message)
#endif
@@ -399,7 +402,11 @@
@@ -400,7 +403,11 @@
// A macro (V8_DEPRECATE_SOON) to make it easier to see what will be deprecated.
#if defined(V8_IMMINENT_DEPRECATION_WARNINGS)

View File

@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20Inf=C3=BChr?= <dinfuehr@chromium.org>
Date: Fri, 13 Dec 2019 14:13:21 +0100
Subject: [objects] Fix memory leak in PrototypeUsers::Add
Subject: Fix memory leak in PrototypeUsers::Add
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -23,7 +23,7 @@ Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65456}
diff --git a/src/objects/objects.cc b/src/objects/objects.cc
index 635a5b2e108ca3257dc2131ec375bb6bfbb556e1..89a13434294affd49c971df549a718ea24ea235b 100644
index ffe9555238aa8ae9111c6d7f43178f3e298edbb0..df192142c16de26678f832b1f7107c383f28ff2a 100644
--- a/src/objects/objects.cc
+++ b/src/objects/objects.cc
@@ -4044,6 +4044,13 @@ Handle<WeakArrayList> PrototypeUsers::Add(Isolate* isolate,

View File

@@ -12,7 +12,7 @@ By moving some functions out of the the arm64-assembler header file,
this error no longer seems to happen.
diff --git a/src/codegen/arm64/assembler-arm64.cc b/src/codegen/arm64/assembler-arm64.cc
index ea2f4696bdbca1468c67acd3ced4c19f4cc698aa..7ef52a8b508a7388d5781c9508accbaa73378834 100644
index dc2efddc2379354e45c0d5a1afab1e379f8ea80b..294b7802dedacf16c10b6216ea7943824313ce60 100644
--- a/src/codegen/arm64/assembler-arm64.cc
+++ b/src/codegen/arm64/assembler-arm64.cc
@@ -3588,6 +3588,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift,
@@ -39,7 +39,7 @@ index ea2f4696bdbca1468c67acd3ced4c19f4cc698aa..7ef52a8b508a7388d5781c9508accbaa
const Operand& operand, FlagsUpdate S, AddSubOp op) {
DCHECK_EQ(rd.SizeInBits(), rn.SizeInBits());
diff --git a/src/codegen/arm64/assembler-arm64.h b/src/codegen/arm64/assembler-arm64.h
index 23e8acb1f95c913623aaa41c3bf53906e6247606..54ff81749b1b47cb192e442863c01778b57af1d5 100644
index 04fbaf3fb0105ea082a09a09ac02f06f5d0c53ef..5bea3dcd328f4b94cfa9038d1216a1ebe6a17d73 100644
--- a/src/codegen/arm64/assembler-arm64.h
+++ b/src/codegen/arm64/assembler-arm64.h
@@ -2103,11 +2103,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {

View File

@@ -0,0 +1,31 @@
#!/usr/bin/env python
import argparse
import json
import os
import sys
from lib import git
def export_patches(dirs):
for patch_dir, repo in dirs.iteritems():
git.export_patches(repo=repo, out_dir=patch_dir)
def parse_args():
parser = argparse.ArgumentParser(description='Export Electron patches')
parser.add_argument('config', nargs='+',
type=argparse.FileType('r'),
help='patches\' config(s) in the JSON format')
return parser.parse_args()
def main():
configs = parse_args().config
for config_json in configs:
export_patches(json.load(config_json))
if __name__ == '__main__':
main()

View File

@@ -6,115 +6,7 @@ import re
import subprocess
import sys
def guess_base_commit(repo):
"""Guess which commit the patches might be based on"""
try:
args = [
'git',
'-C',
repo,
'rev-parse',
'--verify',
'refs/patches/upstream-head',
]
upstream_head = subprocess.check_output(args).strip()
args = [
'git',
'-C',
repo,
'rev-list',
'--count',
upstream_head + '..',
]
num_commits = subprocess.check_output(args).strip()
return [upstream_head, num_commits]
except subprocess.CalledProcessError:
args = [
'git',
'-C',
repo,
'describe',
'--tags',
]
return subprocess.check_output(args).rsplit('-', 2)[0:2]
def format_patch(repo, since):
args = [
'git',
'-C',
repo,
'-c',
'core.attributesfile=' + os.path.join(os.path.dirname(os.path.realpath(__file__)), '.electron.attributes'),
# Ensure it is not possible to match anything
# Disabled for now as we have consistent chunk headers
# '-c',
# 'diff.electron.xfuncname=$^',
'format-patch',
'--keep-subject',
'--no-stat',
'--stdout',
# Per RFC 3676 the signature is separated from the body by a line with
# '-- ' on it. If the signature option is omitted the signature defaults
# to the Git version number.
'--no-signature',
# The name of the parent commit object isn't useful information in this
# context, so zero it out to avoid needless patch-file churn.
'--zero-commit',
# Some versions of git print out different numbers of characters in the
# 'index' line of patches, so pass --full-index to get consistent
# behaviour.
'--full-index',
since
]
return subprocess.check_output(args)
def split_patches(patch_data):
"""Split a concatenated series of patches into N separate patches"""
patches = []
patch_start = re.compile('^From [0-9a-f]+ ')
for line in patch_data.splitlines():
if patch_start.match(line):
patches.append([])
patches[-1].append(line)
return patches
def munge_subject_to_filename(subject):
"""Derive a suitable filename from a commit's subject"""
if subject.endswith('.patch'):
subject = subject[:-6]
return re.sub(r'[^A-Za-z0-9-]+', '_', subject).strip('_').lower() + '.patch'
def get_file_name(patch):
"""Return the name of the file to which the patch should be written"""
for line in patch:
if line.startswith('Patch-Filename: '):
return line[len('Patch-Filename: '):]
# If no patch-filename header, munge the subject.
for line in patch:
if line.startswith('Subject: '):
return munge_subject_to_filename(line[len('Subject: '):])
def remove_patch_filename(patch):
"""Strip out the Patch-Filename trailer from a patch's message body"""
force_keep_next_line = False
for i, l in enumerate(patch):
is_patchfilename = l.startswith('Patch-Filename: ')
next_is_patchfilename = i < len(patch) - 1 and patch[i+1].startswith('Patch-Filename: ')
if not force_keep_next_line and (is_patchfilename or (next_is_patchfilename and len(l.rstrip()) == 0)):
pass # drop this line
else:
yield l
force_keep_next_line = l.startswith('Subject: ')
from lib import git
def main(argv):
parser = argparse.ArgumentParser()
@@ -127,32 +19,7 @@ def main(argv):
"most recent tag or remote branch.")
args = parser.parse_args(argv)
repo = '.'
patch_range = args.patch_range
if patch_range is None:
patch_range, num_patches = guess_base_commit(repo)
sys.stderr.write("Exporting {} patches since {}\n".format(num_patches, patch_range))
patch_data = format_patch(repo, patch_range)
patches = split_patches(patch_data)
out_dir = args.output
try:
os.mkdir(out_dir)
except OSError:
pass
# remove old patches, so that deleted commits are correctly reflected in the
# patch files (as a removed file)
for p in os.listdir(out_dir):
if p.endswith('.patch'):
os.remove(os.path.join(out_dir, p))
with open(os.path.join(out_dir, '.patches'), 'w') as pl:
for patch in patches:
filename = get_file_name(patch)
with open(os.path.join(out_dir, filename), 'w') as f:
f.write('\n'.join(remove_patch_filename(patch)).rstrip('\n') + '\n')
pl.write(filename + '\n')
git.export_patches('.', args.output, patch_range=args.patch_range)
if __name__ == '__main__':

View File

@@ -7,7 +7,9 @@ structure, or make assumptions about the passed arguments or calls' outcomes.
"""
import os
import re
import subprocess
import sys
def is_repo_root(path):
@@ -126,7 +128,7 @@ def reset(repo):
def commit(repo, author, message):
""" Commit whatever in the index is now."""
"""Commit whatever in the index is now."""
# Let's setup committer info so git won't complain about it being missing.
# TODO: Is there a better way to set committer's name and email?
@@ -142,3 +144,143 @@ def commit(repo, author, message):
return_code = subprocess.call(args, env=env)
committed_successfully = (return_code == 0)
return committed_successfully
def get_upstream_head(repo):
args = [
'git',
'-C',
repo,
'rev-parse',
'--verify',
'refs/patches/upstream-head',
]
return subprocess.check_output(args).strip()
def get_commit_count(repo, commit_range):
args = [
'git',
'-C',
repo,
'rev-list',
'--count',
commit_range
]
return int(subprocess.check_output(args).strip())
def guess_base_commit(repo):
"""Guess which commit the patches might be based on"""
try:
upstream_head = get_upstream_head(repo)
num_commits = get_commit_count(repo, upstream_head + '..')
return [upstream_head, num_commits]
except subprocess.CalledProcessError:
args = [
'git',
'-C',
repo,
'describe',
'--tags',
]
return subprocess.check_output(args).rsplit('-', 2)[0:2]
def format_patch(repo, since):
args = [
'git',
'-C',
repo,
'-c',
'core.attributesfile=' + os.path.join(os.path.dirname(os.path.realpath(__file__)), '.electron.attributes'),
# Ensure it is not possible to match anything
# Disabled for now as we have consistent chunk headers
# '-c',
# 'diff.electron.xfuncname=$^',
'format-patch',
'--keep-subject',
'--no-stat',
'--stdout',
# Per RFC 3676 the signature is separated from the body by a line with
# '-- ' on it. If the signature option is omitted the signature defaults
# to the Git version number.
'--no-signature',
# The name of the parent commit object isn't useful information in this
# context, so zero it out to avoid needless patch-file churn.
'--zero-commit',
# Some versions of git print out different numbers of characters in the
# 'index' line of patches, so pass --full-index to get consistent
# behaviour.
'--full-index',
since
]
return subprocess.check_output(args)
def split_patches(patch_data):
"""Split a concatenated series of patches into N separate patches"""
patches = []
patch_start = re.compile('^From [0-9a-f]+ ')
for line in patch_data.splitlines():
if patch_start.match(line):
patches.append([])
patches[-1].append(line)
return patches
def munge_subject_to_filename(subject):
"""Derive a suitable filename from a commit's subject"""
if subject.endswith('.patch'):
subject = subject[:-6]
return re.sub(r'[^A-Za-z0-9-]+', '_', subject).strip('_').lower() + '.patch'
def get_file_name(patch):
"""Return the name of the file to which the patch should be written"""
for line in patch:
if line.startswith('Patch-Filename: '):
return line[len('Patch-Filename: '):]
# If no patch-filename header, munge the subject.
for line in patch:
if line.startswith('Subject: '):
return munge_subject_to_filename(line[len('Subject: '):])
def remove_patch_filename(patch):
"""Strip out the Patch-Filename trailer from a patch's message body"""
force_keep_next_line = False
for i, l in enumerate(patch):
is_patchfilename = l.startswith('Patch-Filename: ')
next_is_patchfilename = i < len(patch) - 1 and patch[i+1].startswith('Patch-Filename: ')
if not force_keep_next_line and (is_patchfilename or (next_is_patchfilename and len(l.rstrip()) == 0)):
pass # drop this line
else:
yield l
force_keep_next_line = l.startswith('Subject: ')
def export_patches(repo, out_dir, patch_range=None):
if patch_range is None:
patch_range, num_patches = guess_base_commit(repo)
sys.stderr.write("Exporting {} patches since {}\n".format(num_patches, patch_range))
patch_data = format_patch(repo, patch_range)
patches = split_patches(patch_data)
try:
os.mkdir(out_dir)
except OSError:
pass
# remove old patches, so that deleted commits are correctly reflected in the
# patch files (as a removed file)
for p in os.listdir(out_dir):
if p.endswith('.patch'):
os.remove(os.path.join(out_dir, p))
with open(os.path.join(out_dir, '.patches'), 'w') as pl:
for patch in patches:
filename = get_file_name(patch)
with open(os.path.join(out_dir, filename), 'w') as f:
f.write('\n'.join(remove_patch_filename(patch)).rstrip('\n') + '\n')
pl.write(filename + '\n')