feat: Upgrade to Chromium 71.0.3578.98 (#15966)

This commit is contained in:
Robo 2019-01-12 06:30:43 +05:30 committed by Jeremy Apthorp
parent 92ddfd0d4c
commit 52fe92d02e
204 changed files with 2291 additions and 1760 deletions

View file

@ -1 +1,3 @@
implement_ssl_get_tlsext_status_type.patch
add_ec_group_order_bits_for_openssl_compatibility.patch
add_ec_key_key2buf_for_openssl_compatibility.patch

View file

@ -0,0 +1,39 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jeremy Apthorp <jeremya@chromium.org>
Date: Wed, 19 Dec 2018 14:42:26 -0800
Subject: Add EC_GROUP_order_bits for OpenSSL compatibility
Change-Id: I37149fa4274357d84befff85728ce2337131afa7
Reviewed-on: https://boringssl-review.googlesource.com/c/33804
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/fipsmodule/ec/ec.c b/crypto/fipsmodule/ec/ec.c
index 908e35e9d04e657c13ba61c8ea5bf4a4519228c5..43e170b9190bf1813216b10863bbaf6402331161 100644
--- a/crypto/fipsmodule/ec/ec.c
+++ b/crypto/fipsmodule/ec/ec.c
@@ -605,6 +605,10 @@ int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx) {
return 1;
}
+int EC_GROUP_order_bits(const EC_GROUP *group) {
+ return BN_num_bits(&group->order);
+}
+
int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor,
BN_CTX *ctx) {
// All |EC_GROUP|s have cofactor 1.
diff --git a/include/openssl/ec.h b/include/openssl/ec.h
index 41a9c34c5ad1bbfdff8e37c1e245ac7fac7a3869..e4195fc15a26e61ef1e74ac7054ddabb256ae9a3 100644
--- a/include/openssl/ec.h
+++ b/include/openssl/ec.h
@@ -133,6 +133,9 @@ OPENSSL_EXPORT const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group);
// |group| that specifies the order of the group.
OPENSSL_EXPORT const BIGNUM *EC_GROUP_get0_order(const EC_GROUP *group);
+// EC_GROUP_order_bits returns the number of bits of the order of |group|.
+OPENSSL_EXPORT int EC_GROUP_order_bits(const EC_GROUP *group);
+
// EC_GROUP_get_cofactor sets |*cofactor| to the cofactor of |group| using
// |ctx|, if it's not NULL. It returns one on success and zero otherwise.
OPENSSL_EXPORT int EC_GROUP_get_cofactor(const EC_GROUP *group,

View file

@ -0,0 +1,65 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jeremy Apthorp <jeremya@chromium.org>
Date: Wed, 19 Dec 2018 14:46:14 -0800
Subject: Add EC_KEY_key2buf for OpenSSL compatibility
Change-Id: If45ef3a9bb757bd0c7f592f40ececaf4aa2f607d
Reviewed-on: https://boringssl-review.googlesource.com/c/33824
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
diff --git a/crypto/fipsmodule/ec/ec_key.c b/crypto/fipsmodule/ec/ec_key.c
index a6d469767adfad1c9095cc58c567b10c71e95cfa..ba69e83cb8f49c70a98c8fd68fd7fa4b122da5cd 100644
--- a/crypto/fipsmodule/ec/ec_key.c
+++ b/crypto/fipsmodule/ec/ec_key.c
@@ -394,6 +394,33 @@ err:
return ok;
}
+size_t EC_KEY_key2buf(EC_KEY *key, point_conversion_form_t form,
+ unsigned char **out_buf, BN_CTX *ctx) {
+ if (key == NULL || key->pub_key == NULL || key->group == NULL) {
+ return 0;
+ }
+
+ const size_t len =
+ EC_POINT_point2oct(key->group, key->pub_key, form, NULL, 0, ctx);
+ if (len == 0) {
+ return 0;
+ }
+
+ uint8_t *buf = OPENSSL_malloc(len);
+ if (buf == NULL) {
+ return 0;
+ }
+
+ if (EC_POINT_point2oct(key->group, key->pub_key, form, buf, len, ctx) !=
+ len) {
+ OPENSSL_free(buf);
+ return 0;
+ }
+
+ *out_buf = buf;
+ return len;
+}
+
int EC_KEY_generate_key(EC_KEY *key) {
if (key == NULL || key->group == NULL) {
OPENSSL_PUT_ERROR(EC, ERR_R_PASSED_NULL_PARAMETER);
diff --git a/include/openssl/ec_key.h b/include/openssl/ec_key.h
index 9bc788758b26bb4883626a80f3e0b8c8d6eb7974..3b1a5666fa1f2071212393a3f5c8d5394c32efeb 100644
--- a/include/openssl/ec_key.h
+++ b/include/openssl/ec_key.h
@@ -177,6 +177,12 @@ OPENSSL_EXPORT int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key,
BIGNUM *x,
BIGNUM *y);
+// EC_KEY_key2buf encodes the public key in |key| to an allocated octet string
+// and sets |*out_buf| to point to it. It returns the length of the encoded
+// octet string or zero if an error occurred.
+OPENSSL_EXPORT size_t EC_KEY_key2buf(EC_KEY *key, point_conversion_form_t form,
+ unsigned char **out_buf, BN_CTX *ctx);
+
// Key generation.

View file

@ -14,7 +14,7 @@ Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index ae8b8385fc73701a4346202f213b5974af4e2aed..0f3d1747173ffb09eafd5c7d5d692ae3c35c9874 100644
index c0d44ce2820fb20273b453def0b5bcb5ddcc14e9..f0d9dd45e2c41968a84c8a3f31a8c9e4f621f018 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -4268,6 +4268,14 @@ OPENSSL_EXPORT int OPENSSL_init_ssl(uint64_t opts,

View file

@ -52,7 +52,6 @@ allow_nested_error_trackers.patch
blink_initialization_order.patch
disable_detach_webview_frame.patch
ssl_security_state_tab_helper.patch
leveldb_ssize_t.patch
exclude-a-few-test-files-from-build.patch
expose-net-observer-api.patch
desktop_media_list.patch

View file

@ -5,7 +5,7 @@ Subject: accelerator.patch
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
index 7e55ef366ac8320f730cdcb268453b1fa2710887..9b000ab1dfb85c097e879eacbfe69dc052960766 100644
index d56e87be04cb4d765d0aa0eae1af86a9f562b222..9364ac4b75debc61e201e0da7eaef104acea770d 100644
--- a/ui/base/accelerators/accelerator.cc
+++ b/ui/base/accelerators/accelerator.cc
@@ -11,6 +11,7 @@
@ -42,7 +42,7 @@ index 7e55ef366ac8320f730cdcb268453b1fa2710887..9b000ab1dfb85c097e879eacbfe69dc0
#if defined(OS_WIN)
// Our fallback is to try translate the key code to a regular character
// unless it is one of digits (VK_0 to VK_9). Some keyboard
@@ -148,18 +155,14 @@ base::string16 Accelerator::GetShortcutText() const {
@@ -156,18 +163,14 @@ base::string16 Accelerator::GetShortcutText() const {
// accent' for '0'). For display in the menu (e.g. Ctrl-0 for the
// default zoom level), we leave VK_[0-9] alone without translation.
wchar_t key;
@ -67,7 +67,7 @@ index 7e55ef366ac8320f730cdcb268453b1fa2710887..9b000ab1dfb85c097e879eacbfe69dc0
}
// Checking whether the character used for the accelerator is alphanumeric.
@@ -223,7 +226,7 @@ base::string16 Accelerator::ApplyLongFormModifiers(
@@ -231,7 +234,7 @@ base::string16 Accelerator::ApplyLongFormModifiers(
// more information.
if (IsCtrlDown())
shortcut = ApplyModifierToAcceleratorString(shortcut, IDS_APP_CTRL_KEY);

View file

@ -12,7 +12,7 @@ when we override ReallocateBufferMemory, so we therefore need to implement
Realloc on the v8 side and correspondingly in gin.
diff --git a/gin/array_buffer.cc b/gin/array_buffer.cc
index f84934bfd712dbad0e85d908165a5a4033bff170..fc23fef68b6fb9a4cccdf99bc427078faed2f62e 100644
index a02797e94f61e8c71428633a4585a625dc5aadbd..305b7d307d233af699e3f495f85de0f8097ff311 100644
--- a/gin/array_buffer.cc
+++ b/gin/array_buffer.cc
@@ -43,6 +43,10 @@ void* ArrayBufferAllocator::AllocateUninitialized(size_t length) {
@ -39,10 +39,10 @@ index 2aef366ac8194aa261cbca6abc051f7da8a988d3..3c7d66c81032636abcca4f1538ce9b7f
GIN_EXPORT static ArrayBufferAllocator* SharedInstance();
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
index de5c4b11829141913784fc3c7190ab86368cf675..f88a404c95c12ab5647bf88bd7be2504699b7ff7 100644
index 5db87633802ccc7efbd6b673505cd5c00deabf6e..235be280c4d9e54bcc2e3f60fc10036ad3b08356 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -671,6 +671,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
@@ -660,6 +660,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
size, WTF::ArrayBufferContents::kDontInitialize);
}
@ -54,10 +54,10 @@ index de5c4b11829141913784fc3c7190ab86368cf675..f88a404c95c12ab5647bf88bd7be2504
WTF::ArrayBufferContents::FreeMemory(data);
}
diff --git a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
index 83133e1a836d0c3b25e931e0c19ebcdb987173cf..2c64bd4d5cf3ecd71ee0711cecd1c149e8795797 100644
index 127d6d39d5b089f3a91edc100be24b046c4da4fe..5ee94712c0fbf0a16eeca7aadd1a5be187bcf49e 100644
--- a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
+++ b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
@@ -121,6 +121,11 @@ void* ArrayBufferContents::AllocateMemoryOrNull(size_t size,
@@ -122,6 +122,11 @@ void* ArrayBufferContents::AllocateMemoryOrNull(size_t size,
return AllocateMemoryWithFlags(size, policy, base::PartitionAllocReturnNull);
}
@ -70,10 +70,10 @@ index 83133e1a836d0c3b25e931e0c19ebcdb987173cf..2c64bd4d5cf3ecd71ee0711cecd1c149
Partitions::ArrayBufferPartition()->Free(data);
}
diff --git a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h
index a87a02bdaf4b7050752f05984ff1c0170f64a203..cf7f2940d48b03c51b997729fc7ea033dc0d1bfe 100644
index 19ae6eb4a08c3499674f906c53164fa9194e5cf2..2f75c4b46c361f411c41242c406358da974ff7e4 100644
--- a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h
+++ b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h
@@ -187,6 +187,7 @@ class WTF_EXPORT ArrayBufferContents {
@@ -134,6 +134,7 @@ class WTF_EXPORT ArrayBufferContents {
void CopyTo(ArrayBufferContents& other);
static void* AllocateMemoryOrNull(size_t, InitializationPolicy);

View file

@ -6,10 +6,10 @@ Subject: allow_webview_file_url.patch
Allow webview to load non-web URLs.
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index 2ed617dbab85dc45184cc0883669f9b5401d5766..6830ea9a0c18affb54ecab7cead5059a7e27bbed 100644
index 8f33f39eb1d4bcae2e1d78890ee5e9e2d88b1e75..7645b12dbccf5a714e32c74c437216fdca9ac286 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -1459,6 +1459,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
@@ -1480,6 +1480,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
!policy->IsWebSafeScheme(info.common_params.url.scheme()) &&
!is_external_protocol;

View file

@ -5,7 +5,7 @@ Subject: blink-worker-enable-csp-in-file-scheme.patch
diff --git a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
index fae3bbccaf04ae653b52b484334a1b402a127b76..5a13426281adb0d51a5259346c1f588a67a78e07 100644
index 4bc3d11ba0270bb4bba863724688ee5b6bc063d2..4f9accd65348b9c8f23f3e2d160e836c7841420b 100644
--- a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
+++ b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
@@ -261,7 +261,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy(

View file

@ -21,11 +21,11 @@ index 39831f1902c6ab85a0a4cac61a614931ee050ed6..fddb013aa122049de7142bca624d7d07
// http://dev.w3.org/2006/webapi/FileAPI/#file-attrs
long long lastModified() const;
diff --git a/third_party/blink/renderer/core/fileapi/file.idl b/third_party/blink/renderer/core/fileapi/file.idl
index a74beceda3e769aaf5673cabc6663bb883f54705..7196fd5f5f9e51616d49c09142247c8382e83cc0 100644
index 940f8e62ce228beaf71f5a4be88539a431415ab1..0cf315636afe0e5e1533b3372cdfe2c09ec581e1 100644
--- a/third_party/blink/renderer/core/fileapi/file.idl
+++ b/third_party/blink/renderer/core/fileapi/file.idl
@@ -32,6 +32,7 @@
Exposed=(Window,Worker)
@@ -33,6 +33,7 @@
Serializable
] interface File : Blob {
readonly attribute DOMString name;
+ readonly attribute DOMString path;

View file

@ -14,10 +14,10 @@ when there is code doing that.
This patch reverts the change to fix the crash in Electron.
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index a7ddc156c2b13acaaf9295df98dfa3955e9a015b..d684cbcaf2a82f1d7423522bf4cc48713a13dead 100644
index 19862e24a7f5aa9ae85a7731803aaedd56109354..9cd8833ae9b40a2bf9a875fb357459e858f2b180 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -340,10 +340,6 @@ void LocalFrame::Detach(FrameDetachType type) {
@@ -394,10 +394,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
}
CHECK(!view_ || !view_->IsAttached());
@ -28,7 +28,7 @@ index a7ddc156c2b13acaaf9295df98dfa3955e9a015b..d684cbcaf2a82f1d7423522bf4cc4871
if (!Client())
return;
@@ -361,6 +357,10 @@ void LocalFrame::Detach(FrameDetachType type) {
@@ -415,6 +411,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
// Notify ScriptController that the frame is closing, since its cleanup ends
// up calling back to LocalFrameClient via WindowProxy.
GetScriptController().ClearForClose();

View file

@ -5,10 +5,10 @@ Subject: blink_world_context.patch
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
index e2f071b74c17c4d8854a66c461e6f3fa34ee5eaf..03f725429382a3b2ebc9e73600dc1b92168592b1 100644
index 68b3ae21865f7c23072e2783e6c474cd0d96b806..6318eb4bac9ac38185f3192c73489966d6918a9b 100644
--- a/third_party/blink/public/web/web_local_frame.h
+++ b/third_party/blink/public/web/web_local_frame.h
@@ -466,6 +466,9 @@ class WebLocalFrame : public WebFrame {
@@ -441,6 +441,9 @@ class WebLocalFrame : public WebFrame {
// be calling this API.
virtual v8::Local<v8::Context> MainWorldScriptContext() const = 0;
@ -19,10 +19,10 @@ index e2f071b74c17c4d8854a66c461e6f3fa34ee5eaf..03f725429382a3b2ebc9e73600dc1b92
// that the script evaluated to with callback. Script execution can be
// suspend.
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
index fbadba8e0f240ce48ba26ad01573a97203a123ab..ac062b3967e61def6484bb266b55e6006bb0fcdd 100644
index a7c0e79100e18fe02469a8453c84713ee68d5019..2f71ed674e4cb41e42b320e7bb0373dfb01df519 100644
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
@@ -885,6 +885,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
@@ -891,6 +891,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
return MainWorldScriptContext()->Global();
}
@ -37,10 +37,10 @@ index fbadba8e0f240ce48ba26ad01573a97203a123ab..ac062b3967e61def6484bb266b55e600
return BindingSecurity::ShouldAllowAccessToFrame(
CurrentDOMWindow(V8PerIsolateData::MainThreadIsolate()),
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
index 9b07d3bc3e50775225fafc020f6264c6b3f4cd15..8420f56040c87643365d40bd17ff6071e81eb4f8 100644
index e857ff94ca93d44b67b2b850516fc6a93ac344e4..69ad8c4e747ac1ee311135371d932cf0b15b377c 100644
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
@@ -146,6 +146,8 @@ class CORE_EXPORT WebLocalFrameImpl final
@@ -148,6 +148,8 @@ class CORE_EXPORT WebLocalFrameImpl final
int argc,
v8::Local<v8::Value> argv[]) override;
v8::Local<v8::Context> MainWorldScriptContext() const override;

View file

@ -7,7 +7,7 @@ Build BoringSSL with some extra functions that nodejs needs. Only affects
the GN build; with the GYP build, nodejs is still built with OpenSSL.
diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
index d31a9f29fa9c12e753708b2a1e75c33b70924300..dea5a6403f4c32f94bb58198c467bc7cc87a8217 100644
index f57824f04d044b7180c0fc41df616a22174fe367..37735a7c2cad0a75aa609bac4e855cc564a7b2eb 100644
--- a/third_party/boringssl/BUILD.gn
+++ b/third_party/boringssl/BUILD.gn
@@ -46,6 +46,13 @@ config("no_asm_config") {

View file

@ -5,7 +5,7 @@ Subject: browser_compositor_mac.patch
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.h b/content/browser/renderer_host/browser_compositor_view_mac.h
index 7dc490ea5607bc61344d763d73b008c9be43280a..df136ec5c30db5146e5d1dd34e2f5ff55377af59 100644
index 71a9e1024b6055b1b1cc1e51d898a030e7f72111..479110fef40183c0d5d301686c1e8ae754317b29 100644
--- a/content/browser/renderer_host/browser_compositor_view_mac.h
+++ b/content/browser/renderer_host/browser_compositor_view_mac.h
@@ -60,6 +60,8 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
@ -26,7 +26,7 @@ index 7dc490ea5607bc61344d763d73b008c9be43280a..df136ec5c30db5146e5d1dd34e2f5ff5
viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink);
void OnDidNotProduceFrame(const viz::BeginFrameAck& ack);
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.mm b/content/browser/renderer_host/browser_compositor_view_mac.mm
index fb23caccdd1dc0280ba2039937222679b6b460d8..d1739539e7bf5240c70aece8bcc84bc093ebde3a 100644
index 65670cccb50312a7cf0895ae39db01bc19d42d3d..235303a210fadd7ecfa7d1878df9fc93f2655b38 100644
--- a/content/browser/renderer_host/browser_compositor_view_mac.mm
+++ b/content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -79,6 +79,12 @@

View file

@ -5,10 +5,10 @@ Subject: can_create_window.patch
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index c5e56bc15cfbf95f7564cc4d080243c48e585f20..30b945c417d04106a05a0d3dcb86e5df87845c0c 100644
index a17ae7ca0c070aeb1e741f3db80f3bc71f36308d..86560af1b9e3861dbe4455403cf3af0f183fd6c7 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -3163,6 +3163,38 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -3333,6 +3333,38 @@ void RenderFrameHostImpl::CreateNewWindow(
"frame_tree_node", frame_tree_node_->frame_tree_node_id(), "url",
params->target_url.possibly_invalid_spec());
@ -47,7 +47,7 @@ index c5e56bc15cfbf95f7564cc4d080243c48e585f20..30b945c417d04106a05a0d3dcb86e5df
bool no_javascript_access = false;
// Filter out URLs to which navigation is disallowed from this context.
@@ -3191,6 +3223,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -3361,6 +3393,7 @@ void RenderFrameHostImpl::CreateNewWindow(
last_committed_origin_.GetURL(), params->window_container_type,
params->target_url, params->referrer, params->frame_name,
params->disposition, *params->features,
@ -56,10 +56,10 @@ index c5e56bc15cfbf95f7564cc4d080243c48e585f20..30b945c417d04106a05a0d3dcb86e5df
&no_javascript_access);
diff --git a/content/browser/security_exploit_browsertest.cc b/content/browser/security_exploit_browsertest.cc
index e9cb49ebc81d7b9babe25a0a9c9ddfdf1db843d9..23776e0911f2315b60451d132ddd3cd002a241a2 100644
index 82af60872317fdaf16561c9f9adecb79ce82f610..bf72f1adf22e71ebcae50dd9fb1b88e8178a7767 100644
--- a/content/browser/security_exploit_browsertest.cc
+++ b/content/browser/security_exploit_browsertest.cc
@@ -300,6 +300,7 @@ IN_PROC_BROWSER_TEST_F(SecurityExploitBrowserTest,
@@ -357,6 +357,7 @@ IN_PROC_BROWSER_TEST_F(SecurityExploitBrowserTest,
mojom::CreateNewWindowParamsPtr params = mojom::CreateNewWindowParams::New();
params->target_url = GURL("about:blank");
@ -68,7 +68,7 @@ index e9cb49ebc81d7b9babe25a0a9c9ddfdf1db843d9..23776e0911f2315b60451d132ddd3cd0
std::move(params), base::BindOnce([](mojom::CreateNewWindowStatus,
mojom::CreateNewWindowReplyPtr) {}));
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index c2ce967c17ac6a61b3aeb6e26f88212211f7a9f4..8c8d149b9c0de26e050b196a1a2a1bf6e953f121 100644
index 25346dc852e799a2562386a6207d2de31077695f..908a8676daeb753c1580f98e8babf203cfa5b719 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -12,6 +12,8 @@ import "content/public/common/resource_type.mojom";
@ -80,7 +80,7 @@ index c2ce967c17ac6a61b3aeb6e26f88212211f7a9f4..8c8d149b9c0de26e050b196a1a2a1bf6
import "mojo/public/mojom/base/string16.mojom";
import "mojo/public/mojom/base/unguessable_token.mojom";
import "services/network/public/mojom/url_loader.mojom";
@@ -168,6 +170,24 @@ interface FrameFactory {
@@ -178,6 +180,24 @@ interface FrameFactory {
CreateFrame(int32 frame_routing_id, Frame& frame);
};
@ -105,7 +105,7 @@ index c2ce967c17ac6a61b3aeb6e26f88212211f7a9f4..8c8d149b9c0de26e050b196a1a2a1bf6
struct CreateNewWindowParams {
// True if this open request came in the context of a user gesture.
//
@@ -207,6 +227,10 @@ struct CreateNewWindowParams {
@@ -217,6 +237,10 @@ struct CreateNewWindowParams {
// The window features to use for the new window.
blink.mojom.WindowFeatures features;
@ -117,10 +117,10 @@ index c2ce967c17ac6a61b3aeb6e26f88212211f7a9f4..8c8d149b9c0de26e050b196a1a2a1bf6
// Operation result when the renderer asks the browser to create a new window.
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index 8e652e4b66f08ff86c3184adf0ef9704fab0d11c..12411003ad4d54576117cc719bff804da1706170 100644
index 6ed69effde7e7b269191788bedd4f98e3d778d67..abfb6afec00a691ea2ff27e7797921e3eb25d8ea 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -453,6 +453,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -460,6 +460,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -130,7 +130,7 @@ index 8e652e4b66f08ff86c3184adf0ef9704fab0d11c..12411003ad4d54576117cc719bff804d
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index bc2b501331e9d628c5285eee003ca3b55f3cb98f..89674a18276e34eebc0038e588ea4629a4eaca6c 100644
index b33545b865e4677ee2e9a909d259df171c12d985..eb2f9a8f240f8805e4bcbde0465ec445dd7539e7 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -169,6 +169,7 @@ class RenderFrameHost;
@ -141,7 +141,7 @@ index bc2b501331e9d628c5285eee003ca3b55f3cb98f..89674a18276e34eebc0038e588ea4629
class ServiceManagerConnection;
class SiteInstance;
class SpeechRecognitionManagerDelegate;
@@ -734,6 +735,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -757,6 +758,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -151,10 +151,10 @@ index bc2b501331e9d628c5285eee003ca3b55f3cb98f..89674a18276e34eebc0038e588ea4629
bool opener_suppressed,
bool* no_javascript_access);
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 215c4a750f046939cb59ba8f53059eb4c3e35ef6..0e6199a8f594fd6c7384147c541e6c06a263f51e 100644
index bc72fadb307f801d9f1b6c90189596c36d7203e7..a95a89178cf80dc1f6efb15e0ea7ce92d1fd26ed 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -78,6 +78,7 @@
@@ -76,6 +76,7 @@
#include "content/renderer/ime_event_guard.h"
#include "content/renderer/internal_document_state_data.h"
#include "content/renderer/loader/request_extra_data.h"
@ -162,7 +162,7 @@ index 215c4a750f046939cb59ba8f53059eb4c3e35ef6..0e6199a8f594fd6c7384147c541e6c06
#include "content/renderer/media/audio/audio_device_factory.h"
#include "content/renderer/media/stream/media_stream_device_observer.h"
#include "content/renderer/media/video_capture_impl_manager.h"
@@ -1421,6 +1422,46 @@ WebView* RenderViewImpl::CreateView(WebLocalFrame* creator,
@@ -1379,6 +1380,46 @@ WebView* RenderViewImpl::CreateView(WebLocalFrame* creator,
}
params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features);
@ -210,10 +210,10 @@ index 215c4a750f046939cb59ba8f53059eb4c3e35ef6..0e6199a8f594fd6c7384147c541e6c06
// moved on send.
bool is_background_tab =
diff --git a/content/shell/browser/layout_test/layout_test_content_browser_client.cc b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
index 7da9182635afa02226a0848d35d7ec372f4fc785..048e1126a31cf5bcaf9e0203af4a0c449db190f5 100644
index 1c7ae733b09ed16183d9772c1954f6f190866d26..c7e4faf01f5f2d4dc110588c16bb67417c51bbf9 100644
--- a/content/shell/browser/layout_test/layout_test_content_browser_client.cc
+++ b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
@@ -279,6 +279,8 @@ bool LayoutTestContentBrowserClient::CanCreateWindow(
@@ -282,6 +282,8 @@ bool LayoutTestContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -223,7 +223,7 @@ index 7da9182635afa02226a0848d35d7ec372f4fc785..048e1126a31cf5bcaf9e0203af4a0c44
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/shell/browser/layout_test/layout_test_content_browser_client.h b/content/shell/browser/layout_test/layout_test_content_browser_client.h
index c601d6e4b28dfb4216b2d7072ba1ac9dd7345f42..00bbd237ff8afd6567218363423538b9e38ae1b0 100644
index 76d53623ff698bec66dba4342e9384685ffb753e..d8b8e17dc22b96f083336cd3dcd888f89173eea1 100644
--- a/content/shell/browser/layout_test/layout_test_content_browser_client.h
+++ b/content/shell/browser/layout_test/layout_test_content_browser_client.h
@@ -66,6 +66,8 @@ class LayoutTestContentBrowserClient : public ShellContentBrowserClient {

View file

@ -7,7 +7,7 @@ Disable persiste licence support check for widevine cdm,
as its not supported in the current version of chrome.
diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc
index 7826495469120f46d1bd8529139f7567f45138ef..166e5a31d5f36876b339c5cf66527fc88e7c26af 100644
index bcf7d3a812ef8d105d6ffb5bc72432e15a98f10c..5d63d3824e53ec5b704b93b95e70ea1d5e5627b1 100644
--- a/chrome/renderer/media/chrome_key_systems.cc
+++ b/chrome/renderer/media/chrome_key_systems.cc
@@ -15,7 +15,9 @@
@ -20,7 +20,7 @@ index 7826495469120f46d1bd8529139f7567f45138ef..166e5a31d5f36876b339c5cf66527fc8
#include "components/cdm/renderer/external_clear_key_key_system_properties.h"
#include "components/cdm/renderer/widevine_key_system_properties.h"
#include "content/public/renderer/render_thread.h"
@@ -187,12 +189,14 @@ static SupportedCodecs GetSupportedCodecs(
@@ -189,12 +191,14 @@ static SupportedCodecs GetSupportedCodecs(
// Returns persistent-license session support.
static EmeSessionTypeSupport GetPersistentLicenseSupport(
bool supported_by_the_cdm) {

View file

@ -15,7 +15,7 @@ code was around 2012-2013, and this is purely UI, I don't think they have
automated tests for it).
diff --git a/chrome/browser/ui/browser_dialogs.h b/chrome/browser/ui/browser_dialogs.h
index c0c7c21131c3dd8d197ad1808142915704406d9d..43b5e57e91a451e79c3f77450d99cffc222842fd 100644
index f68bd5a7bf50eea701410779ed982db045f652a7..1c31eca5aaed470960e64f760c4328c0c155310f 100644
--- a/chrome/browser/ui/browser_dialogs.h
+++ b/chrome/browser/ui/browser_dialogs.h
@@ -4,7 +4,7 @@
@ -57,7 +57,7 @@ index c0c7c21131c3dd8d197ad1808142915704406d9d..43b5e57e91a451e79c3f77450d99cffc
#if defined(OS_MACOSX)
// Bridging methods that show/hide the toolkit-views based Task Manager on Mac.
@@ -310,13 +312,13 @@ void ShowChromeCleanerRebootPrompt(
@@ -311,13 +313,13 @@ void ShowChromeCleanerRebootPrompt(
safe_browsing::ChromeCleanerRebootDialogController* dialog_controller);
#endif // OS_WIN

View file

@ -5,10 +5,10 @@ Subject: compositor_delegate.patch
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc
index 642fff3b4367f0fe684d99cdcd4aee7d1a21cb40..45faeed249c0d92d8e146290fefddd5cf8f4f643 100644
index e8741caf69a8d3770905dcf1d466e7f01ddf69ba..b62009feb2e97362d90c6c917305f91cae27d790 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -493,10 +493,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
@@ -492,10 +492,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
// surfaces as they are not following the correct mode.
DisableGpuCompositing(compositor.get());
}
@ -32,10 +32,10 @@ index 642fff3b4367f0fe684d99cdcd4aee7d1a21cb40..45faeed249c0d92d8e146290fefddd5c
} else {
DCHECK(context_provider);
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index a1b6716fc79f06216edf150a4e34f678a0da1518..89a1c426e9a48504082a3119f837e3d5f22d45a3 100644
index b3905bdfa6500f02328552b7c2402797a71758be..490722c20c25f752e37ac3b481f8d2aa616408a4 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -25,6 +25,7 @@
@@ -26,6 +26,7 @@
#include "components/viz/common/surfaces/frame_sink_id.h"
#include "components/viz/common/surfaces/local_surface_id.h"
#include "components/viz/host/host_frame_sink_client.h"
@ -43,7 +43,7 @@ index a1b6716fc79f06216edf150a4e34f678a0da1518..89a1c426e9a48504082a3119f837e3d5
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkMatrix44.h"
#include "ui/compositor/compositor_animation_observer.h"
@@ -200,6 +201,15 @@ class COMPOSITOR_EXPORT ContextFactory {
@@ -198,6 +199,15 @@ class COMPOSITOR_EXPORT ContextFactory {
virtual bool SyncTokensRequiredForDisplayCompositor() = 0;
};
@ -59,7 +59,7 @@ index a1b6716fc79f06216edf150a4e34f678a0da1518..89a1c426e9a48504082a3119f837e3d5
// Compositor object to take care of GPU painting.
// A Browser compositor object is responsible for generating the final
// displayable form of pixels comprising a single widget's contents. It draws an
@@ -240,6 +250,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -237,6 +247,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
// Schedules a redraw of the layer tree associated with this compositor.
void ScheduleDraw();
@ -69,7 +69,7 @@ index a1b6716fc79f06216edf150a4e34f678a0da1518..89a1c426e9a48504082a3119f837e3d5
// Sets the root of the layer tree drawn by this Compositor. The root layer
// must have no parent. The compositor's root layer is reset if the root layer
// is destroyed. NULL can be passed to reset the root layer, in which case the
@@ -463,6 +476,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -448,6 +461,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
ui::ContextFactory* context_factory_;
ui::ContextFactoryPrivate* context_factory_private_;

View file

@ -11,12 +11,11 @@ is ready, but after the //content layer has already locked the registry.
Without this patch, calling `registerStandardSchemes` during initialization
when in debug mode will cause a DCHECK to fire.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index 034fdcad958cb25780c304d184b2fbb721a13200..c2090368f6678950690463e0b90620cb9fdf5f41 100644
index 6ed770290b1f18791c1a38a0e8e4dc0f670c29cf..37668b3e74c4031417c5ff91376a20aa56e15c07 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -808,7 +808,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
@@ -739,7 +739,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
#endif
RegisterPathProvider();
@ -26,10 +25,10 @@ index 034fdcad958cb25780c304d184b2fbb721a13200..c2090368f6678950690463e0b90620cb
#if defined(OS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE)
int icudata_fd = g_fds->MaybeGet(kAndroidICUDataDescriptor);
diff --git a/content/public/app/content_main_delegate.cc b/content/public/app/content_main_delegate.cc
index c4bdfd36ad0c34b3a91b59502414bc98c091ccee..d7ac740d0088c002bee98238faea1ef9593eee92 100644
index cf3c71fe0edc7fd9b788e5ca06cedcd5f9dfa369..877642228966170f3c6bbf4faf80af66bbac387e 100644
--- a/content/public/app/content_main_delegate.cc
+++ b/content/public/app/content_main_delegate.cc
@@ -63,6 +63,10 @@ bool ContentMainDelegate::ShouldEnableProfilerRecording() {
@@ -59,6 +59,10 @@ bool ContentMainDelegate::ShouldEnableProfilerRecording() {
return false;
}
@ -41,10 +40,10 @@ index c4bdfd36ad0c34b3a91b59502414bc98c091ccee..d7ac740d0088c002bee98238faea1ef9
return service_manager::ProcessType::kDefault;
}
diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h
index 979e25d1c1b9ff4b16adbab28cb44d8473f8232a..7aca113058ed111a98e396df57ebc36c06e3b896 100644
index d55f5050c8c3cb15c549dd3ae90d00f1455d34c8..f00266ce4f93bea585f191512226cc40e1f46545 100644
--- a/content/public/app/content_main_delegate.h
+++ b/content/public/app/content_main_delegate.h
@@ -101,6 +101,9 @@ class CONTENT_EXPORT ContentMainDelegate {
@@ -93,6 +93,9 @@ class CONTENT_EXPORT ContentMainDelegate {
// Returns whether or not profiler recording should be enabled.
virtual bool ShouldEnableProfilerRecording();

View file

@ -8,10 +8,10 @@ run before shutdown. This is required to cleanup WebContents asynchronously
in atom::CommonWebContentsDelegate::ResetManageWebContents.
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 5cea69cfba0058041766ff25b32afbe6cfb6d59d..0d427b35f0f4762fc74f5aceac3923f98a2134f7 100644
index 20471ef5ccae66fb8c09eb4da25a67304d7626c2..bcaf20bdf3cf78d6ffb3eacb57653f5139ebf41d 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -1582,7 +1582,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
@@ -1527,7 +1527,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
}
base::RunLoop run_loop;

View file

@ -8,10 +8,10 @@ this patch can be removed once we switch to network service,
where the embedders have a chance to design their URLLoaders.
diff --git a/content/browser/loader/cross_site_document_resource_handler.cc b/content/browser/loader/cross_site_document_resource_handler.cc
index 907922701280b589bf11691342de0ec95cdec6a1..eaf8bac18f8e3a2735ce7ded606199092a3746d3 100644
index be1724e19eeb0186dc20dad48e0d604ff87918e5..3dea6a89eb12dc6be157c39787358cd86810da16 100644
--- a/content/browser/loader/cross_site_document_resource_handler.cc
+++ b/content/browser/loader/cross_site_document_resource_handler.cc
@@ -593,6 +593,9 @@ bool CrossSiteDocumentResourceHandler::ShouldBlockBasedOnHeaders(
@@ -619,6 +619,9 @@ bool CrossSiteDocumentResourceHandler::ShouldBlockBasedOnHeaders(
return false;
}
@ -22,10 +22,10 @@ index 907922701280b589bf11691342de0ec95cdec6a1..eaf8bac18f8e3a2735ce7ded60619909
}
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index f713d0cfbf90665d921f56f4d828887ad1f7842c..4fe21468aee93a7cb3783220ebfe8dd100a3d1d5 100644
index ae4bfc6553f347ad5a7e5327d64155e700e6584e..e279ded9407bbfda6d76072cd6fa2c8a06379e9f 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -57,6 +57,10 @@ ContentBrowserClient::SiteInstanceForNavigationType ContentBrowserClient::Should
@@ -59,6 +59,10 @@ ContentBrowserClient::SiteInstanceForNavigationType ContentBrowserClient::Should
return SiteInstanceForNavigationType::ASK_CHROMIUM;
}
@ -37,10 +37,10 @@ index f713d0cfbf90665d921f56f4d828887ad1f7842c..4fe21468aee93a7cb3783220ebfe8dd1
const MainFunctionParams& parameters) {
return nullptr;
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 4bf6b2b5f8110f539adc61858cfdc8f77f7ed08b..94454812e27d4d357eeee27cfc1e185386ea2003 100644
index 5f6fdb2d66acfa73c895cac18714d0998eed2ab2..836851cfcbc94becdf3d4af682dbe3e098172c25 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -225,6 +225,9 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -233,6 +233,9 @@ class CONTENT_EXPORT ContentBrowserClient {
content::RenderFrameHost* rfh,
content::SiteInstance* pending_site_instance){};

View file

@ -14,7 +14,7 @@ Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605435}
diff --git a/chrome/browser/ui/libgtkui/gtk_ui.cc b/chrome/browser/ui/libgtkui/gtk_ui.cc
index 3e2f37380b1d23d2eaec82ca532843775b2f61d6..082162ce707bc575d7a0491471b430db041371da 100644
index 3a829df4099f5223d0862c33a6ffc61b107b20b7..3b86e178d4c83f07231649360c8b65ca83143408 100644
--- a/chrome/browser/ui/libgtkui/gtk_ui.cc
+++ b/chrome/browser/ui/libgtkui/gtk_ui.cc
@@ -234,11 +234,6 @@ typedef std::unique_ptr<GIcon, GObjectDeleter> ScopedGIcon;
@ -29,7 +29,7 @@ index 3e2f37380b1d23d2eaec82ca532843775b2f61d6..082162ce707bc575d7a0491471b430db
// Number of app indicators used (used as part of app-indicator id).
int indicators_count;
@@ -600,7 +595,8 @@ bool GtkUi::IsStatusIconSupported() const {
@@ -545,7 +540,8 @@ bool GtkUi::IsStatusIconSupported() const {
std::unique_ptr<views::StatusIconLinux> GtkUi::CreateLinuxStatusIcon(
const gfx::ImageSkia& image,
@ -39,7 +39,7 @@ index 3e2f37380b1d23d2eaec82ca532843775b2f61d6..082162ce707bc575d7a0491471b430db
#if GTK_CHECK_VERSION(3, 90, 0)
NOTIMPLEMENTED();
return nullptr;
@@ -608,8 +604,8 @@ std::unique_ptr<views::StatusIconLinux> GtkUi::CreateLinuxStatusIcon(
@@ -553,8 +549,8 @@ std::unique_ptr<views::StatusIconLinux> GtkUi::CreateLinuxStatusIcon(
if (AppIndicatorIcon::CouldOpen()) {
++indicators_count;
return std::unique_ptr<views::StatusIconLinux>(new AppIndicatorIcon(
@ -51,10 +51,10 @@ index 3e2f37380b1d23d2eaec82ca532843775b2f61d6..082162ce707bc575d7a0491471b430db
return std::unique_ptr<views::StatusIconLinux>(
new GtkStatusIcon(image, tool_tip));
diff --git a/chrome/browser/ui/libgtkui/gtk_ui.h b/chrome/browser/ui/libgtkui/gtk_ui.h
index 6f4899402ec5d7b8107c9dc2c43bd040492fd8dd..c52874dd745463d3a1b1e798992ac17e64937ea2 100644
index 1c626d1cafd1ec979be8dd5ef6ddbbc9d1b29bc2..2c98c1990419eb5276c01553caad559cf60714ad 100644
--- a/chrome/browser/ui/libgtkui/gtk_ui.h
+++ b/chrome/browser/ui/libgtkui/gtk_ui.h
@@ -92,7 +92,8 @@ class GtkUi : public views::LinuxUI {
@@ -90,7 +90,8 @@ class GtkUi : public views::LinuxUI {
bool IsStatusIconSupported() const override;
std::unique_ptr<views::StatusIconLinux> CreateLinuxStatusIcon(
const gfx::ImageSkia& image,
@ -93,10 +93,10 @@ index eed6bb2eaf756189be016c382673e23eb7ca18e0..4694a9a920b1f9150399e183038f04ac
return base::WrapUnique(
new StatusIconLinuxWrapper(std::move(status_icon)));
diff --git a/ui/views/linux_ui/linux_ui.h b/ui/views/linux_ui/linux_ui.h
index 86a3c0a78cb748f679e2313db569ac0029c8da0f..bd01febaf6e0b3712e86183f7a56122d7f1ee666 100644
index 759d4ab03f02a338f5e89bf971a423f6b42814ed..208c9a5ac7eb5441110f34b3f7859945c591df21 100644
--- a/ui/views/linux_ui/linux_ui.h
+++ b/ui/views/linux_ui/linux_ui.h
@@ -132,10 +132,12 @@ class VIEWS_EXPORT LinuxUI : public ui::LinuxInputMethodContextFactory,
@@ -130,10 +130,12 @@ class VIEWS_EXPORT LinuxUI : public ui::LinuxInputMethodContextFactory,
// Checks for platform support for status icons.
virtual bool IsStatusIconSupported() const = 0;

View file

@ -17,7 +17,7 @@ only one or two specific checks fail. Then it's better to simply comment out the
failing checks and allow the rest of the target to have them enabled.
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
index d8aca9e2cbffdfd0bbb0bd67e8adfb53547132bb..86224ab7a3c5637422559da25bc8c1040a03e937 100644
index bd5221ce36f87e4f54cbf71268bbffa692701517..6c6a22fdea951662a63c88e6939404878afc45ab 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -995,8 +995,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(

View file

@ -36,10 +36,10 @@ index 8e02a8a95eb07516162eacdf5b361231d3a02975..3497b85428a52c6019cfb5d30229071f
virtual content::DesktopMediaID::Type GetMediaListType() const = 0;
};
diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.cc b/chrome/browser/media/webrtc/desktop_media_list_base.cc
index 43dd95ef72f5b35b91471950cc114800d54945ab..d4662708f64934372422b853673eaaf8f05e4baf 100644
index 727d1f564dc943026a4b10ab2584f9269bb2ae4a..66789680d51e74e533bfb9c6c99e5b9e0844b1d9 100644
--- a/chrome/browser/media/webrtc/desktop_media_list_base.cc
+++ b/chrome/browser/media/webrtc/desktop_media_list_base.cc
@@ -18,6 +18,11 @@ DesktopMediaListBase::DesktopMediaListBase(base::TimeDelta update_period)
@@ -20,6 +20,11 @@ DesktopMediaListBase::DesktopMediaListBase(base::TimeDelta update_period)
DesktopMediaListBase::~DesktopMediaListBase() {}
@ -51,7 +51,7 @@ index 43dd95ef72f5b35b91471950cc114800d54945ab..d4662708f64934372422b853673eaaf8
void DesktopMediaListBase::SetUpdatePeriod(base::TimeDelta period) {
DCHECK(!observer_);
update_period_ = period;
@@ -31,10 +36,7 @@ void DesktopMediaListBase::SetViewDialogWindowId(DesktopMediaID dialog_id) {
@@ -33,10 +38,7 @@ void DesktopMediaListBase::SetViewDialogWindowId(DesktopMediaID dialog_id) {
view_dialog_id_ = dialog_id;
}
@ -63,7 +63,7 @@ index 43dd95ef72f5b35b91471950cc114800d54945ab..d4662708f64934372422b853673eaaf8
Refresh();
}
@@ -49,6 +51,11 @@ const DesktopMediaList::Source& DesktopMediaListBase::GetSource(
@@ -51,6 +53,11 @@ const DesktopMediaList::Source& DesktopMediaListBase::GetSource(
return sources_[index];
}
@ -75,7 +75,7 @@ index 43dd95ef72f5b35b91471950cc114800d54945ab..d4662708f64934372422b853673eaaf8
DesktopMediaID::Type DesktopMediaListBase::GetMediaListType() const {
return type_;
}
@@ -60,6 +67,12 @@ DesktopMediaListBase::SourceDescription::SourceDescription(
@@ -62,6 +69,12 @@ DesktopMediaListBase::SourceDescription::SourceDescription(
void DesktopMediaListBase::UpdateSourcesList(
const std::vector<SourceDescription>& new_sources) {
@ -88,15 +88,15 @@ index 43dd95ef72f5b35b91471950cc114800d54945ab..d4662708f64934372422b853673eaaf8
typedef std::set<DesktopMediaID> SourceSet;
SourceSet new_source_set;
for (size_t i = 0; i < new_sources.size(); ++i) {
@@ -132,6 +145,8 @@ void DesktopMediaListBase::UpdateSourceThumbnail(DesktopMediaID id,
@@ -134,6 +147,8 @@ void DesktopMediaListBase::UpdateSourceThumbnail(DesktopMediaID id,
}
void DesktopMediaListBase::ScheduleNextRefresh() {
+ if (!observer_->ShouldScheduleNextRefresh(this))
+ return;
BrowserThread::PostDelayedTask(BrowserThread::UI, FROM_HERE,
base::BindOnce(&DesktopMediaListBase::Refresh,
weak_factory_.GetWeakPtr()),
base::PostDelayedTaskWithTraits(FROM_HERE, {BrowserThread::UI},
base::BindOnce(&DesktopMediaListBase::Refresh,
weak_factory_.GetWeakPtr()),
diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.h b/chrome/browser/media/webrtc/desktop_media_list_base.h
index 746df1210aa92af5c9d4703112b4bd6c09b94fdf..461e0edf8509569d05c86f466c02b5035183d0df 100644
--- a/chrome/browser/media/webrtc/desktop_media_list_base.h
@ -133,10 +133,10 @@ index 47401abc984e6fe26c7f4c5399aa565c687060b0..ca6a527ffac877c27aac94337ec5a7b5
protected:
virtual ~DesktopMediaListObserver() {}
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
index f5f62407f0d6dbeb91db4d446b0260ecb5c66f28..818d2fee48c793b2ece7f761d7835a9077bf2e70 100644
index 5eac54ba5336d51b15da1e084df0fc7f6dc09deb..e7c2478850d5231e258fb4c54dd57db555273efc 100644
--- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
@@ -6,13 +6,14 @@
@@ -6,14 +6,15 @@
#include "base/hash.h"
#include "base/single_thread_task_runner.h"
@ -147,6 +147,7 @@ index f5f62407f0d6dbeb91db4d446b0260ecb5c66f28..818d2fee48c793b2ece7f761d7835a90
#include "build/build_config.h"
#include "chrome/browser/media/webrtc/desktop_media_list_observer.h"
-#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
+#include "electron/grit/electron_resources.h"
#include "media/base/video_util.h"

View file

@ -15,7 +15,7 @@ the redraw locking mechanism, which fixes these issues. The electron issue
can be found at https://github.com/electron/electron/issues/1821
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 54eb0fcd0bf79bef4c7bfbd07bea27b005e73f61..90a11451be65a152f7bcc77eef360b1b41e41a28 100644
index 9afbcf6ca30a6282cfa0ade76fe07467d497ac2e..2945f4fe3744b0d8ae56393d935125e3118189b4 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -282,6 +282,10 @@ const int kSynthesizedMouseMessagesTimeDifference = 500;

View file

@ -10,10 +10,10 @@ We should revisit this bug after upgrading to newer versions of Chrome,
this patch was introduced in Chrome 66.
diff --git a/content/browser/frame_host/render_frame_proxy_host.cc b/content/browser/frame_host/render_frame_proxy_host.cc
index bad4c9fc4ebb19e6155ef7aeb3dfea3416611500..a08cbd5b2d5aa5e6ce903b75ef919084ad5a6135 100644
index 80d51c9baf63ab1dc005e44854f4eca497d8b7dd..f5bec5d54dd0ee826cbf6559fbbc0fece1398118 100644
--- a/content/browser/frame_host/render_frame_proxy_host.cc
+++ b/content/browser/frame_host/render_frame_proxy_host.cc
@@ -260,6 +260,12 @@ void RenderFrameProxyHost::SetDestructionCallback(
@@ -259,6 +259,12 @@ void RenderFrameProxyHost::SetDestructionCallback(
void RenderFrameProxyHost::OnDetach() {
if (frame_tree_node_->render_manager()->ForInnerDelegate()) {

View file

@ -5,10 +5,10 @@ Subject: disable_hidden.patch
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 437b43ade73d0a154be0bf4aa14c29a9081b04d0..70e985b7b13031c760d2e791930b1361586a1707 100644
index 807466aeeda0b504098a5455bf6e5e0aab9735f0..85be4a6900632f336868f9b585ca735468ce12eb 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -718,6 +718,9 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -685,6 +685,9 @@ void RenderWidgetHostImpl::WasHidden() {
if (is_hidden_)
return;
@ -19,10 +19,10 @@ index 437b43ade73d0a154be0bf4aa14c29a9081b04d0..70e985b7b13031c760d2e791930b1361
TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::WasHidden");
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index c2d8cd562433ebdbb3372cae530c8967edb37225..c1e59acbfb0392833ddbcc4da60664c3eb51c7d6 100644
index dba7b4276f5e6c0543a8e65b2bb01ad714fe0c79..f0126b89fffaad13ab44732062c435d18bda0e4e 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -154,6 +154,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -153,6 +153,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// RenderWidgetHostImpl.
static RenderWidgetHostImpl* From(RenderWidgetHost* rwh);

View file

@ -6,10 +6,10 @@ Subject: disable_user_gesture_requirement_for_beforeunload_dialogs.patch
See https://github.com/electron/electron/issues/10754
diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc
index e628c1ab8242d5c2fd63617e3a0816b14b2fef90..a2311194b1bbfc8e6d0d768c199b6f19a02f0fe9 100644
index 7ba01ff026e3da711ee3e291385cb5c1086a2f08..eb2e3288c761957975ab9b5b8b43f3fee3337afa 100644
--- a/third_party/blink/renderer/core/dom/document.cc
+++ b/third_party/blink/renderer/core/dom/document.cc
@@ -3592,7 +3592,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient& chrome_client,
@@ -3644,7 +3644,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient& chrome_client,
"frame that never had a user gesture since its load. "
"https://www.chromestatus.com/feature/5082396709879808";
Intervention::GenerateReport(frame_, "BeforeUnloadNoGesture", message);

View file

@ -32,36 +32,36 @@ for a given `BrowserWindow` via a `webPreferences` option,
similar to [`nodeIntegration`](https://electronjs.org/docs/tutorial/security#2-disable-nodejs-integration-for-remote-content).
diff --git a/content/common/dom_storage/dom_storage_map.cc b/content/common/dom_storage/dom_storage_map.cc
index fd088fb170be..b90b6cf9132d 100644
index fd088fb170bead6452ded14016f21f0c29659e03..b90b6cf9132d16bc3b2076c3fa313916e2b5ea7d 100644
--- a/content/common/dom_storage/dom_storage_map.cc
+++ b/content/common/dom_storage/dom_storage_map.cc
@@ -185,10 +185,12 @@ bool DOMStorageMap::SetItemInternal(MapType* map_type,
size_t new_item_size = size_in_storage(key, value);
size_t new_storage_used = storage_used_ - old_item_size + new_item_size;
+#if 0
// Only check quota if the size is increasing, this allows
// shrinking changes to pre-existing files that are over budget.
if (new_item_size > old_item_size && new_storage_used > quota_)
return false;
+#endif
(*map_type)[key] = value;
ResetKeyIterator();
diff --git a/content/common/dom_storage/dom_storage_types.h b/content/common/dom_storage/dom_storage_types.h
index e87afe5b8ee0..61c9a0dfff60 100644
index e87afe5b8ee07f7038a7cc9c40832b6cd27884da..61c9a0dfff60f79c7b36ff5c7d741c06dca03ada 100644
--- a/content/common/dom_storage/dom_storage_types.h
+++ b/content/common/dom_storage/dom_storage_types.h
@@ -21,6 +21,7 @@ typedef std::map<base::string16, base::NullableString16> DOMStorageValuesMap;
// The quota for each storage area.
// This value is enforced in renderer processes and the browser process.
+// However, Electron's dom_storage_limits.patch removes the code that checks this limit.
const size_t kPerStorageAreaQuota = 10 * 1024 * 1024;
// In the browser process we allow some overage to
diff --git a/content/renderer/dom_storage/dom_storage_cached_area.cc b/content/renderer/dom_storage/dom_storage_cached_area.cc
index 402c27727ff1..f5908a1c55f9 100644
index a7cdf900661bff52e1d3d9bc98d68e6a457c3fa7..ce302dcbece11880b5b6da4b6d5d807ba9dc09c9 100644
--- a/content/renderer/dom_storage/dom_storage_cached_area.cc
+++ b/content/renderer/dom_storage/dom_storage_cached_area.cc
@@ -53,11 +53,13 @@ bool DOMStorageCachedArea::SetItem(int connection_id,
@ -75,14 +75,14 @@ index 402c27727ff1..f5908a1c55f9 100644
kPerStorageAreaQuota)
return false;
+#endif
PrimeIfNeeded(connection_id);
base::NullableString16 old_value;
diff --git a/content/renderer/dom_storage/local_storage_cached_area.cc b/content/renderer/dom_storage/local_storage_cached_area.cc
index ffa21c9200d0..0edbd6152292 100644
index c04e0e8bff1a7a41a1e18aca5403aed16a80aead..d63cec971f0a98f7b8ff30c1f6a0fa843efbecfa 100644
--- a/content/renderer/dom_storage/local_storage_cached_area.cc
+++ b/content/renderer/dom_storage/local_storage_cached_area.cc
@@ -141,11 +141,13 @@ bool LocalStorageCachedArea::SetItem(const base::string16& key,
@@ -142,11 +142,13 @@ bool LocalStorageCachedArea::SetItem(const base::string16& key,
const base::string16& value,
const GURL& page_url,
const std::string& storage_area_id) {
@ -93,6 +93,6 @@ index ffa21c9200d0..0edbd6152292 100644
kPerStorageAreaQuota)
return false;
+#endif
EnsureLoaded();
bool result = false;

View file

@ -8,15 +8,18 @@ Electron needs that flag to be enabled on those paltforms,
but there's no way to conditionally set it during a `gn gen` call.
diff --git a/third_party/widevine/cdm/widevine.gni b/third_party/widevine/cdm/widevine.gni
index 82a93622585a424f56c3567050f9ba4822de6c1e..cbd10bed9f3bdbeb61ec5daa2f8d0e158549b7fd 100644
index e10d9b9b8d2975a731adfee2eb0086afd7975f97..844320dc66cd5781e218d5ca8084f5185a5e331d 100644
--- a/third_party/widevine/cdm/widevine.gni
+++ b/third_party/widevine/cdm/widevine.gni
@@ -7,7 +7,7 @@ import("//media/media_options.gni")
@@ -6,9 +6,8 @@ import("//build/config/chrome_build.gni")
import("//media/media_options.gni")
declare_args() {
# Allow Widevine key system support in Chromium.
- enable_widevine = false
- # Enables Widevine key system support. Enabled by default in Google Chrome or
- # on Android. Can be optionally enabled in Chromium.
- enable_widevine = is_chrome_branded || is_android
+ # Allow Widevine key system support in Chromium.
+ enable_widevine = is_mac || is_win
}
enable_widevine_cdm_host_verification =
# Widevine CDM is available as a library CDM on the following platforms and

View file

@ -7,15 +7,15 @@ Compilation of those files fails with the Chromium 68.
Remove the patch during the Chromium 69 upgrade.
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
index 7b47402ebe6a27215b54853182b21abfddf67af8..68bf39ea6aed6f84825b2d850d3e5375e8cc2923 100644
index 1f0518e9cc2456d9299b16437be36041c98e8a92..e492c7fe90504314f1116607c1f543e68ddf2ad8 100644
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -1726,7 +1726,7 @@ jumbo_source_set("blink_platform_unittests_sources") {
@@ -1729,7 +1729,7 @@ jumbo_source_set("blink_platform_unittests_sources") {
"graphics/paint/drawing_display_item_test.cc",
"graphics/paint/drawing_recorder_test.cc",
"graphics/paint/float_clip_rect_test.cc",
- "graphics/paint/geometry_mapper_test.cc",
+ #"graphics/paint/geometry_mapper_test.cc",
"graphics/paint/geometry_mapper_transform_cache_test.cc",
"graphics/paint/paint_chunk_test.cc",
"graphics/paint/paint_chunker_test.cc",
"graphics/paint/paint_controller_test.cc",

View file

@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Cheng Zhao <zcbenz@gmail.com>
Date: Mon Nov 26 09:32:14 2018 +0900
Date: Mon, 26 Nov 2018 09:32:14 +0900
Subject: fix_trackpad_scrolling.patch
Backport https://chromium-review.googlesource.com/c/chromium/src/+/1299342.
@ -226,10 +226,10 @@ index c11202b12da8fc540a78c3b13f731fc33d2d63b3..2b29fc641a810d2b521fa14e40da5bff
HWND parent_window_;
HWND window_;
diff --git a/gpu/ipc/service/direct_composition_surface_win.cc b/gpu/ipc/service/direct_composition_surface_win.cc
index da05d806bfa7e8710833eec7a2d85dfaeb9ed37a..761384364cb2544bc984f391b7c433e12fae1c33 100644
index faf9e3a2ab0c1e11bf25803084dc1c4213143ab8..1e667e04605de6e105bcd485f3c84c444546b044 100644
--- a/gpu/ipc/service/direct_composition_surface_win.cc
+++ b/gpu/ipc/service/direct_composition_surface_win.cc
@@ -1573,8 +1573,6 @@ gfx::SwapResult DirectCompositionSurfaceWin::SwapBuffers(
@@ -1674,8 +1674,6 @@ gfx::SwapResult DirectCompositionSurfaceWin::SwapBuffers(
gl::GLSurfacePresentationHelper::ScopedSwapBuffers scoped_swap_buffers(
presentation_helper_.get(), callback);

View file

@ -1,30 +0,0 @@
From 0000000000000000000000000000000000000000 Web Oct 31 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Web, 31 Oct 2018 09:08:02 -0700
Subject: fix_zoom_display.patch
This patch was released in 70.0.3512.0.
diff --git a/ui/base/accelerators/platform_accelerator_cocoa.mm b/ui/base/accelerators/platform_accelerator_cocoa.mm
index 9786168be893..3c177060453a 100644
--- a/ui/base/accelerators/platform_accelerator_cocoa.mm
+++ b/ui/base/accelerators/platform_accelerator_cocoa.mm
@@ -25,9 +25,16 @@ void GetKeyEquivalentAndModifierMaskFromAccelerator(
if (accelerator.IsCmdDown())
cocoa_modifiers |= NSEventModifierFlagCommand;
unichar shifted_character;
+ unichar character;
int result = ui::MacKeyCodeForWindowsKeyCode(
- accelerator.key_code(), cocoa_modifiers, &shifted_character, nullptr);
- DCHECK(result != -1);
+ accelerator.key_code(), cocoa_modifiers, &shifted_character, &character);
+ DCHECK_NE(result, -1);
+
+ // If the key equivalent is itself shifted, then drop Shift from the modifier
+ // flags, otherwise Shift will be required. E.g., curly braces and plus are
+ // both inherently shifted, so the key equivalents shouldn't require Shift.
+ if (shifted_character != character)
+ cocoa_modifiers &= ~NSEventModifierFlagShift;
*key_equivalent = [NSString stringWithFormat:@"%C", shifted_character];
*modifier_mask = cocoa_modifiers;
}

View file

@ -4,16 +4,16 @@ Date: Wed, 14 Nov 2018 20:38:46 +0530
Subject: frame_host_manager.patch
Allows embedder to intercept site instances chosen by chromium
and respond with custom instance.
and respond with custom instance.
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index 872e4609c94f1e052d623ae57c1279c72eb2c3f4..39d26adb60c50f88d19e824846519338083dc166 100644
index 69913022bb1955a22d93acabbdda84e8090de29d..20db3861e67290787fd8c45e5dbeb7507064bdf9 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -1960,6 +1960,17 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
bool was_server_redirect = request.navigation_handle() &&
request.navigation_handle()->WasServerRedirect();
@@ -1933,6 +1933,16 @@ bool RenderFrameHostManager::InitRenderView(
scoped_refptr<SiteInstance>
RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
const NavigationRequest& request) {
+ BrowserContext* browser_context =
+ delegate_->GetControllerForRenderManager().GetBrowserContext();
+ // If the navigation can swap SiteInstances, compute the SiteInstance it
@ -24,12 +24,11 @@ index 872e4609c94f1e052d623ae57c1279c72eb2c3f4..39d26adb60c50f88d19e824846519338
+ speculative_render_frame_host_
+ ? speculative_render_frame_host_->GetSiteInstance()
+ : nullptr;
+
if (frame_tree_node_->IsMainFrame()) {
// Renderer-initiated main frame navigations that may require a
// SiteInstance swap are sent to the browser via the OpenURL IPC and are
@@ -1979,6 +1990,51 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request.common_params().url));
// First, check if the navigation can switch SiteInstances. If not, the
// navigation should use the current SiteInstance.
SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance();
@@ -1965,6 +1975,51 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request.common_params().url);
no_renderer_swap_allowed |=
request.from_begin_navigation() && !can_renderer_initiate_transfer;
+
@ -80,8 +79,8 @@ index 872e4609c94f1e052d623ae57c1279c72eb2c3f4..39d26adb60c50f88d19e824846519338
} else {
// Subframe navigations will use the current renderer, unless specifically
// allowed to swap processes.
@@ -1990,23 +2046,17 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
if (no_renderer_swap_allowed)
@@ -1976,23 +2031,17 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
if (no_renderer_swap_allowed && !should_swap_for_error_isolation)
return scoped_refptr<SiteInstance>(current_site_instance);
- // If the navigation can swap SiteInstances, compute the SiteInstance it
@ -109,10 +108,10 @@ index 872e4609c94f1e052d623ae57c1279c72eb2c3f4..39d26adb60c50f88d19e824846519338
}
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index bb54b89bef5c6f32e7b4a056336c85494e2a04de..f713d0cfbf90665d921f56f4d828887ad1f7842c 100644
index abfb6afec00a691ea2ff27e7797921e3eb25d8ea..ae4bfc6553f347ad5a7e5327d64155e700e6584e 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -47,6 +47,16 @@ void OverrideOnBindInterface(const service_manager::BindSourceInfo& remote_info,
@@ -49,6 +49,16 @@ void OverrideOnBindInterface(const service_manager::BindSourceInfo& remote_info,
handle);
}
@ -130,10 +129,10 @@ index bb54b89bef5c6f32e7b4a056336c85494e2a04de..f713d0cfbf90665d921f56f4d828887a
const MainFunctionParams& parameters) {
return nullptr;
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 3be31602689cb93b965729cc4e35cf6d23a8ec2f..4bf6b2b5f8110f539adc61858cfdc8f77f7ed08b 100644
index eb2f9a8f240f8805e4bcbde0465ec445dd7539e7..5f6fdb2d66acfa73c895cac18714d0998eed2ab2 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -194,8 +194,37 @@ CONTENT_EXPORT void OverrideOnBindInterface(
@@ -202,8 +202,37 @@ CONTENT_EXPORT void OverrideOnBindInterface(
// the observer interfaces.)
class CONTENT_EXPORT ContentBrowserClient {
public:

View file

@ -22,10 +22,10 @@ index 4491b392412caac052bf9e41c70a28086ada8a17..8ec7775b78b3645dbac5ee518404ca9a
g_reference_table = reference_table;
}
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
index 6945a60181c420106b1a1defe2a2149b70a80d82..535b0caa02f89f8a0fde841057d35e3834ea087f 100644
index 8cb2646bdd7dc3f5013d197f4b76e8707afb6817..95844885e478e460b1f03a7d98942bffe263e3d0 100644
--- a/gin/public/isolate_holder.h
+++ b/gin/public/isolate_holder.h
@@ -97,7 +97,8 @@ class GIN_EXPORT IsolateHolder {
@@ -98,7 +98,8 @@ class GIN_EXPORT IsolateHolder {
static void Initialize(ScriptMode mode,
V8ExtrasMode v8_extras_mode,
v8::ArrayBuffer::Allocator* allocator,
@ -36,10 +36,10 @@ index 6945a60181c420106b1a1defe2a2149b70a80d82..535b0caa02f89f8a0fde841057d35e38
v8::Isolate* isolate() { return isolate_; }
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
index cf51b27dd999391e28a3d69c2694d90d61ea214f..50ba87af55fd69dcf0ade1a1736e89ae13b4482f 100644
index 48116401c0be193261811e14db31844727f980fb..3ae68bdd35f386292de218985a5ab6890fd73c83 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -236,12 +236,14 @@ LoadV8FileResult MapOpenedFile(const OpenedFileMap::mapped_type& file_region,
@@ -205,12 +205,14 @@ enum LoadV8FileResult {
// static
void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
@ -57,7 +57,7 @@ index cf51b27dd999391e28a3d69c2694d90d61ea214f..50ba87af55fd69dcf0ade1a1736e89ae
if (!base::FeatureList::IsEnabled(features::kV8OptimizeJavascript)) {
// We avoid explicitly passing --opt if kV8OptimizeJavascript is enabled
diff --git a/gin/v8_initializer.h b/gin/v8_initializer.h
index 6f3265ba4d06e70930630432bf739f89847d0b3c..29f28bebbdcde5a7f1c7b31a625d30f1b8079c39 100644
index a749ccbecfc8b82217d4ed48dcf8a5d9ceba052c..00b21585e65b2fcb2401d28d425f7db2e5dec389 100644
--- a/gin/v8_initializer.h
+++ b/gin/v8_initializer.h
@@ -21,7 +21,8 @@ class GIN_EXPORT V8Initializer {

View file

@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch
Add electron resources file to the list of resource ids generation.
diff --git a/tools/gritsettings/resource_ids b/tools/gritsettings/resource_ids
index 4d9d81bcc3fdd37a7d45fafa4a1fdf85528d6f91..637d6f842d08ec92b9dcddc0722cef8254cd8f87 100644
index 0d621a15e32b9d354bf21af92f4d4cf8bfdeec67..a6f2e9e76eb82b1b45e3cd8b0662211904dc70ae 100644
--- a/tools/gritsettings/resource_ids
+++ b/tools/gritsettings/resource_ids
@@ -420,6 +420,11 @@
@@ -424,6 +424,11 @@
"includes": [28900],
},

View file

@ -35,10 +35,10 @@ index 8ec7775b78b3645dbac5ee518404ca9a70122153..c82ca4d00398cb01ffea20b8d8d93732
new PerIsolateData(isolate_, allocator, access_mode_, task_runner));
if (isolate_creation_mode == IsolateCreationMode::kCreateSnapshot) {
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
index 535b0caa02f89f8a0fde841057d35e3834ea087f..c68d45722b50654fb92efeea28f5a0d4c9018b49 100644
index 95844885e478e460b1f03a7d98942bffe263e3d0..fd739ab416b8df71cf192ac178ebf217a5d7816c 100644
--- a/gin/public/isolate_holder.h
+++ b/gin/public/isolate_holder.h
@@ -80,7 +80,8 @@ class GIN_EXPORT IsolateHolder {
@@ -81,7 +81,8 @@ class GIN_EXPORT IsolateHolder {
AccessMode access_mode,
AllowAtomicsWaitMode atomics_wait_mode,
IsolateType isolate_type,

View file

@ -1,25 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jeremy Apthorp <jeremya@chromium.org>
Date: Thu, 20 Sep 2018 17:50:38 -0700
Subject: leveldb_ssize_t.patch
Fix conflict between leveldb & node's definition of ssize_t on
Windows by preventing leveldb from re-defining the type if it's
already defined.
diff --git a/third_party/leveldatabase/port/port_chromium.h b/third_party/leveldatabase/port/port_chromium.h
index a7c449eba19c3e3f46eec9c428fb497f6b1a7852..acbce7efd582e226419054cf80e1c27f4919b2fb 100644
--- a/third_party/leveldatabase/port/port_chromium.h
+++ b/third_party/leveldatabase/port/port_chromium.h
@@ -26,7 +26,11 @@
#endif
#if defined(OS_WIN)
+# if !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED)
typedef SSIZE_T ssize_t;
+# define _SSIZE_T_
+# define _SSIZE_T_DEFINED
+# endif
#endif
namespace leveldb {

View file

@ -6,7 +6,7 @@ Subject: libgtkui_export.patch
Export libgtkui symbols for the GN component build.
diff --git a/chrome/browser/ui/libgtkui/gtk_util.h b/chrome/browser/ui/libgtkui/gtk_util.h
index 1efb064df26488d9d893e1e58cb17110c10501f3..f89015361652803962d1b4198848fb24573beae5 100644
index 32b0a390255dd39a7d02f094c0e59b205b00dabd..afa2d250beca30f50dbb1684d5217330c4d60bbb 100644
--- a/chrome/browser/ui/libgtkui/gtk_util.h
+++ b/chrome/browser/ui/libgtkui/gtk_util.h
@@ -11,6 +11,7 @@
@ -17,9 +17,9 @@ index 1efb064df26488d9d893e1e58cb17110c10501f3..f89015361652803962d1b4198848fb24
namespace aura {
class Window;
@@ -55,10 +56,10 @@ SkColor NormalURLColor(SkColor foreground);
// saturation than to look exactly like the foreground color.
SkColor SelectedURLColor(SkColor foreground, SkColor background);
@@ -33,10 +34,10 @@ namespace libgtkui {
extern const color_utils::HSL kDefaultTintFrameIncognito;
-void GtkInitFromCommandLine(const base::CommandLine& command_line);
+LIBGTKUI_EXPORT void GtkInitFromCommandLine(const base::CommandLine& command_line);
@ -30,16 +30,16 @@ index 1efb064df26488d9d893e1e58cb17110c10501f3..f89015361652803962d1b4198848fb24
guint GetGdkKeyCodeForAccelerator(const ui::Accelerator& accelerator);
@@ -73,7 +74,7 @@ void TurnButtonBlue(GtkWidget* button);
@@ -51,7 +52,7 @@ void TurnButtonBlue(GtkWidget* button);
// Sets |dialog| as transient for |parent|, which will keep it on top and center
// it above |parent|. Do nothing if |parent| is nullptr.
-void SetGtkTransientForAura(GtkWidget* dialog, aura::Window* parent);
+LIBGTKUI_EXPORT void SetGtkTransientForAura(GtkWidget* dialog, aura::Window* parent);
// Parses |button_string| into |leading_buttons| and
// |trailing_buttons|. The string is of the format
@@ -173,7 +174,7 @@ void ApplyCssToContext(GtkStyleContext* context, const std::string& css);
// Gets the transient parent aura window for |dialog|.
aura::Window* GetAuraTransientParent(GtkWidget* dialog);
@@ -157,7 +158,7 @@ void ApplyCssToContext(GtkStyleContext* context, const std::string& css);
// Get the 'color' property from the style context created by
// GetStyleContextFromCss(|css_selector|).
@ -48,7 +48,7 @@ index 1efb064df26488d9d893e1e58cb17110c10501f3..f89015361652803962d1b4198848fb24
ScopedCssProvider GetCssProvider(const std::string& css);
@@ -186,7 +187,7 @@ void RenderBackground(const gfx::Size& size,
@@ -170,7 +171,7 @@ void RenderBackground(const gfx::Size& size,
// Renders a background from the style context created by
// GetStyleContextFromCss(|css_selector|) into a 24x24 bitmap and
// returns the average color.

View file

@ -6,10 +6,10 @@ Subject: mas-audiodeviceduck.patch
Removes usage of the AudioDeviceDuck private API.
diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc
index c0579e95374a12c5fd19f8c32c85ef0aab365ea1..5a619362fef5f03b448c5a35b5106f6f50bf8ff5 100644
index b7bcfa7b01dd5072685aaa1176d6277405742d94..df34137985d36ea2a48b2afe45c3cc253d4aa95b 100644
--- a/media/audio/mac/audio_low_latency_input_mac.cc
+++ b/media/audio/mac/audio_low_latency_input_mac.cc
@@ -32,19 +32,23 @@
@@ -33,19 +33,23 @@
namespace {
extern "C" {

View file

@ -6,7 +6,7 @@ Subject: mas-cgdisplayusesforcetogray.patch
Removes usage of the CGDisplayUsesForceToGray private API.
diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm
index 99a128511250d594cdac79ebf9b291823db18962..7200a5df74e168b817f7e7598b7fce8b41c6515c 100644
index ec1fc4edf55d8b5893dece146ddb0d39231f547d..05d8c811b913d88b71017a91eb3f2f993ccadd74 100644
--- a/ui/display/mac/screen_mac.mm
+++ b/ui/display/mac/screen_mac.mm
@@ -106,7 +106,17 @@ Display BuildDisplayForScreen(NSScreen* screen) {

View file

@ -7,10 +7,10 @@ Removes usage of the _LSSetApplicationLaunchServicesServerConnectionStatus
private API.
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index f589d015d71e486bad5f9d267b1f779b0b53d28b..2397d722c12d1f57d75d38045b198813d578ea78 100644
index 8397889b61e20febeee1dd3c0fe8732186e29b28..13e6da203846de6c93ab656b6c9e0399bce24110 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -273,8 +273,10 @@ int GpuMain(const MainFunctionParams& parameters) {
@@ -274,8 +274,10 @@ int GpuMain(const MainFunctionParams& parameters) {
std::unique_ptr<base::MessagePump> pump(new base::MessagePumpNSRunLoop());
main_message_loop.reset(new base::MessageLoop(std::move(pump)));

View file

@ -38,7 +38,7 @@ index 44c85b5ad571c39c4580cb9d0cdf08f694c1dfb4..1714c403edf21092e43192f25cf0c19f
// is concerned.
@property(nonatomic, readonly) NSString* subrole;
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm
index 06db282cd7415e21d91f4209a51b96f408475c75..980e2387756ea8e01396b84d95844964bba90d0c 100644
index ec60dd6b8f2500ac812654817f76cef26636d911..4c8c2cca0a15ad27c655fad98a6c395228d33e4e 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
@@ -135,6 +135,7 @@
@ -85,7 +85,7 @@ index 06db282cd7415e21d91f4209a51b96f408475c75..980e2387756ea8e01396b84d95844964
{NSAccessibilitySizeAttribute, @"size"},
{NSAccessibilitySortDirectionAttribute, @"sortDirection"},
{NSAccessibilitySubroleAttribute, @"subrole"},
@@ -1116,6 +1124,7 @@ - (NSNumber*)enabled {
@@ -1117,6 +1125,7 @@ - (NSNumber*)enabled {
ax::mojom::Restriction::kDisabled];
}
@ -93,7 +93,7 @@ index 06db282cd7415e21d91f4209a51b96f408475c75..980e2387756ea8e01396b84d95844964
// Returns a text marker that points to the last character in the document that
// can be selected with VoiceOver.
- (id)endTextMarker {
@@ -1126,6 +1135,7 @@ - (id)endTextMarker {
@@ -1127,6 +1136,7 @@ - (id)endTextMarker {
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
return CreateTextMarker(position->CreatePositionAtEndOfAnchor());
}
@ -101,7 +101,7 @@ index 06db282cd7415e21d91f4209a51b96f408475c75..980e2387756ea8e01396b84d95844964
- (NSNumber*)expanded {
if (![self instanceActive])
@@ -2034,6 +2044,7 @@ - (NSValue*)selectedTextRange {
@@ -2036,6 +2046,7 @@ - (NSValue*)selectedTextRange {
return [NSValue valueWithRange:NSMakeRange(selStart, selLength)];
}
@ -109,7 +109,7 @@ index 06db282cd7415e21d91f4209a51b96f408475c75..980e2387756ea8e01396b84d95844964
- (id)selectedTextMarkerRange {
if (![self instanceActive])
return nil;
@@ -2066,6 +2077,7 @@ - (id)selectedTextMarkerRange {
@@ -2068,6 +2079,7 @@ - (id)selectedTextMarkerRange {
anchorAffinity, *focusObject,
focusOffset, focusAffinity));
}
@ -117,7 +117,7 @@ index 06db282cd7415e21d91f4209a51b96f408475c75..980e2387756ea8e01396b84d95844964
- (NSValue*)size {
if (![self instanceActive])
@@ -2098,6 +2110,7 @@ - (NSString*)sortDirection {
@@ -2100,6 +2112,7 @@ - (NSString*)sortDirection {
return nil;
}
@ -125,7 +125,7 @@ index 06db282cd7415e21d91f4209a51b96f408475c75..980e2387756ea8e01396b84d95844964
// Returns a text marker that points to the first character in the document that
// can be selected with VoiceOver.
- (id)startTextMarker {
@@ -2108,6 +2121,7 @@ - (id)startTextMarker {
@@ -2110,6 +2123,7 @@ - (id)startTextMarker {
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
return CreateTextMarker(position->CreatePositionAtStartOfAnchor());
}
@ -133,7 +133,7 @@ index 06db282cd7415e21d91f4209a51b96f408475c75..980e2387756ea8e01396b84d95844964
// Returns a subrole based upon the role.
- (NSString*) subrole {
@@ -2413,12 +2427,14 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
@@ -2418,12 +2432,14 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
NSMutableAttributedString* attributedValue =
[[[NSMutableAttributedString alloc] initWithString:value] autorelease];
@ -148,7 +148,7 @@ index 06db282cd7415e21d91f4209a51b96f408475c75..980e2387756ea8e01396b84d95844964
return [attributedValue attributedSubstringFromRange:range];
}
@@ -2535,6 +2551,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
@@ -2540,6 +2556,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
return nil;
}
@ -156,7 +156,7 @@ index 06db282cd7415e21d91f4209a51b96f408475c75..980e2387756ea8e01396b84d95844964
if ([attribute isEqualToString:@"AXUIElementForTextMarker"]) {
BrowserAccessibilityPositionInstance position =
CreatePositionFromTextMarker(parameter);
@@ -2712,6 +2729,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
@@ -2717,6 +2734,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
NSString* text = GetTextForTextMarkerRange(parameter);
return [NSNumber numberWithInt:[text length]];
}
@ -164,7 +164,7 @@ index 06db282cd7415e21d91f4209a51b96f408475c75..980e2387756ea8e01396b84d95844964
if ([attribute isEqualToString:
NSAccessibilityBoundsForRangeParameterizedAttribute]) {
@@ -2749,6 +2767,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
@@ -2754,6 +2772,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
return nil;
}
@ -172,7 +172,7 @@ index 06db282cd7415e21d91f4209a51b96f408475c75..980e2387756ea8e01396b84d95844964
if ([attribute isEqualToString:
NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) {
BrowserAccessibilityPositionInstance position =
@@ -2828,6 +2847,7 @@ AXPlatformRange range(position->CreatePreviousLineStartPosition(
@@ -2833,6 +2852,7 @@ AXPlatformRange range(position->CreatePreviousLineStartPosition(
return @(child->GetIndexInParent());
}
@ -181,10 +181,10 @@ index 06db282cd7415e21d91f4209a51b96f408475c75..980e2387756ea8e01396b84d95844964
return nil;
}
diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm
index 09cb7f8a55d1d85abbe88a2bfe76ff4b9c8f253b..18e262218fe657cde910e4b3eee7a8b524b7b5e8 100644
index ace4792b6861452555e819a2412303e3495c2018..b258a8302e85e8eee04b23106616a825b344e32f 100644
--- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
+++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
@@ -459,6 +459,7 @@ void PostAnnouncementNotification(NSString* announcement) {
@@ -462,6 +462,7 @@ void PostAnnouncementNotification(NSString* announcement) {
[user_info setObject:native_focus_object
forKey:NSAccessibilityTextChangeElement];
@ -192,7 +192,7 @@ index 09cb7f8a55d1d85abbe88a2bfe76ff4b9c8f253b..18e262218fe657cde910e4b3eee7a8b5
id selected_text = [native_focus_object selectedTextMarkerRange];
if (selected_text) {
NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute =
@@ -466,6 +467,7 @@ void PostAnnouncementNotification(NSString* announcement) {
@@ -469,6 +470,7 @@ void PostAnnouncementNotification(NSString* announcement) {
[user_info setObject:selected_text
forKey:NSAccessibilitySelectedTextMarkerRangeAttribute];
}
@ -201,32 +201,31 @@ index 09cb7f8a55d1d85abbe88a2bfe76ff4b9c8f253b..18e262218fe657cde910e4b3eee7a8b5
}
diff --git a/content/renderer/renderer_main_platform_delegate_mac.mm b/content/renderer/renderer_main_platform_delegate_mac.mm
index e2122fb5fe931c911f92e709d1a643cd575972f3..da6847eea755a0b564fcd7daa36c4badc014c7f3 100644
index b7142c2871faf4a0ba8be79266e9515d81585bdd..3d80c332e9af280a166612f6be54b6f767d729a1 100644
--- a/content/renderer/renderer_main_platform_delegate_mac.mm
+++ b/content/renderer/renderer_main_platform_delegate_mac.mm
@@ -23,10 +23,12 @@
@@ -23,9 +23,11 @@
#include "sandbox/mac/system_services.h"
#include "services/service_manager/sandbox/mac/sandbox_mac.h"
+#ifndef MAS_BUILD
extern "C" {
void CGSSetDenyWindowServerConnections(bool);
void CGSShutdownServerConnections();
CGError CGSSetDenyWindowServerConnections(bool);
};
+#endif
namespace content {
@@ -35,6 +37,7 @@
// This disconnects from the window server, and then indicates that Chrome
// should continue execution without access to launchservicesd.
void DisconnectWindowServer() {
// verifies there are no existing open connections), and then indicates that
// Chrome should continue execution without access to launchservicesd.
void DisableSystemServices() {
+#ifndef MAS_BUILD
// Now disconnect from WindowServer, after all objects have been warmed up.
// Shutting down the connection requires connecting to WindowServer,
// so do this before actually engaging the sandbox. This may cause two log
@@ -43,6 +46,7 @@ void DisconnectWindowServer() {
CGSShutdownServerConnections();
// Tell the WindowServer that we don't want to make any future connections.
// This will return Success as long as there are no open connections, which
// is what we want.
@@ -42,6 +45,7 @@ void DisableSystemServices() {
CHECK_EQ(result, kCGErrorSuccess);
sandbox::DisableLaunchServices();
+#endif
@ -278,7 +277,7 @@ index 24a63be8a4be4f74f78fec810490d16cffaf43c1..414423de009d14ac6ac7bab2a260b3e0
void BluetoothAdapterMac::RemovePairingDelegateInternal(
diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn
index 6b7eccaf55c1b81a8db03c96f9c4353716fa8eed..7011139d73253a9f6771f0be4e6c8827493a64ea 100644
index 38e7bb1d7f4ac8ddede73fcb2d64ff3ea25205d7..c1a9026b1fb8610546b682b4d677871482327e63 100644
--- a/media/audio/BUILD.gn
+++ b/media/audio/BUILD.gn
@@ -202,6 +202,12 @@ source_set("audio") {
@ -295,7 +294,7 @@ index 6b7eccaf55c1b81a8db03c96f9c4353716fa8eed..7011139d73253a9f6771f0be4e6c8827
"AudioToolbox.framework",
"AudioUnit.framework",
diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc
index 74dd21d45b4ff8da203ef7d759bbccf05033f862..d7dd95b4d461981c36061d1031c932fcb6f2e31b 100644
index 31f593c59087969c3879b1da5a3de1eedcffc3a3..3bc29f5a5560b4436ebe70924bf10354e0b6be99 100644
--- a/media/audio/mac/audio_manager_mac.cc
+++ b/media/audio/mac/audio_manager_mac.cc
@@ -868,7 +868,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters(
@ -308,10 +307,10 @@ index 74dd21d45b4ff8da203ef7d759bbccf05033f862..d7dd95b4d461981c36061d1031c932fc
}
diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc
index 06e9d7969c0f21726de216cd670e4752c8aff6ab..6fc766e981fdc59fcbb3c0780fde87c5cd953e2d 100644
index 1b947c5b63564ac87cc3fb5a0d060e41a5407b4a..2bf92efa3c77ac13383dd904ba2a24081deccd04 100644
--- a/net/dns/dns_config_service_posix.cc
+++ b/net/dns/dns_config_service_posix.cc
@@ -242,6 +242,7 @@ class DnsConfigServicePosix::Watcher {
@@ -243,6 +243,7 @@ class DnsConfigServicePosix::Watcher {
bool Watch() {
bool success = true;
@ -319,7 +318,7 @@ index 06e9d7969c0f21726de216cd670e4752c8aff6ab..6fc766e981fdc59fcbb3c0780fde87c5
if (!config_watcher_.Watch(base::Bind(&Watcher::OnConfigChanged,
base::Unretained(this)))) {
LOG(ERROR) << "DNS config watch failed to start.";
@@ -263,6 +264,7 @@ class DnsConfigServicePosix::Watcher {
@@ -264,6 +265,7 @@ class DnsConfigServicePosix::Watcher {
DNS_CONFIG_WATCH_MAX);
}
#endif // !defined(OS_ANDROID) && !defined(OS_IOS)

View file

@ -7,15 +7,15 @@ Do not check for unique origin in CacheStorage, in Electron we may have
scripts running without an origin.
diff --git a/content/browser/cache_storage/cache_storage.cc b/content/browser/cache_storage/cache_storage.cc
index 78508c8b6f1cd0b66f89337a60e3c4daabbe6513..e3f7d339a7c1b75d2d0fecd81b1c238da2233f80 100644
index 5371daf3c552d4ad506439ba6e37b80a353b1036..bd5a480552fd420d5d15f97a39b08e693edff22d 100644
--- a/content/browser/cache_storage/cache_storage.cc
+++ b/content/browser/cache_storage/cache_storage.cc
@@ -132,7 +132,7 @@ class CacheStorage::CacheLoader {
@@ -133,7 +133,7 @@ class CacheStorage::CacheLoader {
cache_storage_(cache_storage),
origin_(origin),
owner_(owner) {
- DCHECK(!origin_.unique());
+ // DCHECK(!origin_.unique());
- DCHECK(!origin_.opaque());
+ // DCHECK(!origin_.opaque());
}
virtual ~CacheLoader() {}

View file

@ -6,10 +6,10 @@ Subject: pass RenderProcessHost through to PlatformNotificationService
this is so Electron can identify which renderer a notification came from
diff --git a/content/browser/notifications/blink_notification_service_impl.cc b/content/browser/notifications/blink_notification_service_impl.cc
index 73c5d6b436e0a842d9e18f65d6174ff1ce736deb..85dc547425bbe7b1e2c4575ff8b10d18989d9ad1 100644
index 2a4592f1565b99db37e91e090b5478fd1ad6e1a7..8a4144153789f4174763e3b23d47080521b0c20e 100644
--- a/content/browser/notifications/blink_notification_service_impl.cc
+++ b/content/browser/notifications/blink_notification_service_impl.cc
@@ -40,9 +40,11 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl(
@@ -48,9 +48,11 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl(
PlatformNotificationContextImpl* notification_context,
BrowserContext* browser_context,
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context,
@ -21,7 +21,7 @@ index 73c5d6b436e0a842d9e18f65d6174ff1ce736deb..85dc547425bbe7b1e2c4575ff8b10d18
browser_context_(browser_context),
service_worker_context_(std::move(service_worker_context)),
origin_(origin),
@@ -99,7 +101,7 @@ void BlinkNotificationServiceImpl::DisplayNonPersistentNotification(
@@ -110,7 +112,7 @@ void BlinkNotificationServiceImpl::DisplayNonPersistentNotification(
notification_id, std::move(event_listener_ptr));
GetNotificationService()->DisplayNotification(
@ -31,10 +31,10 @@ index 73c5d6b436e0a842d9e18f65d6174ff1ce736deb..85dc547425bbe7b1e2c4575ff8b10d18
}
diff --git a/content/browser/notifications/blink_notification_service_impl.h b/content/browser/notifications/blink_notification_service_impl.h
index 193f5d241c314e9921048d592602e5caa362f198..3cfcc6b86ae10102a1cc9e9abb27c529a57511cb 100644
index 1ae12ca955024b85296449eb33f18af7f7bea37d..6d1df92efe1aec0a51cdb90a7731b187a3433154 100644
--- a/content/browser/notifications/blink_notification_service_impl.h
+++ b/content/browser/notifications/blink_notification_service_impl.h
@@ -33,6 +33,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl
@@ -36,6 +36,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl
PlatformNotificationContextImpl* notification_context,
BrowserContext* browser_context,
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context,
@ -42,7 +42,7 @@ index 193f5d241c314e9921048d592602e5caa362f198..3cfcc6b86ae10102a1cc9e9abb27c529
const url::Origin& origin,
mojo::InterfaceRequest<blink::mojom::NotificationService> request);
~BlinkNotificationServiceImpl() override;
@@ -94,6 +95,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl
@@ -104,6 +105,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl
// The notification context that owns this service instance.
PlatformNotificationContextImpl* notification_context_;
@ -51,23 +51,23 @@ index 193f5d241c314e9921048d592602e5caa362f198..3cfcc6b86ae10102a1cc9e9abb27c529
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
diff --git a/content/browser/notifications/blink_notification_service_impl_unittest.cc b/content/browser/notifications/blink_notification_service_impl_unittest.cc
index 618c7bd88cde563eaaf93914039b5fb6d81db514..be08e89b5c6d57abf6b61ed9ee4b1c536a6ca134 100644
index 9985cfee820e4bb536813e39ebdca9b45574d6cf..e0636fde3c97bb4fce19b6042344cb432d96427c 100644
--- a/content/browser/notifications/blink_notification_service_impl_unittest.cc
+++ b/content/browser/notifications/blink_notification_service_impl_unittest.cc
@@ -113,7 +113,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test {
blink::mojom::NotificationServicePtr notification_service_ptr;
@@ -126,7 +126,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test {
notification_service_ = std::make_unique<BlinkNotificationServiceImpl>(
notification_context_.get(), &browser_context_,
- embedded_worker_helper_->context_wrapper(),
+ embedded_worker_helper_->context_wrapper(), nullptr,
url::Origin::Create(GURL(kTestOrigin)),
mojo::MakeRequest(&notification_service_ptr));
mojo::MakeRequest(&notification_service_ptr_));
diff --git a/content/browser/notifications/platform_notification_context_impl.cc b/content/browser/notifications/platform_notification_context_impl.cc
index 13ece81608b6eddd3350c8aef870aa71abd4c7c8..0d7f7731609d690f30da205ff267a0728d00e778 100644
index 9b31e66db71ad167d593dd037bcecf4151b1452e..d01fe86c8f1ad8c9610b4b66f7b2b14bd819e359 100644
--- a/content/browser/notifications/platform_notification_context_impl.cc
+++ b/content/browser/notifications/platform_notification_context_impl.cc
@@ -126,12 +126,13 @@ void PlatformNotificationContextImpl::ShutdownOnIO() {
@@ -127,12 +127,13 @@ void PlatformNotificationContextImpl::ShutdownOnIO() {
}
void PlatformNotificationContextImpl::CreateService(
@ -106,10 +106,10 @@ index 653f487b0b0e01de7cdda8483f081550a9077e98..da9e5f53d07eaaf11525efd996be9420
// Removes |service| from the list of owned services, for example because the
diff --git a/content/browser/renderer_interface_binders.cc b/content/browser/renderer_interface_binders.cc
index c3a8bdc572de68e824756f71b1386f2b2058bc01..2a340aa0f629f581ec400c89bea7e706fd73d79b 100644
index 5a6e7ed16110e5d34d5e4f6e37f59ff84094a994..63af4bd1d17aca55229960422082643f2926d705 100644
--- a/content/browser/renderer_interface_binders.cc
+++ b/content/browser/renderer_interface_binders.cc
@@ -168,7 +168,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() {
@@ -176,7 +176,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() {
RenderProcessHost* host, const url::Origin& origin) {
static_cast<StoragePartitionImpl*>(host->GetStoragePartition())
->GetPlatformNotificationContext()
@ -119,18 +119,18 @@ index c3a8bdc572de68e824756f71b1386f2b2058bc01..2a340aa0f629f581ec400c89bea7e706
parameterized_binder_registry_.AddInterface(
base::BindRepeating(&BackgroundFetchServiceImpl::CreateForWorker));
diff --git a/content/public/browser/platform_notification_service.h b/content/public/browser/platform_notification_service.h
index 0e9ce4383087415d8cd77e5b5e196492845a93cc..672df69c849b0ecbe46a08e9d8b0b34b375d5588 100644
index 80ffd8d426c2380d57172a951a8cd15a0393bf88..0cf9ee3a44647f44bcd89351931c162370ebfe29 100644
--- a/content/public/browser/platform_notification_service.h
+++ b/content/public/browser/platform_notification_service.h
@@ -22,6 +22,7 @@ class GURL;
@@ -27,6 +27,7 @@ struct PlatformNotificationData;
namespace content {
class BrowserContext;
+class RenderProcessHost;
struct NotificationResources;
struct PlatformNotificationData;
@@ -39,6 +40,7 @@ class CONTENT_EXPORT PlatformNotificationService {
// The service using which notifications can be presented to the user. There
// should be a unique instance of the PlatformNotificationService depending
@@ -42,6 +43,7 @@ class CONTENT_EXPORT PlatformNotificationService {
// Displays the notification described in |notification_data| to the user.
// This method must be called on the UI thread.
virtual void DisplayNotification(
@ -139,10 +139,10 @@ index 0e9ce4383087415d8cd77e5b5e196492845a93cc..672df69c849b0ecbe46a08e9d8b0b34b
const std::string& notification_id,
const GURL& origin,
diff --git a/content/test/mock_platform_notification_service.cc b/content/test/mock_platform_notification_service.cc
index b345a7442d2c64b814548dbfaf88d944a434122e..93b6962c5cac6fd915fbfbc7566fa77d836b45c5 100644
index 0246db2c6d249843867d26d7ae6eb77f781e30a8..bc232b2684652e0febef9f3fe2f5e5e97719f06b 100644
--- a/content/test/mock_platform_notification_service.cc
+++ b/content/test/mock_platform_notification_service.cc
@@ -20,6 +20,7 @@ MockPlatformNotificationService::MockPlatformNotificationService() = default;
@@ -22,6 +22,7 @@ MockPlatformNotificationService::MockPlatformNotificationService() = default;
MockPlatformNotificationService::~MockPlatformNotificationService() = default;
void MockPlatformNotificationService::DisplayNotification(
@ -151,10 +151,10 @@ index b345a7442d2c64b814548dbfaf88d944a434122e..93b6962c5cac6fd915fbfbc7566fa77d
const std::string& notification_id,
const GURL& origin,
diff --git a/content/test/mock_platform_notification_service.h b/content/test/mock_platform_notification_service.h
index 8741d95ee8b01ff2fe0448d77f1c4fa8fa476376..d7f5fc10a654e87d17e383ae68bfb10740337468 100644
index 1d38db3e3d141b32b237c0f4ebe6abc80751225c..4f6dcf2c72493b1c29751ec5f7b16bf96946f4a5 100644
--- a/content/test/mock_platform_notification_service.h
+++ b/content/test/mock_platform_notification_service.h
@@ -43,6 +43,7 @@ class MockPlatformNotificationService : public PlatformNotificationService {
@@ -45,6 +45,7 @@ class MockPlatformNotificationService : public PlatformNotificationService {
// PlatformNotificationService implementation.
void DisplayNotification(

View file

@ -5,10 +5,10 @@ Subject: out_of_process_instance.patch
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc
index 0358d15fb45bb57111ee2af0f791cd99f6f27f70..101763db35d129097bda50af1bfa9f6fb54b2228 100644
index 788082cd637aaf75f6ecc0a7d10977939f2b3e18..1a831ae135084f8cd04c2df62288300070585959 100644
--- a/pdf/out_of_process_instance.cc
+++ b/pdf/out_of_process_instance.cc
@@ -455,7 +455,9 @@ bool OutOfProcessInstance::Init(uint32_t argc,
@@ -468,7 +468,9 @@ bool OutOfProcessInstance::Init(uint32_t argc,
std::string document_url = document_url_var.AsString();
base::StringPiece document_url_piece(document_url);
is_print_preview_ = IsPrintPreviewUrl(document_url_piece);

View file

@ -28,13 +28,13 @@ index 735da93c3cabb8c6139971295740ba14a30d1b69..533f53fbc42397608e3762e370cc935c
// Non-owning pointer to the filter must outlive this class.
explicit ChromeBrowserPepperHostFactory(content::BrowserPpapiHost* host);
diff --git a/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.cc b/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.cc
index f4f1741a8ecfdb570e3fe77d39146329c0677c13..103238cdd53f8f103de55e199162979c6ace948c 100644
index 83cedb4c9e1323259afd041e571240cd971e1241..3686ae2fab5f400cf119a54aea547a72655c2b0a 100644
--- a/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.cc
+++ b/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.cc
@@ -6,10 +6,12 @@
@@ -7,10 +7,12 @@
#include <string>
#include "base/task/post_task.h"
+#if 0
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/profiles/profile.h"
@ -42,9 +42,9 @@ index f4f1741a8ecfdb570e3fe77d39146329c0677c13..103238cdd53f8f103de55e199162979c
#include "components/content_settings/core/common/content_settings.h"
+#endif
#include "content/public/browser/browser_ppapi_host.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_process_host.h"
@@ -57,6 +59,7 @@ int32_t PepperBrokerMessageFilter::OnIsAllowed(
@@ -59,6 +61,7 @@ int32_t PepperBrokerMessageFilter::OnIsAllowed(
RenderProcessHost::FromID(render_process_id_);
if (!render_process_host)
return PP_ERROR_FAILED;
@ -52,7 +52,7 @@ index f4f1741a8ecfdb570e3fe77d39146329c0677c13..103238cdd53f8f103de55e199162979c
Profile* profile =
Profile::FromBrowserContext(render_process_host->GetBrowserContext());
HostContentSettingsMap* content_settings =
@@ -68,5 +71,6 @@ int32_t PepperBrokerMessageFilter::OnIsAllowed(
@@ -70,5 +73,6 @@ int32_t PepperBrokerMessageFilter::OnIsAllowed(
std::string());
if (setting == CONTENT_SETTING_ALLOW)
return PP_OK;
@ -61,11 +61,11 @@ index f4f1741a8ecfdb570e3fe77d39146329c0677c13..103238cdd53f8f103de55e199162979c
+ return PP_OK;
}
diff --git a/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc b/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc
index 1c1844a9eb71fe0d75cf8e3cef833fa5ffb13608..2c9834b11d34f6311f445c3ef8b62b907ab695c0 100644
index 1ecf64b2068a9c4a234c3ef075a5b22dfc61669a..fa58a62346de7e57f6473ebce23d771509ccccee 100644
--- a/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc
+++ b/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc
@@ -6,9 +6,11 @@
@@ -7,9 +7,11 @@
#include "base/task/post_task.h"
#include "base/time/time.h"
#include "build/build_config.h"
+#if 0
@ -75,8 +75,8 @@ index 1c1844a9eb71fe0d75cf8e3cef833fa5ffb13608..2c9834b11d34f6311f445c3ef8b62b90
+#endif
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_ppapi_host.h"
#include "content/public/browser/browser_thread.h"
@@ -40,6 +42,7 @@ using content::ServiceManagerConnection;
#include "content/public/browser/browser_task_traits.h"
@@ -42,6 +44,7 @@ using content::ServiceManagerConnection;
namespace {
@ -84,7 +84,7 @@ index 1c1844a9eb71fe0d75cf8e3cef833fa5ffb13608..2c9834b11d34f6311f445c3ef8b62b90
// Get the CookieSettings on the UI thread for the given render process ID.
scoped_refptr<content_settings::CookieSettings> GetCookieSettings(
int render_process_id) {
@@ -53,6 +56,7 @@ scoped_refptr<content_settings::CookieSettings> GetCookieSettings(
@@ -55,6 +58,7 @@ scoped_refptr<content_settings::CookieSettings> GetCookieSettings(
}
return NULL;
}
@ -92,7 +92,7 @@ index 1c1844a9eb71fe0d75cf8e3cef833fa5ffb13608..2c9834b11d34f6311f445c3ef8b62b90
void PepperBindConnectorRequest(
service_manager::mojom::ConnectorRequest connector_request) {
@@ -70,7 +74,9 @@ PepperFlashBrowserHost::PepperFlashBrowserHost(BrowserPpapiHost* host,
@@ -72,7 +76,9 @@ PepperFlashBrowserHost::PepperFlashBrowserHost(BrowserPpapiHost* host,
PP_Instance instance,
PP_Resource resource)
: ResourceHost(host->GetPpapiHost(), instance, resource),
@ -102,7 +102,7 @@ index 1c1844a9eb71fe0d75cf8e3cef833fa5ffb13608..2c9834b11d34f6311f445c3ef8b62b90
delay_timer_(FROM_HERE, base::TimeDelta::FromSeconds(45), this,
&PepperFlashBrowserHost::OnDelayTimerFired),
weak_factory_(this) {
@@ -122,6 +128,7 @@ int32_t PepperFlashBrowserHost::OnGetLocalTimeZoneOffset(
@@ -124,6 +130,7 @@ int32_t PepperFlashBrowserHost::OnGetLocalTimeZoneOffset(
int32_t PepperFlashBrowserHost::OnGetLocalDataRestrictions(
ppapi::host::HostMessageContext* context) {
@ -111,7 +111,7 @@ index 1c1844a9eb71fe0d75cf8e3cef833fa5ffb13608..2c9834b11d34f6311f445c3ef8b62b90
// belong to the profile which lives on the UI thread. We lazily initialize
// |cookie_settings_| by grabbing the reference from the UI thread and then
@@ -144,9 +151,11 @@ int32_t PepperFlashBrowserHost::OnGetLocalDataRestrictions(
document_url,
context->MakeReplyMessageContext(), document_url,
plugin_url));
}
- return PP_OK_COMPLETIONPENDING;
@ -179,10 +179,10 @@ index 154120ce5156d77dd302b85cb17e2f14fb69cc2d..5152fd847c012fc2f40017687db426fa
DISALLOW_COPY_AND_ASSIGN(PepperFlashBrowserHost);
diff --git a/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc b/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc
index e267746783bde72ff4f9d8a4ec706c25a039432f..bc84b44ceb276b57700be1300d5e860f482c4d20 100644
index 1644f1233e2ae3142f7c9b450b0af97ae7325abc..bac25204c3afa7b87ed9e2861f96b5168b3e8aa6 100644
--- a/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc
+++ b/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc
@@ -18,6 +18,7 @@
@@ -20,6 +20,7 @@
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/common/pepper_plugin_info.h"
@ -190,7 +190,7 @@ index e267746783bde72ff4f9d8a4ec706c25a039432f..bc84b44ceb276b57700be1300d5e860f
#include "ppapi/c/pp_errors.h"
#include "ppapi/host/dispatch_host_message.h"
#include "ppapi/host/host_message_context.h"
@@ -127,7 +128,9 @@ PepperFlashDRMHost::PepperFlashDRMHost(BrowserPpapiHost* host,
@@ -128,7 +129,9 @@ PepperFlashDRMHost::PepperFlashDRMHost(BrowserPpapiHost* host,
content::ChildProcessSecurityPolicy::GetInstance()->GrantReadFile(
render_process_id, voucher_file);
@ -200,7 +200,7 @@ index e267746783bde72ff4f9d8a4ec706c25a039432f..bc84b44ceb276b57700be1300d5e860f
monitor_finder_ = new MonitorFinder(render_process_id, render_frame_id);
monitor_finder_->GetMonitor();
}
@@ -150,12 +153,18 @@ int32_t PepperFlashDRMHost::OnResourceMessageReceived(
@@ -151,12 +154,18 @@ int32_t PepperFlashDRMHost::OnResourceMessageReceived(
int32_t PepperFlashDRMHost::OnHostMsgGetDeviceID(
ppapi::host::HostMessageContext* context) {
@ -220,7 +220,7 @@ index e267746783bde72ff4f9d8a4ec706c25a039432f..bc84b44ceb276b57700be1300d5e860f
}
int32_t PepperFlashDRMHost::OnHostMsgGetHmonitor(
@@ -184,6 +193,7 @@ int32_t PepperFlashDRMHost::OnHostMsgMonitorIsExternal(
@@ -185,6 +194,7 @@ int32_t PepperFlashDRMHost::OnHostMsgMonitorIsExternal(
return PP_OK;
}
@ -228,7 +228,7 @@ index e267746783bde72ff4f9d8a4ec706c25a039432f..bc84b44ceb276b57700be1300d5e860f
void PepperFlashDRMHost::GotDeviceID(
ppapi::host::ReplyMessageContext reply_context,
const std::string& id,
@@ -196,3 +206,4 @@ void PepperFlashDRMHost::GotDeviceID(
@@ -197,3 +207,4 @@ void PepperFlashDRMHost::GotDeviceID(
host()->SendReply(reply_context,
PpapiPluginMsg_FlashDRM_GetDeviceIDReply(id));
}
@ -258,13 +258,13 @@ index aa4433cccff4bc637ce5e71039de3c4352e7cd6b..d9630fdf6b87e11fb9657814895dff36
base::WeakPtrFactory<PepperFlashDRMHost> weak_factory_;
diff --git a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc
index 5599a2d3d62f8511655a7bc1fa88e39187451fe8..84e12cf5d2731a8a7b0ba0396ba14db6d0478394 100644
index d266f41233ff676539438d7cdd3799d83129e242..1cd381fd576fedd4ee382b33282ecd991d1f9ea7 100644
--- a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc
+++ b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc
@@ -7,16 +7,20 @@
#include <stddef.h>
@@ -8,17 +8,21 @@
#include "base/macros.h"
#include "base/task/post_task.h"
+#if 0
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
@ -273,6 +273,7 @@ index 5599a2d3d62f8511655a7bc1fa88e39187451fe8..84e12cf5d2731a8a7b0ba0396ba14db6
#include "chrome/common/pepper_permission_util.h"
+#endif
#include "content/public/browser/browser_ppapi_host.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/render_view_host.h"
@ -282,7 +283,7 @@ index 5599a2d3d62f8511655a7bc1fa88e39187451fe8..84e12cf5d2731a8a7b0ba0396ba14db6
#include "ppapi/c/pp_errors.h"
#include "ppapi/host/dispatch_host_message.h"
#include "ppapi/host/host_message_context.h"
@@ -25,12 +29,11 @@
@@ -27,12 +31,11 @@
#include "ppapi/shared_impl/file_system_util.h"
#include "storage/browser/fileapi/isolated_context.h"
@ -296,7 +297,7 @@ index 5599a2d3d62f8511655a7bc1fa88e39187451fe8..84e12cf5d2731a8a7b0ba0396ba14db6
namespace {
@@ -40,6 +43,7 @@ const char* kPredefinedAllowedCrxFsOrigins[] = {
@@ -42,6 +45,7 @@ const char* kPredefinedAllowedCrxFsOrigins[] = {
};
} // namespace
@ -304,7 +305,7 @@ index 5599a2d3d62f8511655a7bc1fa88e39187451fe8..84e12cf5d2731a8a7b0ba0396ba14db6
// static
PepperIsolatedFileSystemMessageFilter*
@@ -67,8 +71,10 @@ PepperIsolatedFileSystemMessageFilter::PepperIsolatedFileSystemMessageFilter(
@@ -69,8 +73,10 @@ PepperIsolatedFileSystemMessageFilter::PepperIsolatedFileSystemMessageFilter(
profile_directory_(profile_directory),
document_url_(document_url),
ppapi_host_(ppapi_host) {
@ -315,7 +316,7 @@ index 5599a2d3d62f8511655a7bc1fa88e39187451fe8..84e12cf5d2731a8a7b0ba0396ba14db6
}
PepperIsolatedFileSystemMessageFilter::
@@ -94,6 +100,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnResourceMessageReceived(
@@ -96,6 +102,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnResourceMessageReceived(
return PP_ERROR_FAILED;
}
@ -323,7 +324,7 @@ index 5599a2d3d62f8511655a7bc1fa88e39187451fe8..84e12cf5d2731a8a7b0ba0396ba14db6
Profile* PepperIsolatedFileSystemMessageFilter::GetProfile() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
ProfileManager* profile_manager = g_browser_process->profile_manager();
@@ -120,6 +127,7 @@ std::string PepperIsolatedFileSystemMessageFilter::CreateCrxFileSystem(
@@ -122,6 +129,7 @@ std::string PepperIsolatedFileSystemMessageFilter::CreateCrxFileSystem(
return std::string();
#endif
}
@ -331,7 +332,7 @@ index 5599a2d3d62f8511655a7bc1fa88e39187451fe8..84e12cf5d2731a8a7b0ba0396ba14db6
int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem(
ppapi::host::HostMessageContext* context,
@@ -128,7 +136,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem(
@@ -130,7 +138,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem(
case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_INVALID:
break;
case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_CRX:
@ -340,7 +341,7 @@ index 5599a2d3d62f8511655a7bc1fa88e39187451fe8..84e12cf5d2731a8a7b0ba0396ba14db6
case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_PLUGINPRIVATE:
return OpenPluginPrivateFileSystem(context);
}
@@ -138,6 +146,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem(
@@ -140,6 +148,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem(
return PP_ERROR_FAILED;
}
@ -348,7 +349,7 @@ index 5599a2d3d62f8511655a7bc1fa88e39187451fe8..84e12cf5d2731a8a7b0ba0396ba14db6
int32_t PepperIsolatedFileSystemMessageFilter::OpenCrxFileSystem(
ppapi::host::HostMessageContext* context) {
#if BUILDFLAG(ENABLE_EXTENSIONS)
@@ -176,6 +185,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OpenCrxFileSystem(
@@ -178,6 +187,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OpenCrxFileSystem(
return PP_ERROR_NOTSUPPORTED;
#endif
}

View file

@ -9,20 +9,25 @@ majority of changes originally come from these PRs:
* https://github.com/electron/electron/pull/8596
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
index 1065e808e621c087bde9320abe019f05292f977c..6cf33877d21a6bf06532f7f9d79804c744f1ad83 100644
index 1e2d43fb562522f7ebe50a8acc47645495f02436..1a04e1fff488dfde1cf8089ac9ba1b5acc646803 100644
--- a/chrome/browser/printing/print_job_worker.cc
+++ b/chrome/browser/printing/print_job_worker.cc
@@ -20,7 +20,7 @@
@@ -21,12 +21,12 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/printing/print_job.h"
-#include "chrome/grit/generated_resources.h"
+#include "electron/grit/electron_resources.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
+#include "electron/grit/electron_resources.h"
#include "printing/print_job_constants.h"
#include "printing/printed_document.h"
#include "printing/printing_utils.h"
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
index 169bfefa0e442ddc0aa51ac4e98b48fc24d8a805..12cede4509e88c12daf3a53ae40204f945b9172f 100644
index 620c8907653c5757c7ab88d7f1c599a876800313..1ed8551cd851f04b59a0d517a8b0f15bad85a33d 100644
--- a/chrome/browser/printing/print_view_manager_base.cc
+++ b/chrome/browser/printing/print_view_manager_base.cc
@@ -27,10 +27,7 @@
@ -61,7 +66,7 @@ index 169bfefa0e442ddc0aa51ac4e98b48fc24d8a805..12cede4509e88c12daf3a53ae40204f9
}
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
@@ -111,12 +112,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
@@ -110,12 +111,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
queue_(g_browser_process->print_job_manager()->queue()),
weak_ptr_factory_(this) {
DCHECK(queue_);
@ -76,7 +81,7 @@ index 169bfefa0e442ddc0aa51ac4e98b48fc24d8a805..12cede4509e88c12daf3a53ae40204f9
}
PrintViewManagerBase::~PrintViewManagerBase() {
@@ -124,12 +127,14 @@ PrintViewManagerBase::~PrintViewManagerBase() {
@@ -123,12 +126,14 @@ PrintViewManagerBase::~PrintViewManagerBase() {
DisconnectFromCurrentPrintJob();
}
@ -94,7 +99,7 @@ index 169bfefa0e442ddc0aa51ac4e98b48fc24d8a805..12cede4509e88c12daf3a53ae40204f9
}
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
@@ -245,9 +250,9 @@ void PrintViewManagerBase::StartLocalPrintJob(
@@ -244,9 +249,9 @@ void PrintViewManagerBase::StartLocalPrintJob(
void PrintViewManagerBase::UpdatePrintingEnabled() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
// The Unretained() is safe because ForEachFrame() is synchronous.
@ -107,7 +112,7 @@ index 169bfefa0e442ddc0aa51ac4e98b48fc24d8a805..12cede4509e88c12daf3a53ae40204f9
}
void PrintViewManagerBase::NavigationStopped() {
@@ -339,7 +344,7 @@ void PrintViewManagerBase::OnPrintingFailed(int cookie) {
@@ -338,7 +343,7 @@ void PrintViewManagerBase::OnPrintingFailed(int cookie) {
PrintManager::OnPrintingFailed(cookie);
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
@ -116,7 +121,7 @@ index 169bfefa0e442ddc0aa51ac4e98b48fc24d8a805..12cede4509e88c12daf3a53ae40204f9
#endif
ReleasePrinterQuery();
@@ -587,6 +592,9 @@ void PrintViewManagerBase::ReleasePrintJob() {
@@ -586,6 +591,9 @@ void PrintViewManagerBase::ReleasePrintJob() {
content::RenderFrameHost* rfh = printing_rfh_;
printing_rfh_ = nullptr;
@ -127,7 +132,7 @@ index 169bfefa0e442ddc0aa51ac4e98b48fc24d8a805..12cede4509e88c12daf3a53ae40204f9
return;
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
index 542d061efc80b536867ff51cb5f211d15a6ea199..be27c20f2fe8d1e666e9a35b3835a62b8234a2c5 100644
index fa8d5a178aee2399c05d4f31b42edbc563883355..a6d1430c74e6d52abf3ceaf95678fef0135f566a 100644
--- a/chrome/browser/printing/print_view_manager_base.h
+++ b/chrome/browser/printing/print_view_manager_base.h
@@ -39,6 +39,8 @@ class PrintJob;
@ -150,7 +155,7 @@ index 542d061efc80b536867ff51cb5f211d15a6ea199..be27c20f2fe8d1e666e9a35b3835a62b
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
// Prints the document in |print_data| with settings specified in
@@ -196,6 +200,9 @@ class PrintViewManagerBase : public content::NotificationObserver,
@@ -198,6 +202,9 @@ class PrintViewManagerBase : public content::NotificationObserver,
// The current RFH that is printing with a system printing dialog.
content::RenderFrameHost* printing_rfh_;
@ -161,18 +166,18 @@ index 542d061efc80b536867ff51cb5f211d15a6ea199..be27c20f2fe8d1e666e9a35b3835a62b
bool printing_succeeded_;
diff --git a/chrome/browser/printing/printing_message_filter.cc b/chrome/browser/printing/printing_message_filter.cc
index 67079421bf44c832fdc98c8d2c75875e95e0a81c..1896a57f3228e724d9817b25bfd3bd3b94bc10c0 100644
index b21042ead358362267d81dc0c5a76ab35dccd9b8..2db39f368950b73a8df9dc7127b7d3d93d9a7dd0 100644
--- a/chrome/browser/printing/printing_message_filter.cc
+++ b/chrome/browser/printing/printing_message_filter.cc
@@ -20,6 +20,7 @@
#include "components/keyed_service/content/browser_context_keyed_service_shutdown_notifier_factory.h"
@@ -22,6 +22,7 @@
#include "components/printing/browser/print_manager_utils.h"
#include "components/printing/common/print_messages.h"
#include "content/public/browser/browser_task_traits.h"
+#include "content/public/browser/browser_context.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/child_process_host.h"
@@ -94,20 +95,23 @@ PrintViewManager* GetPrintViewManager(int render_process_id,
@@ -96,20 +97,23 @@ PrintViewManager* GetPrintViewManager(int render_process_id,
} // namespace
@ -194,12 +199,12 @@ index 67079421bf44c832fdc98c8d2c75875e95e0a81c..1896a57f3228e724d9817b25bfd3bd3b
+#if 0
is_printing_enabled_.Init(prefs::kPrintingEnabled, profile->GetPrefs());
is_printing_enabled_.MoveToThread(
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::IO}));
+#endif
}
PrintingMessageFilter::~PrintingMessageFilter() {
@@ -188,11 +192,13 @@ void PrintingMessageFilter::OnTempFileForPrintingWritten(int render_frame_id,
@@ -190,11 +194,13 @@ void PrintingMessageFilter::OnTempFileForPrintingWritten(int render_frame_id,
void PrintingMessageFilter::OnGetDefaultPrintSettings(IPC::Message* reply_msg) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
scoped_refptr<PrinterQuery> printer_query;
@ -213,7 +218,7 @@ index 67079421bf44c832fdc98c8d2c75875e95e0a81c..1896a57f3228e724d9817b25bfd3bd3b
printer_query = queue_->PopPrinterQuery(0);
if (!printer_query.get()) {
printer_query =
@@ -301,11 +307,13 @@ void PrintingMessageFilter::OnUpdatePrintSettings(
@@ -303,11 +309,13 @@ void PrintingMessageFilter::OnUpdatePrintSettings(
std::unique_ptr<base::DictionaryValue> new_settings(job_settings.DeepCopy());
scoped_refptr<PrinterQuery> printer_query;
@ -227,7 +232,7 @@ index 67079421bf44c832fdc98c8d2c75875e95e0a81c..1896a57f3228e724d9817b25bfd3bd3b
printer_query = queue_->PopPrinterQuery(document_cookie);
if (!printer_query.get()) {
printer_query = queue_->CreatePrinterQuery(
@@ -364,7 +372,7 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply(
@@ -366,7 +374,7 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply(
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
void PrintingMessageFilter::OnCheckForCancel(const PrintHostMsg_PreviewIds& ids,
bool* cancel) {
@ -262,10 +267,10 @@ index a881a853bfb0b46d0e074b7e86121429a5a761a3..0b41890bb9b5f10765c12158f6e8b7d3
// content::BrowserMessageFilter methods.
void OverrideThreadForMessage(const IPC::Message& message,
diff --git a/components/printing/common/print_messages.h b/components/printing/common/print_messages.h
index e3c11e1302ff0d1a9cca4cb575a6c8bccfde243d..97dcb7f84ccc8bf367c1a5ee4eb59d945d1c03ba 100644
index 7dd892feb181293d3c52fb6a3fd9600c899ee2d3..1ca51744e1046e5dfbedf5af8c6f75358e84acb7 100644
--- a/components/printing/common/print_messages.h
+++ b/components/printing/common/print_messages.h
@@ -363,7 +363,10 @@ IPC_MESSAGE_ROUTED0(PrintMsg_PrintNodeUnderContextMenu)
@@ -368,7 +368,10 @@ IPC_MESSAGE_ROUTED0(PrintMsg_PrintNodeUnderContextMenu)
#if BUILDFLAG(ENABLE_PRINTING)
// Tells the RenderFrame to switch the CSS to print media type, renders every
// requested pages and switch back the CSS to display media type.
@ -278,10 +283,10 @@ index e3c11e1302ff0d1a9cca4cb575a6c8bccfde243d..97dcb7f84ccc8bf367c1a5ee4eb59d94
// Like PrintMsg_PrintPages, but using the print preview document's frame/node.
IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog)
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
index 86a68c361f06bf26d980ee8730f7d759982dfffa..b67affdf12f45d190777b1ad16d33cef2d6da400 100644
index c888622c024fe3629705d136def7f8ef4cdc0cbf..d238b12d8409de01a7208c6bf404fc08f762f9be 100644
--- a/components/printing/renderer/print_render_frame_helper.cc
+++ b/components/printing/renderer/print_render_frame_helper.cc
@@ -1030,7 +1030,9 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
@@ -1045,7 +1045,9 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
web_frame->DispatchBeforePrintEvent();
if (!weak_this)
return;
@ -292,7 +297,7 @@ index 86a68c361f06bf26d980ee8730f7d759982dfffa..b67affdf12f45d190777b1ad16d33cef
if (weak_this)
web_frame->DispatchAfterPrintEvent();
}
@@ -1078,7 +1080,10 @@ void PrintRenderFrameHelper::OnDestruct() {
@@ -1093,7 +1095,10 @@ void PrintRenderFrameHelper::OnDestruct() {
delete this;
}
@ -304,7 +309,7 @@ index 86a68c361f06bf26d980ee8730f7d759982dfffa..b67affdf12f45d190777b1ad16d33cef
if (ipc_nesting_level_ > 1)
return;
@@ -1091,7 +1096,8 @@ void PrintRenderFrameHelper::OnPrintPages() {
@@ -1106,7 +1111,8 @@ void PrintRenderFrameHelper::OnPrintPages() {
// If we are printing a PDF extension frame, find the plugin node and print
// that instead.
auto plugin = delegate_->GetPdfElement(frame);
@ -314,7 +319,7 @@ index 86a68c361f06bf26d980ee8730f7d759982dfffa..b67affdf12f45d190777b1ad16d33cef
if (weak_this)
frame->DispatchAfterPrintEvent();
// WARNING: |this| may be gone at this point. Do not do any more work here and
@@ -1107,7 +1113,8 @@ void PrintRenderFrameHelper::OnPrintForSystemDialog() {
@@ -1122,7 +1128,8 @@ void PrintRenderFrameHelper::OnPrintForSystemDialog() {
return;
}
auto weak_this = weak_ptr_factory_.GetWeakPtr();
@ -324,7 +329,7 @@ index 86a68c361f06bf26d980ee8730f7d759982dfffa..b67affdf12f45d190777b1ad16d33cef
if (weak_this)
frame->DispatchAfterPrintEvent();
// WARNING: |this| may be gone at this point. Do not do any more work here and
@@ -1143,6 +1150,8 @@ void PrintRenderFrameHelper::OnPrintPreview(
@@ -1158,6 +1165,8 @@ void PrintRenderFrameHelper::OnPrintPreview(
if (ipc_nesting_level_ > 1)
return;
@ -333,7 +338,7 @@ index 86a68c361f06bf26d980ee8730f7d759982dfffa..b67affdf12f45d190777b1ad16d33cef
print_preview_context_.OnPrintPreview();
UMA_HISTOGRAM_ENUMERATION("PrintPreview.PreviewEvent",
@@ -1525,7 +1534,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
@@ -1543,7 +1552,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
auto self = weak_ptr_factory_.GetWeakPtr();
Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
@ -344,7 +349,7 @@ index 86a68c361f06bf26d980ee8730f7d759982dfffa..b67affdf12f45d190777b1ad16d33cef
// Check if |this| is still valid.
if (!self)
return;
@@ -1536,7 +1547,10 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
@@ -1554,7 +1565,10 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
const blink::WebNode& node,
@ -356,7 +361,7 @@ index 86a68c361f06bf26d980ee8730f7d759982dfffa..b67affdf12f45d190777b1ad16d33cef
// If still not finished with earlier print request simply ignore.
if (prep_frame_view_)
return;
@@ -1544,7 +1558,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
@@ -1562,7 +1576,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
FrameReference frame_ref(frame);
int expected_page_count = 0;
@ -365,7 +370,7 @@ index 86a68c361f06bf26d980ee8730f7d759982dfffa..b67affdf12f45d190777b1ad16d33cef
DidFinishPrinting(FAIL_PRINT_INIT);
return; // Failed to init print page settings.
}
@@ -1564,8 +1578,9 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
@@ -1582,8 +1596,9 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
PrintMsg_PrintPages_Params print_settings;
auto self = weak_ptr_factory_.GetWeakPtr();
@ -377,7 +382,7 @@ index 86a68c361f06bf26d980ee8730f7d759982dfffa..b67affdf12f45d190777b1ad16d33cef
// Check if |this| is still valid.
if (!self)
return;
@@ -1575,6 +1590,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
@@ -1593,6 +1608,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
? blink::kWebPrintScalingOptionSourceSize
: scaling_option;
SetPrintPagesParams(print_settings);
@ -385,7 +390,7 @@ index 86a68c361f06bf26d980ee8730f7d759982dfffa..b67affdf12f45d190777b1ad16d33cef
if (print_settings.params.dpi.IsEmpty() ||
!print_settings.params.document_cookie) {
DidFinishPrinting(OK); // Release resources and fail silently on failure.
@@ -1762,10 +1778,24 @@ std::vector<int> PrintRenderFrameHelper::GetPrintedPages(
@@ -1781,10 +1797,24 @@ std::vector<int> PrintRenderFrameHelper::GetPrintedPages(
return printed_pages;
}
@ -413,7 +418,7 @@ index 86a68c361f06bf26d980ee8730f7d759982dfffa..b67affdf12f45d190777b1ad16d33cef
// Check if the printer returned any settings, if the settings is empty, we
// can safely assume there are no printer drivers configured. So we safely
// terminate.
@@ -1785,12 +1815,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
@@ -1804,12 +1834,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
return result;
}
@ -433,7 +438,7 @@ index 86a68c361f06bf26d980ee8730f7d759982dfffa..b67affdf12f45d190777b1ad16d33cef
Send(new PrintHostMsg_ShowInvalidPrinterSettingsError(routing_id()));
return false;
diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h
index d09db4d500ca3cfa9716114e679bcf428c76c085..a0436373990dafa38c226160d967687b21c021e7 100644
index ff6423d51151ce84c291ed31a8e99c1c6effcd4f..e4d3b382877318775554f1ffaf8885de1c21aade 100644
--- a/components/printing/renderer/print_render_frame_helper.h
+++ b/components/printing/renderer/print_render_frame_helper.h
@@ -187,7 +187,9 @@ class PrintRenderFrameHelper

View file

@ -6,16 +6,12 @@ Subject: proxy_config_monitor.patch
Allow monitoring proxy config changes for a pref service.
diff --git a/chrome/browser/net/proxy_config_monitor.cc b/chrome/browser/net/proxy_config_monitor.cc
index 90a8b0895f10d59ade41cf156e3887c526123b29..26c1bc0e5859e832d03be7215d067312e2d691c0 100644
index 2d08d23e04008415f04b4d45d46c0aa6ed4dfee8..6207b646b0041628653532b014500e9990cc5e78 100644
--- a/chrome/browser/net/proxy_config_monitor.cc
+++ b/chrome/browser/net/proxy_config_monitor.cc
@@ -5,9 +5,13 @@
#include "chrome/browser/net/proxy_config_monitor.h"
@@ -8,7 +8,9 @@
#include "build/build_config.h"
+#if 0
#include "chrome/browser/browser_process.h"
+#endif
#include "chrome/browser/net/proxy_service_factory.h"
+#if 0
#include "chrome/browser/profiles/profile.h"
@ -23,47 +19,60 @@ index 90a8b0895f10d59ade41cf156e3887c526123b29..26c1bc0e5859e832d03be7215d067312
#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
#include "content/public/browser/browser_thread.h"
#include "mojo/public/cpp/bindings/associated_interface_ptr.h"
@@ -15,7 +19,7 @@
#if defined(OS_CHROMEOS)
@@ -17,12 +19,13 @@
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#endif // defined(OS_CHROMEOS)
-
-#if BUILDFLAG(ENABLE_EXTENSIONS)
+#if 0
#include "chrome/browser/extensions/api/proxy/proxy_api.h"
#endif
using content::BrowserThread;
+#if 0
ProxyConfigMonitor::ProxyConfigMonitor(Profile* profile) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DCHECK(profile);
@@ -41,14 +45,13 @@ ProxyConfigMonitor::ProxyConfigMonitor(Profile* profile) {
@@ -52,6 +55,7 @@ ProxyConfigMonitor::ProxyConfigMonitor(Profile* profile) {
proxy_config_service_->AddObserver(this);
}
+#endif
-ProxyConfigMonitor::ProxyConfigMonitor() {
+ProxyConfigMonitor::ProxyConfigMonitor(PrefService* local_prefs) {
ProxyConfigMonitor::ProxyConfigMonitor(PrefService* local_state) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
@@ -132,9 +136,11 @@ void ProxyConfigMonitor::OnLazyProxyConfigPoll() {
void ProxyConfigMonitor::OnPACScriptError(int32_t line_number,
const std::string& details) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
-
pref_proxy_config_tracker_.reset(
ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
- g_browser_process->local_state()));
-
+ local_prefs));
proxy_config_service_ = ProxyServiceFactory::CreateProxyConfigService(
pref_proxy_config_tracker_.get());
+#if 0
extensions::ProxyEventRouter::GetInstance()->OnPACScriptError(
g_browser_process->extension_event_router_forwarder(), profile_,
line_number, base::UTF8ToUTF16(details));
+#endif
}
void ProxyConfigMonitor::OnRequestMaybeFailedDueToProxySettings(
@@ -148,9 +154,10 @@ void ProxyConfigMonitor::OnRequestMaybeFailedDueToProxySettings(
// controlled.
return;
}
-
+#if 0
extensions::ProxyEventRouter::GetInstance()->OnProxyError(
g_browser_process->extension_event_router_forwarder(), profile_,
net_error);
+#endif
}
#endif
diff --git a/chrome/browser/net/proxy_config_monitor.h b/chrome/browser/net/proxy_config_monitor.h
index b783ab18d2d77cb2d443eed36a508f1eac77c04d..4475b58756dbf686cf78f6e317e55bc1df783e8d 100644
index 172e71b085a58ff3060a3c90e7e3b9f3ef6df199..30764a251b9a09defaca86c2ac80877914dd1fe9 100644
--- a/chrome/browser/net/proxy_config_monitor.h
+++ b/chrome/browser/net/proxy_config_monitor.h
@@ -20,22 +20,24 @@ class ProxyConfigWithAnnotation;
@@ -37,11 +37,12 @@ class ProxyConfigMonitor : public net::ProxyConfigService::Observer,
class Profile;
class PrefProxyConfigTracker;
+class PrefService;
// Tracks the ProxyConfig to use, and passes any updates to a NetworkContext's
// ProxyConfigClient.
class ProxyConfigMonitor : public net::ProxyConfigService::Observer,
public network::mojom::ProxyConfigPollerClient {
{
public:
+#if 0
// Creates a ProxyConfigMonitor that gets proxy settings from |profile| and
@ -73,19 +82,13 @@ index b783ab18d2d77cb2d443eed36a508f1eac77c04d..4475b58756dbf686cf78f6e317e55bc1
-
+#endif
// Creates a ProxyConfigMonitor that gets proxy settings from the
// BrowserProcess's |local_state_|, for use with NetworkContexts not
// assocaited with a profile. Must be destroyed before the BrowserProcess's
// |local_state_|.
- ProxyConfigMonitor();
+ explicit ProxyConfigMonitor(PrefService* local_prefs);
// |local_state|, for use with NetworkContexts not
// associated with a profile. Must be destroyed before |local_state|.
@@ -88,7 +89,6 @@ class ProxyConfigMonitor : public net::ProxyConfigService::Observer,
~ProxyConfigMonitor() override;
#if BUILDFLAG(ENABLE_EXTENSIONS)
mojo::BindingSet<network::mojom::ProxyErrorClient> error_binding_set_;
- Profile* profile_ = nullptr;
#endif
@@ -63,7 +65,6 @@ class ProxyConfigMonitor : public net::ProxyConfigService::Observer,
std::unique_ptr<net::ProxyConfigService> proxy_config_service_;
// Monitors global and Profile prefs related to proxy configuration.
std::unique_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_;
-
mojo::BindingSet<network::mojom::ProxyConfigPollerClient> binding_set_;
mojo::InterfacePtrSet<network::mojom::ProxyConfigClient>
DISALLOW_COPY_AND_ASSIGN(ProxyConfigMonitor);

View file

@ -5,10 +5,10 @@ Subject: render_widget_host_view_base.patch
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
index fae4c74c977bb32836bf315c3cf77cfe3499af7a..06030ddb6db221c52e665ddb86e71189e95f72a6 100644
index e155153ec1eec9d28242e9ab95c9d75a0d3f40d7..fab1bcd2d8176cdd7163e329552a0a848c601290 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -582,6 +582,15 @@ viz::FrameSinkId RenderWidgetHostViewBase::FrameSinkIdAtPoint(
@@ -656,6 +656,15 @@ viz::FrameSinkId RenderWidgetHostViewBase::FrameSinkIdAtPoint(
return frame_sink_id.is_valid() ? frame_sink_id : GetFrameSinkId();
}
@ -25,7 +25,7 @@ index fae4c74c977bb32836bf315c3cf77cfe3499af7a..06030ddb6db221c52e665ddb86e71189
const blink::WebMouseEvent& event,
const ui::LatencyInfo& latency) {
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
index 08454f68a01d204902d4023ac321793431ef4e0e..3dec5957125b68990bb3d539cb2a05a26e8d26d6 100644
index c48b0aa86d8acea34dfece9212da4e7b11ffdb64..115b5647dfc13eb14e4d560c1fb71b926b5af829 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -22,8 +22,10 @@
@ -50,9 +50,9 @@ index 08454f68a01d204902d4023ac321793431ef4e0e..3dec5957125b68990bb3d539cb2a05a2
class WebContentsAccessibility;
+class WebContentsView;
class WebCursor;
class DelegatedFrameHost;
struct TextInputState;
@@ -144,6 +148,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
@@ -145,6 +149,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
TouchSelectionControllerClientManager*
GetTouchSelectionControllerClientManager() override;
@ -62,7 +62,7 @@ index 08454f68a01d204902d4023ac321793431ef4e0e..3dec5957125b68990bb3d539cb2a05a2
// This only needs to be overridden by RenderWidgetHostViewBase subclasses
// that handle content embedded within other RenderWidgetHostViews.
gfx::PointF TransformPointToRootCoordSpaceF(
@@ -358,6 +365,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
@@ -369,6 +376,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
virtual void ProcessGestureEvent(const blink::WebGestureEvent& event,
const ui::LatencyInfo& latency);

View file

@ -5,10 +5,10 @@ Subject: render_widget_host_view_mac.patch
diff --git a/content/browser/renderer_host/render_widget_host_view_cocoa.mm b/content/browser/renderer_host/render_widget_host_view_cocoa.mm
index 92f940ef0239b2bb3d2df3ddd2f9c33327f95031..04924fbac7ec3f5d23f85b70fa7ff61c23c9cbfc 100644
index ee6cde8137b105e0951098b1aba0196398e935d3..5b0a6dd36810fae8ca2e055bafe736cb964b9cef 100644
--- a/content/browser/renderer_host/render_widget_host_view_cocoa.mm
+++ b/content/browser/renderer_host/render_widget_host_view_cocoa.mm
@@ -181,6 +181,11 @@ void ExtractUnderlines(NSAttributedString* string,
@@ -106,6 +106,11 @@ void ExtractUnderlines(NSAttributedString* string,
} // namespace
@ -20,7 +20,7 @@ index 92f940ef0239b2bb3d2df3ddd2f9c33327f95031..04924fbac7ec3f5d23f85b70fa7ff61c
// These are not documented, so use only after checking -respondsToSelector:.
@interface NSApplication (UndocumentedSpeechMethods)
- (void)speakString:(NSString*)string;
@@ -364,6 +369,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
@@ -284,6 +289,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
}
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
@ -30,7 +30,7 @@ index 92f940ef0239b2bb3d2df3ddd2f9c33327f95031..04924fbac7ec3f5d23f85b70fa7ff61c
return [self acceptsMouseEventsWhenInactive];
}
@@ -726,6 +734,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
@@ -647,6 +655,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
eventType == NSKeyDown &&
!(modifierFlags & NSCommandKeyMask);
@ -40,8 +40,8 @@ index 92f940ef0239b2bb3d2df3ddd2f9c33327f95031..04924fbac7ec3f5d23f85b70fa7ff61c
+
// We only handle key down events and just simply forward other events.
if (eventType != NSKeyDown) {
localClient_->ForwardKeyboardEvent(event, latency_info);
@@ -1498,9 +1510,11 @@ - (id)accessibilityFocusedUIElement {
clientHelper_->ForwardKeyboardEvent(event, latency_info);
@@ -1419,9 +1431,11 @@ - (id)accessibilityFocusedUIElement {
// 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 92f940ef0239b2bb3d2df3ddd2f9c33327f95031..04924fbac7ec3f5d23f85b70fa7ff61c
- (NSArray*)validAttributesForMarkedText {
// This code is just copied from WebKit except renaming variables.
@@ -1509,7 +1523,10 @@ - (NSArray*)validAttributesForMarkedText {
@@ -1430,7 +1444,10 @@ - (NSArray*)validAttributesForMarkedText {
initWithObjects:NSUnderlineStyleAttributeName,
NSUnderlineColorAttributeName,
NSMarkedClauseSegmentAttributeName,
@ -66,10 +66,10 @@ index 92f940ef0239b2bb3d2df3ddd2f9c33327f95031..04924fbac7ec3f5d23f85b70fa7ff61c
return validAttributesForMarkedText_.get();
}
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 7e3a9aa6adc3ce0e3989279d2cc54f3dcb7eb40c..87705f669e022722f4e718532b44fad7780b1862 100644
index 94d6e79377d354bc8c3041d4e9ffa21a29caea0c..38574877ab366c45a86e635adb4f39bcb7e05acb 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -54,6 +54,7 @@
@@ -55,6 +55,7 @@
#include "ui/events/keycodes/dom/dom_keyboard_layout_map.h"
#include "ui/gfx/geometry/dip_util.h"
#include "ui/gfx/mac/coordinate_conversion.h"

View file

@ -38,7 +38,6 @@ patch, GN refuses to generate the ninja files:
action(_repack_target_name) {
^----------------------------
Some alternatives to this patch:
1. Refactor upstream in such a way that the "chrome" pak names were
@ -49,14 +48,14 @@ Some alternatives to this patch:
`electron_{100,200}_percent.pak`.
3. Initialize the resource bundle with DO_NOT_LOAD_COMMON_RESOURCES and load
the paks ourselves.
None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index 4865a69fe984b428c4b6591d11d778e6c2669d2d..e8795d76f895580a398f748724b55eb5848a3528 100644
index abbab2664254c9be1ec5074463722c1365590cd0..03c3df58fb407a490ce3438cdc2f4168f3013a8f 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -1638,6 +1638,11 @@ if (is_chrome_branded && !is_android) {
@@ -1646,6 +1646,11 @@ if (is_chrome_branded && !is_android) {
}
}
@ -68,7 +67,7 @@ index 4865a69fe984b428c4b6591d11d778e6c2669d2d..e8795d76f895580a398f748724b55eb5
chrome_paks("packed_resources") {
if (is_mac) {
output_dir = "$root_gen_dir/repack"
@@ -1659,6 +1664,7 @@ chrome_paks("packed_resources") {
@@ -1667,6 +1672,7 @@ chrome_paks("packed_resources") {
]
}
}

View file

@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch
Patch to make scrollBounce option work.
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index b36daaee097a56a5180cc79a6dcf730bc22afdce..2ec1bd2b81d64874fba60b4994c2dd215f4ddc42 100644
index f2d704c09e6eb90409d6e8119fe1b7d65f2fbabd..db731036430048f6299c2d735e44a4bccc151579 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1610,7 +1610,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {
@@ -1528,7 +1528,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {
}
bool RenderThreadImpl::IsElasticOverscrollEnabled() {

View file

@ -6,7 +6,7 @@ Subject: ssl_security_state_tab_helper.patch
Allows populating security tab info for devtools in Electron.
diff --git a/chrome/browser/ssl/security_state_tab_helper.cc b/chrome/browser/ssl/security_state_tab_helper.cc
index c88e2729738d28ba626e14dd95924522bca2c336..a017ea4b37a39f6d65636f3c1aecc43838b80d4f 100644
index aebdb130ba687e0d0c0aa45a08b1820b67d3c25c..fdbeb9cd398eac5659b1dac4af9094c5a5d531f4 100644
--- a/chrome/browser/ssl/security_state_tab_helper.cc
+++ b/chrome/browser/ssl/security_state_tab_helper.cc
@@ -13,17 +13,23 @@
@ -119,7 +119,7 @@ index c88e2729738d28ba626e14dd95924522bca2c336..a017ea4b37a39f6d65636f3c1aecc438
return secure_origin_whitelist::ParseWhitelist(origins_str);
}
diff --git a/chrome/common/secure_origin_whitelist.cc b/chrome/common/secure_origin_whitelist.cc
index 3319df136d4d32aad066fe98bfadacfb3c05322a..fbc6eea480d23e7158bbbfb8dc77926824b94c3d 100644
index b70d6ced887d2a2ecb576b20d79e7fc4272e2054..5a75fe115c3c77f4a9edf7913b47341a757d1b42 100644
--- a/chrome/common/secure_origin_whitelist.cc
+++ b/chrome/common/secure_origin_whitelist.cc
@@ -13,7 +13,9 @@

View file

@ -7,7 +7,7 @@ Make chrome's install-sysroot scripts point to our custom sysroot builds,
which include extra deps that Electron needs (e.g. libnotify)
diff --git a/build/linux/sysroot_scripts/install-sysroot.py b/build/linux/sysroot_scripts/install-sysroot.py
index 58f09950d844f4fa4f8d46718852c4f2c490c391..55dd50187714b596e6ded4f2b302fb497af53ad0 100755
index 115dce4e23ae2a8dd771b73ddbcd1a5b12bcbf9b..12f944a95ad49842d2a53cdbe8eb157e7605b621 100755
--- a/build/linux/sysroot_scripts/install-sysroot.py
+++ b/build/linux/sysroot_scripts/install-sysroot.py
@@ -30,9 +30,11 @@ import sys

View file

@ -10,10 +10,10 @@ Subject: tts.patch
destruction from content layer.
diff --git a/chrome/browser/speech/tts_controller_impl.cc b/chrome/browser/speech/tts_controller_impl.cc
index 2ca56c3a247e674ee15b0a0ee30e6c2941aa93d3..f58e33b3c0198e4333f98cd1928c8f6d9be45738 100644
index 46ea4689a38d1986055058c8bdeef088e732cf79..6156ddb10fba7fe8a1550f45bb364005bd225811 100644
--- a/chrome/browser/speech/tts_controller_impl.cc
+++ b/chrome/browser/speech/tts_controller_impl.cc
@@ -624,12 +624,14 @@ const PrefService* TtsControllerImpl::GetPrefService(
@@ -607,12 +607,14 @@ const PrefService* TtsControllerImpl::GetPrefService(
const Utterance* utterance) {
const PrefService* prefs = nullptr;
// The utterance->browser_context() is null in tests.
@ -29,12 +29,12 @@ index 2ca56c3a247e674ee15b0a0ee30e6c2941aa93d3..f58e33b3c0198e4333f98cd1928c8f6d
}
diff --git a/chrome/browser/speech/tts_message_filter.cc b/chrome/browser/speech/tts_message_filter.cc
index 013c7a9c60f95475d63701c4f6848cb00dac19d9..73a244a726e3e1a1b5b52ca0e8e3b209aaf432ff 100644
index 84d2dc145ece4d26c39a338b9a6fcf83a9a3a2da..ab911e1b7d29d675868d1476302d9b6dde7de288 100644
--- a/chrome/browser/speech/tts_message_filter.cc
+++ b/chrome/browser/speech/tts_message_filter.cc
@@ -9,14 +9,40 @@
#include "base/bind.h"
@@ -10,8 +10,11 @@
#include "base/logging.h"
#include "base/task/post_task.h"
#include "chrome/browser/chrome_notification_types.h"
+#if 0
#include "chrome/browser/profiles/profile.h"
@ -42,8 +42,9 @@ index 013c7a9c60f95475d63701c4f6848cb00dac19d9..73a244a726e3e1a1b5b52ca0e8e3b209
#include "chrome/common/tts_messages.h"
+#include "components/keyed_service/content/browser_context_keyed_service_shutdown_notifier_factory.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_process_host.h"
@@ -19,6 +22,29 @@
using content::BrowserThread;
@ -73,7 +74,7 @@ index 013c7a9c60f95475d63701c4f6848cb00dac19d9..73a244a726e3e1a1b5b52ca0e8e3b209
TtsMessageFilter::TtsMessageFilter(content::BrowserContext* browser_context)
: BrowserMessageFilter(TtsMsgStart),
browser_context_(browser_context),
@@ -24,28 +50,27 @@ TtsMessageFilter::TtsMessageFilter(content::BrowserContext* browser_context)
@@ -26,28 +52,27 @@ TtsMessageFilter::TtsMessageFilter(content::BrowserContext* browser_context)
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
TtsController::GetInstance()->AddVoicesChangedDelegate(this);
@ -116,7 +117,7 @@ index 013c7a9c60f95475d63701c4f6848cb00dac19d9..73a244a726e3e1a1b5b52ca0e8e3b209
}
}
@@ -207,10 +232,8 @@ void TtsMessageFilter::Cleanup() {
@@ -209,10 +234,8 @@ void TtsMessageFilter::Cleanup() {
TtsController::GetInstance()->RemoveUtteranceEventDelegate(this);
}

View file

@ -5,10 +5,10 @@ Subject: web_contents.patch
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 499c8c0a2e899d9c2a35be461cc8d247f42a6f17..a9e95f9b18bbd5327536499c58362167fa01a583 100644
index c9d8ca8da4934497ee71a2c4261a04e0a32d86c5..b50572db02fdd3def70d8c892b043f5db47cafe9 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1940,6 +1940,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -1993,6 +1993,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
std::string unique_name;
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
@ -21,7 +21,7 @@ index 499c8c0a2e899d9c2a35be461cc8d247f42a6f17..a9e95f9b18bbd5327536499c58362167
WebContentsViewDelegate* delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -1955,6 +1961,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -2008,6 +2014,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
&render_view_host_delegate_view_);
}
}
@ -30,10 +30,10 @@ index 499c8c0a2e899d9c2a35be461cc8d247f42a6f17..a9e95f9b18bbd5327536499c58362167
CHECK(view_.get());
diff --git a/content/browser/web_contents/web_contents_view_guest.cc b/content/browser/web_contents/web_contents_view_guest.cc
index 12f6817499eff069f4bc52a775fe1275a332881c..f20fe106c4cb443be8cf4311e531418eb4c80b5c 100644
index 5de4d7cf8a7a812ad3f6383cd60acbd39135924d..dca9ec76b44be34124a12f453d3c6ecbb1509b9f 100644
--- a/content/browser/web_contents/web_contents_view_guest.cc
+++ b/content/browser/web_contents/web_contents_view_guest.cc
@@ -67,21 +67,27 @@ gfx::NativeWindow WebContentsViewGuest::GetTopLevelNativeWindow() const {
@@ -69,19 +69,26 @@ gfx::NativeWindow WebContentsViewGuest::GetTopLevelNativeWindow() const {
void WebContentsViewGuest::OnGuestAttached(WebContentsView* parent_view) {
#if defined(USE_AURA)
@ -44,27 +44,25 @@ index 12f6817499eff069f4bc52a775fe1275a332881c..f20fe106c4cb443be8cf4311e531418e
// view hierarchy. We add this view as embedder's child here.
// This would go in WebContentsViewGuest::CreateView, but that is too early to
// access embedder_web_contents(). Therefore, we do it here.
if (!features::IsUsingWindowService())
- parent_view->GetNativeView()->AddChild(platform_view_->GetNativeView());
+ if (parent_view->GetNativeView() != platform_view_->GetNativeView())
+ parent_view->GetNativeView()->AddChild(platform_view_->GetNativeView());
- if (!features::IsMultiProcessMash())
+ if (!features::IsMultiProcessMash() &&
+ parent_view->GetNativeView() != platform_view_->GetNativeView()) {
parent_view->GetNativeView()->AddChild(platform_view_->GetNativeView());
+ }
#endif // defined(USE_AURA)
}
void WebContentsViewGuest::OnGuestDetached(WebContentsView* old_parent_view) {
#if defined(USE_AURA)
- if (!features::IsMultiProcessMash()) {
+ if (!platform_view_->GetNativeView())
+ return;
if (!features::IsUsingWindowService()) {
- old_parent_view->GetNativeView()->RemoveChild(
- platform_view_->GetNativeView());
+ if (old_parent_view->GetNativeView() != platform_view_->GetNativeView())
+ old_parent_view->GetNativeView()->RemoveChild(
+ platform_view_->GetNativeView());
+ if (!features::IsMultiProcessMash() &&
+ old_parent_view->GetNativeView() != platform_view_->GetNativeView()) {
old_parent_view->GetNativeView()->RemoveChild(
platform_view_->GetNativeView());
}
#endif // defined(USE_AURA)
}
@@ -144,11 +150,22 @@ RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForWidget(
@@ -136,11 +143,22 @@ RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForWidget(
render_widget_host->GetView());
}
@ -90,12 +88,12 @@ index 12f6817499eff069f4bc52a775fe1275a332881c..f20fe106c4cb443be8cf4311e531418e
+ return guest_view;
}
RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForPopupWidget(
RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForChildWidget(
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index 786eecfcb70cd5145a29f9dc89765930739e0d63..0916329b2bf483381065476108978683ec2e6bf9 100644
index f26f7e50166310d52fd1c1e45b3d956c28e63074..52735286515c5332c64bca8bf332ae8d65bc7e5c 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -77,9 +77,12 @@ class BrowserPluginGuestDelegate;
@@ -74,9 +74,12 @@ class BrowserPluginGuestDelegate;
class InterstitialPage;
class RenderFrameHost;
class RenderViewHost;
@ -108,7 +106,7 @@ index 786eecfcb70cd5145a29f9dc89765930739e0d63..0916329b2bf483381065476108978683
struct CustomContextMenuContext;
struct DropData;
struct MHTMLGenerationParams;
@@ -216,6 +219,10 @@ class WebContents : public PageNavigator,
@@ -213,6 +216,10 @@ class WebContents : public PageNavigator,
kInitializeAndWarmupRendererProcess,
} desired_renderer_state;

View file

@ -5,10 +5,10 @@ Subject: webgl_context_attributes.patch
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index 4a594bd98bcdd9d13bee61011883075de2d23495..a91f06ffb8782630714a88d1d3d00eca0c2c0f7f 100644
index 907fd2f4f8567b828f1a45caa32cbd4dafdcac4e..8eb8b5a763c58da80ab826f629aa33e0d782ad14 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -1040,8 +1040,10 @@ RendererBlinkPlatformImpl::CreateOffscreenGraphicsContext3DProvider(
@@ -1029,8 +1029,10 @@ RendererBlinkPlatformImpl::CreateOffscreenGraphicsContext3DProvider(
attributes.sample_buffers = 0;
attributes.bind_generates_resource = false;
attributes.enable_raster_interface = web_attributes.enable_raster_interface;
@ -22,10 +22,10 @@ index 4a594bd98bcdd9d13bee61011883075de2d23495..a91f06ffb8782630714a88d1d3d00eca
attributes.fail_if_major_perf_caveat =
web_attributes.fail_if_major_performance_caveat;
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index 3e8fae9161252cf0cfb95f81596996822026f514..362a2978452e758c8f74739bb5c635e8be9b834f 100644
index 2f57bdd1ef3ee4f81d248fffc6e1e512ed83bb27..f016cfb6d31d0feeb32800fe6bc1c0421bad66e0 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -531,6 +531,7 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -550,6 +550,7 @@ class BLINK_PLATFORM_EXPORT Platform {
kWebGPUContextType, // WebGPU context
};
struct ContextAttributes {
@ -34,19 +34,19 @@ index 3e8fae9161252cf0cfb95f81596996822026f514..362a2978452e758c8f74739bb5c635e8
ContextType context_type = kGLES2ContextType;
// Offscreen contexts usually share a surface for the default frame buffer
diff --git a/third_party/blink/renderer/core/html/canvas/canvas_context_creation_attributes_core.h b/third_party/blink/renderer/core/html/canvas/canvas_context_creation_attributes_core.h
index 03da0840b0e398fa0826fb36b55ff41bd95af77d..9551675de44d1475714726d9b58f4d1b7863d98f 100644
index a6f46ede75f84294d34ad042a1fb103d106a0543..c62399bde32c6296d7bdede710e63f30cef50833 100644
--- a/third_party/blink/renderer/core/html/canvas/canvas_context_creation_attributes_core.h
+++ b/third_party/blink/renderer/core/html/canvas/canvas_context_creation_attributes_core.h
@@ -30,6 +30,7 @@ class CORE_EXPORT CanvasContextCreationAttributesCore {
String pixel_format = "8-8-8-8";
String pixel_format = "uint8";
bool premultiplied_alpha = true;
bool preserve_drawing_buffer = false;
+ String power_preference = "default";
bool stencil = false;
// This attribute is of type XRDevice, defined in modules/xr/XRDevice.h
// This attribute is of type XRDevice, defined in modules/xr/xr_device.h
diff --git a/third_party/blink/renderer/modules/canvas/htmlcanvas/canvas_context_creation_attributes_module.idl b/third_party/blink/renderer/modules/canvas/htmlcanvas/canvas_context_creation_attributes_module.idl
index 7b655dd12a77d701453988d949295ead0b7dbf4d..8969eb7d98f3a7bf2e431a398a2156499d1be326 100644
index 98875e974f51ea77a0adf6f6f304ff97f1f62102..36739547ce2ffda7e6f243f50dab5a63a1fc6a4f 100644
--- a/third_party/blink/renderer/modules/canvas/htmlcanvas/canvas_context_creation_attributes_module.idl
+++ b/third_party/blink/renderer/modules/canvas/htmlcanvas/canvas_context_creation_attributes_module.idl
@@ -28,6 +28,12 @@ enum CanvasPixelFormat {
@ -71,7 +71,7 @@ index 7b655dd12a77d701453988d949295ead0b7dbf4d..8969eb7d98f3a7bf2e431a398a215649
[OriginTrialEnabled=WebXR] XRDevice compatibleXRDevice = null;
};
diff --git a/third_party/blink/renderer/modules/webgl/webgl_context_attribute_helpers.cc b/third_party/blink/renderer/modules/webgl/webgl_context_attribute_helpers.cc
index 3846b2a179d963a99c3785c4b9b41f346403eeb2..bf7c63a8139152c4e6a01f52965da09f6ed0b48e 100644
index 26b4610c87c2a2c38e45e0c3d26b5b52ef1097e4..fa6923ed17aee8d85f4d1d7e27dd17fae619da85 100644
--- a/third_party/blink/renderer/modules/webgl/webgl_context_attribute_helpers.cc
+++ b/third_party/blink/renderer/modules/webgl/webgl_context_attribute_helpers.cc
@@ -18,6 +18,7 @@ WebGLContextAttributes ToWebGLContextAttributes(
@ -82,7 +82,7 @@ index 3846b2a179d963a99c3785c4b9b41f346403eeb2..bf7c63a8139152c4e6a01f52965da09f
result.setFailIfMajorPerformanceCaveat(
attrs.fail_if_major_performance_caveat);
result.setCompatibleXRDevice(
@@ -30,6 +31,7 @@ Platform::ContextAttributes ToPlatformContextAttributes(
@@ -31,6 +32,7 @@ Platform::ContextAttributes ToPlatformContextAttributes(
Platform::ContextType context_type,
bool support_own_offscreen_surface) {
Platform::ContextAttributes result;
@ -91,7 +91,7 @@ index 3846b2a179d963a99c3785c4b9b41f346403eeb2..bf7c63a8139152c4e6a01f52965da09f
attrs.fail_if_major_performance_caveat;
result.context_type = context_type;
diff --git a/third_party/blink/renderer/modules/webgl/webgl_context_attributes.idl b/third_party/blink/renderer/modules/webgl/webgl_context_attributes.idl
index 38ca0f6b6a0c4bcb042887cd168ba8040435875d..90cfe8497daf2db6c3022826b5f1ab4e854e9955 100644
index 39092f2acab0996dc4f29c3687f92fcd4b8b090f..256beda2da43bf02391943c6ca337fed141bc2a3 100644
--- a/third_party/blink/renderer/modules/webgl/webgl_context_attributes.idl
+++ b/third_party/blink/renderer/modules/webgl/webgl_context_attributes.idl
@@ -26,6 +26,12 @@
@ -114,4 +114,4 @@ index 38ca0f6b6a0c4bcb042887cd168ba8040435875d..90cfe8497daf2db6c3022826b5f1ab4e
+ WebGLPowerPreference powerPreference = "default";
boolean failIfMajorPerformanceCaveat = false;
[OriginTrialEnabled=WebXR] XRDevice compatibleXRDevice = null;
};
// TODO(crbug.com/788439): remove OriginTrialEnabled.

View file

@ -5,10 +5,10 @@ Subject: webview_cross_drag.patch
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index e471459007af1b03f477f6df8c963cc0916b1a66..3df843acdba8470352f90829e502ad10e1616dfe 100644
index ce5602b1cc38b29aee3ff4c997a00a144ff06789..80c325a98ca749f36752978bf825eca047dc361b 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -622,6 +622,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
@@ -620,6 +620,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
bool WebContentsViewAura::IsValidDragTarget(
RenderWidgetHostImpl* target_rwh) const {

View file

@ -5,10 +5,10 @@ Subject: worker_context_will_destroy.patch
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
index f1c9cc5997cb5e285bd552d58434de7a4b1d2467..86f2215b9d78374569572c6d087a2102506d3dcb 100644
index 3166cbe259daafc8644b0b1a8941160205638046..b8a81f37db6a979cfbda8743fe4db435ad92dc40 100644
--- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h
@@ -383,6 +383,11 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -392,6 +392,11 @@ class CONTENT_EXPORT ContentRendererClient {
virtual void DidInitializeWorkerContextOnWorkerThread(
v8::Local<v8::Context> context) {}
@ -21,10 +21,10 @@ index f1c9cc5997cb5e285bd552d58434de7a4b1d2467..86f2215b9d78374569572c6d087a2102
// An empty URL is returned if the URL is not overriden.
virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index a91f06ffb8782630714a88d1d3d00eca0c2c0f7f..291081cf0d428cbef12f99e9296e4b52ce89eca4 100644
index 8eb8b5a763c58da80ab826f629aa33e0d782ad14..09d638e7e74835b032bfbfb15f9ebbf6f7b7cec7 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -1187,6 +1187,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
@@ -1176,6 +1176,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
}
@ -38,10 +38,10 @@ index a91f06ffb8782630714a88d1d3d00eca0c2c0f7f..291081cf0d428cbef12f99e9296e4b52
const v8::Local<v8::Context>& worker) {
GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index b3bde113adbd7a7586981c42c28da5a939ed688f..892f1e653a656ebdab3fda066af0814c991842c3 100644
index 4ec814fd92c5accf70627d37f4966e3e5270b660..aa405311a4588ad4903f637fc07713bd18b34e68 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -208,6 +208,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -207,6 +207,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
void DidStartWorkerThread() override;
void WillStopWorkerThread() override;
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
@ -50,10 +50,10 @@ index b3bde113adbd7a7586981c42c28da5a939ed688f..892f1e653a656ebdab3fda066af0814c
// Disables the WebSandboxSupport implementation for testing.
// Tests that do not set up a full sandbox environment should call
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index 362a2978452e758c8f74739bb5c635e8be9b834f..9730bc3d13721a12ee490d38213c753b130b6d07 100644
index f016cfb6d31d0feeb32800fe6bc1c0421bad66e0..19761866164e9a20221ce552af7683c77a21f551 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -673,6 +673,7 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -692,6 +692,7 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}
@ -62,10 +62,10 @@ index 362a2978452e758c8f74739bb5c635e8be9b834f..9730bc3d13721a12ee490d38213c753b
return false;
}
diff --git a/third_party/blink/renderer/core/workers/worker_thread.cc b/third_party/blink/renderer/core/workers/worker_thread.cc
index 0e1ce1e2ffc9283fa2d23bb7d74b96fbfbf7bf2e..e6789645fb05645d0328685f1e544f0f981d747c 100644
index a231d079da2dc70a1054ea6cd4335bad8b2a0253..9343e83988a5bfd7f83ead484be61ac8c17b1196 100644
--- a/third_party/blink/renderer/core/workers/worker_thread.cc
+++ b/third_party/blink/renderer/core/workers/worker_thread.cc
@@ -529,6 +529,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
@@ -528,6 +528,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
SetExitCode(ExitCode::kGracefullyTerminated);
}
@ -75,6 +75,6 @@ index 0e1ce1e2ffc9283fa2d23bb7d74b96fbfbf7bf2e..e6789645fb05645d0328685f1e544f0f
+ GlobalScope()->ScriptController()->GetContext());
+ }
+
GetWorkerReportingProxy().WillDestroyWorkerGlobalScope();
if (WorkerThreadDebugger* debugger = WorkerThreadDebugger::From(GetIsolate()))
debugger->WorkerThreadDestroyed(this);
probe::AllAsyncTasksCanceled(GlobalScope());

View file

@ -1,5 +1,4 @@
deps_backport_detailed_line_info_for_cpu_profiler.patch
deps_cherry-pick_2363cdf_from_upstream_v8.patch
add_realloc.patch
build_gn.patch
array_buffer.patch
@ -10,5 +9,8 @@ disable-warning-win.patch
expose_mksnapshot.patch
build-torque-with-x64-toolchain-on-arm.patch
do_not_run_arm_arm64_mksnapshot_binaries.patch
deps_revert_9136dd8088a9_from_upstream_v8.patch
deps_provide_more_v8_backwards_compatibility.patch
0001-deps-cherry-pick-0483e9a-from-upstream-V8.patch
0002-deps-cherry-pick-b87d408-from-upstream-V8.patch
0003-deps-cherry-pick-073073b-from-upstream-V8.patch
0004-deps-cherry-pick-88f8fe1-from-upstream-V8.patch

View file

@ -0,0 +1,112 @@
From 0e090768de1844c493013d5e99bd903928aff2ab Mon Sep 17 00:00:00 2001
From: Joyee Cheung <joyeec9h3@gmail.com>
Date: Tue, 6 Nov 2018 18:05:48 +0800
Subject: [PATCH 1/4] deps: cherry-pick 0483e9a from upstream V8
Original commit message:
[api] Allow embedder to construct an Array from Local<Value>*
Currently to obtain a v8::Array out of a C array or a std::vector,
one needs to loop through the elements and call array->Set() multiple
times, and these calls go into v8::Object::Set() which can be slow.
This patch adds a new Array::New overload that converts a
Local<Value>* with known size into a Local<Array>.
Change-Id: I0a768f0e18eec51e78d58be455482ec6425ca188
Reviewed-on: https://chromium-review.googlesource.com/c/1317049
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/master@{#57261}
Refs: https://github.com/v8/v8/commit/0483e9a9abe77a73632fd85b9c0cd608efa9aa0d
PR-URL: https://github.com/nodejs/node/pull/24125
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yang Guo <yangguo@chromium.org>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Refael Ackermann <refack@gmail.com>
---
include/v8.h | 6 ++++++
src/api.cc | 17 +++++++++++++++++
test/cctest/test-api.cc | 16 ++++++++++++++++
3 files changed, 39 insertions(+)
diff --git a/include/v8.h b/include/v8.h
index a4bbe1b0c4..9b7be9fb93 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -3680,6 +3680,12 @@ class V8_EXPORT Array : public Object {
*/
static Local<Array> New(Isolate* isolate, int length = 0);
+ /**
+ * Creates a JavaScript array out of a Local<Value> array in C++
+ * with a known length.
+ */
+ static Local<Array> New(Isolate* isolate, Local<Value>* elements,
+ size_t length);
V8_INLINE static Array* Cast(Value* obj);
private:
Array();
diff --git a/src/api.cc b/src/api.cc
index 3f62a23d43..4e233d96dc 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -6911,6 +6911,23 @@ Local<v8::Array> v8::Array::New(Isolate* isolate, int length) {
return Utils::ToLocal(obj);
}
+Local<v8::Array> v8::Array::New(Isolate* isolate, Local<Value>* elements,
+ size_t length) {
+ i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
+ i::Factory* factory = i_isolate->factory();
+ LOG_API(i_isolate, Array, New);
+ ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate);
+ int len = static_cast<int>(length);
+
+ i::Handle<i::FixedArray> result = factory->NewFixedArray(len);
+ for (int i = 0; i < len; i++) {
+ i::Handle<i::Object> element = Utils::OpenHandle(*elements[i]);
+ result->set(i, *element);
+ }
+
+ return Utils::ToLocal(
+ factory->NewJSArrayWithElements(result, i::PACKED_ELEMENTS, len));
+}
uint32_t v8::Array::Length() const {
i::Handle<i::JSArray> obj = Utils::OpenHandle(this);
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 9eb73fab7e..0d92508d24 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -5225,6 +5225,22 @@ THREADED_TEST(Array) {
CHECK_EQ(27u, array->Length());
array = v8::Array::New(context->GetIsolate(), -27);
CHECK_EQ(0u, array->Length());
+
+ std::vector<Local<Value>> vector = {v8_num(1), v8_num(2), v8_num(3)};
+ array = v8::Array::New(context->GetIsolate(), vector.data(), vector.size());
+ CHECK_EQ(vector.size(), array->Length());
+ CHECK_EQ(1, arr->Get(context.local(), 0)
+ .ToLocalChecked()
+ ->Int32Value(context.local())
+ .FromJust());
+ CHECK_EQ(2, arr->Get(context.local(), 1)
+ .ToLocalChecked()
+ ->Int32Value(context.local())
+ .FromJust());
+ CHECK_EQ(3, arr->Get(context.local(), 2)
+ .ToLocalChecked()
+ ->Int32Value(context.local())
+ .FromJust());
}
--
2.14.3 (Apple Git-98)

View file

@ -0,0 +1,136 @@
From e36e9dde38caf3517890da2265e6dd9f127abe72 Mon Sep 17 00:00:00 2001
From: Peter Marshall <petermarshall@chromium.org>
Date: Fri, 9 Nov 2018 13:06:07 +0100
Subject: [PATCH 2/4] deps: cherry-pick b87d408 from upstream V8
Original commit message:
[heap-profiler] Fix a use-after-free when snapshots are deleted
If a caller starts the sampling heap profiler and takes a snapshot,
and then deletes the snapshot before the sampling has completed, a
use-after-free will occur on the StringsStorage pointer.
The same issue applies for StartTrackingHeapObjects which shares the
same StringsStorage object.
Bug: v8:8373
Change-Id: I5d69d60d3f9465f9dd3b3bef107c204e0fda0643
Reviewed-on: https://chromium-review.googlesource.com/c/1301477
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57114}
PR-URL: https://github.com/nodejs/node/pull/24272
Refs:
https://github.com/v8/v8/commit/b87d408f65b9ab49a4d199e850d2358995deaeb2
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
---
src/profiler/heap-profiler.cc | 9 ++++++++-
src/profiler/heap-profiler.h | 2 ++
test/cctest/test-heap-profiler.cc | 42 +++++++++++++++++++++++++++++++++++++++
3 files changed, 52 insertions(+), 1 deletion(-)
diff --git a/src/profiler/heap-profiler.cc b/src/profiler/heap-profiler.cc
index 0978e76cff..58a8f3851f 100644
--- a/src/profiler/heap-profiler.cc
+++ b/src/profiler/heap-profiler.cc
@@ -23,9 +23,14 @@ HeapProfiler::~HeapProfiler() = default;
void HeapProfiler::DeleteAllSnapshots() {
snapshots_.clear();
- names_.reset(new StringsStorage());
+ MaybeClearStringsStorage();
}
+void HeapProfiler::MaybeClearStringsStorage() {
+ if (snapshots_.empty() && !sampling_heap_profiler_ && !allocation_tracker_) {
+ names_.reset(new StringsStorage());
+ }
+}
void HeapProfiler::RemoveSnapshot(HeapSnapshot* snapshot) {
snapshots_.erase(
@@ -126,6 +131,7 @@ bool HeapProfiler::StartSamplingHeapProfiler(
void HeapProfiler::StopSamplingHeapProfiler() {
sampling_heap_profiler_.reset();
+ MaybeClearStringsStorage();
}
@@ -159,6 +165,7 @@ void HeapProfiler::StopHeapObjectsTracking() {
ids_->StopHeapObjectsTracking();
if (allocation_tracker_) {
allocation_tracker_.reset();
+ MaybeClearStringsStorage();
heap()->RemoveHeapObjectAllocationTracker(this);
}
}
diff --git a/src/profiler/heap-profiler.h b/src/profiler/heap-profiler.h
index acbdc6aa7a..1e3527765e 100644
--- a/src/profiler/heap-profiler.h
+++ b/src/profiler/heap-profiler.h
@@ -92,6 +92,8 @@ class HeapProfiler : public HeapObjectAllocationTracker {
v8::PersistentValueVector<v8::Object>* objects);
private:
+ void MaybeClearStringsStorage();
+
Heap* heap() const;
// Mapping from HeapObject addresses to objects' uids.
diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc
index 257ef1c723..f3c545fd83 100644
--- a/test/cctest/test-heap-profiler.cc
+++ b/test/cctest/test-heap-profiler.cc
@@ -3875,3 +3875,45 @@ TEST(WeakReference) {
const v8::HeapSnapshot* snapshot = heap_profiler->TakeHeapSnapshot();
CHECK(ValidateSnapshot(snapshot));
}
+
+TEST(Bug8373_1) {
+ LocalContext env;
+ v8::HandleScope scope(env->GetIsolate());
+ v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
+
+ heap_profiler->StartSamplingHeapProfiler(100);
+
+ heap_profiler->TakeHeapSnapshot();
+ // Causes the StringsStorage to be deleted.
+ heap_profiler->DeleteAllHeapSnapshots();
+
+ // Triggers an allocation sample that tries to use the StringsStorage.
+ for (int i = 0; i < 2 * 1024; ++i) {
+ CompileRun(
+ "new Array(64);"
+ "new Uint8Array(16);");
+ }
+
+ heap_profiler->StopSamplingHeapProfiler();
+}
+
+TEST(Bug8373_2) {
+ LocalContext env;
+ v8::HandleScope scope(env->GetIsolate());
+ v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
+
+ heap_profiler->StartTrackingHeapObjects(true);
+
+ heap_profiler->TakeHeapSnapshot();
+ // Causes the StringsStorage to be deleted.
+ heap_profiler->DeleteAllHeapSnapshots();
+
+ // Triggers an allocations that try to use the StringsStorage.
+ for (int i = 0; i < 2 * 1024; ++i) {
+ CompileRun(
+ "new Array(64);"
+ "new Uint8Array(16);");
+ }
+
+ heap_profiler->StopTrackingHeapObjects();
+}
--
2.14.3 (Apple Git-98)

View file

@ -0,0 +1,180 @@
From d08800799f487c2ab02cf567dca2e4ecfb589b63 Mon Sep 17 00:00:00 2001
From: Yang Guo <yangguo@chromium.org>
Date: Tue, 20 Nov 2018 09:16:23 +0100
Subject: [PATCH 3/4] deps: cherry-pick 073073b from upstream V8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Original commit message:
[profiler] introduce API to enable detailed source positions
This allows Node.js to enable detailed source positions for optimized code
early on, without having to pass a flag string.
R=petermarshall@chromium.org
Change-Id: Ie74ea41f600cf6e31acbe802116df4976ccf1c75
Reviewed-on: https://chromium-review.googlesource.com/c/1319757
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57380}
Refs: https://github.com/v8/v8/commit/073073b4f12b683fc0406cd15b3cb284633fe18e
PR-URL: https://github.com/nodejs/node/pull/24515
Refs: https://github.com/nodejs/node/pull/24274
Refs: https://github.com/nodejs/node/pull/24394
Refs: https://github.com/nodejs/node/issues/24393
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Peter Marshall <petermarshall@chromium.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
---
include/v8-profiler.h | 6 +++++
src/api.cc | 5 ++++
src/isolate.cc | 3 ++-
src/isolate.h | 3 ++-
test/cctest/test-cpu-profiler.cc | 56 ++++++++++++++++++++++++++++++++++++++++
5 files changed, 71 insertions(+), 2 deletions(-)
diff --git a/include/v8-profiler.h b/include/v8-profiler.h
index c034518def..f30688582d 100644
--- a/include/v8-profiler.h
+++ b/include/v8-profiler.h
@@ -341,6 +341,12 @@ class V8_EXPORT CpuProfiler {
V8_DEPRECATED("Use Isolate::SetIdle(bool) instead.",
void SetIdle(bool is_idle));
+ /**
+ * Generate more detailed source positions to code objects. This results in
+ * better results when mapping profiling samples to script source.
+ */
+ static void UseDetailedSourcePositionsForProfiling(Isolate* isolate);
+
private:
CpuProfiler();
~CpuProfiler();
diff --git a/src/api.cc b/src/api.cc
index 4e233d96dc..161538638b 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -10112,6 +10112,11 @@ void CpuProfiler::SetIdle(bool is_idle) {
isolate->SetIdle(is_idle);
}
+void CpuProfiler::UseDetailedSourcePositionsForProfiling(Isolate* isolate) {
+ reinterpret_cast<i::Isolate*>(isolate)
+ ->set_detailed_source_positions_for_profiling(true);
+}
+
uintptr_t CodeEvent::GetCodeStartAddress() {
return reinterpret_cast<i::CodeEvent*>(this)->code_start_address;
}
diff --git a/src/isolate.cc b/src/isolate.cc
index 94033f446b..e6a9e95a2f 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -3461,7 +3461,8 @@ bool Isolate::use_optimizer() {
}
bool Isolate::NeedsDetailedOptimizedCodeLineInfo() const {
- return NeedsSourcePositionsForProfiling() || FLAG_detailed_line_info;
+ return NeedsSourcePositionsForProfiling() ||
+ detailed_source_positions_for_profiling();
}
bool Isolate::NeedsSourcePositionsForProfiling() const {
diff --git a/src/isolate.h b/src/isolate.h
index ad124586cc..c25f143cf8 100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -540,7 +540,8 @@ typedef std::vector<HeapObject*> DebugObjectCache;
V(int, last_console_context_id, 0) \
V(v8_inspector::V8Inspector*, inspector, nullptr) \
V(bool, next_v8_call_is_safe_for_termination, false) \
- V(bool, only_terminate_in_safe_scope, false)
+ V(bool, only_terminate_in_safe_scope, false) \
+ V(bool, detailed_source_positions_for_profiling, FLAG_detailed_line_info)
#define THREAD_LOCAL_TOP_ACCESSOR(type, name) \
inline void set_##name(type v) { thread_local_top_.name##_ = v; } \
diff --git a/test/cctest/test-cpu-profiler.cc b/test/cctest/test-cpu-profiler.cc
index 75af3f6d98..e08bec375e 100644
--- a/test/cctest/test-cpu-profiler.cc
+++ b/test/cctest/test-cpu-profiler.cc
@@ -40,6 +40,7 @@
#include "src/objects-inl.h"
#include "src/profiler/cpu-profiler-inl.h"
#include "src/profiler/profiler-listener.h"
+#include "src/source-position-table.h"
#include "src/utils.h"
#include "test/cctest/cctest.h"
#include "test/cctest/profiler-extension.h"
@@ -2544,6 +2545,61 @@ TEST(MultipleProfilers) {
profiler2->StopProfiling("2");
}
+int GetSourcePositionEntryCount(i::Isolate* isolate, const char* source) {
+ i::Handle<i::JSFunction> function = i::Handle<i::JSFunction>::cast(
+ v8::Utils::OpenHandle(*CompileRun(source)));
+ if (function->IsInterpreted()) return -1;
+ i::Handle<i::Code> code(function->code(), isolate);
+ i::SourcePositionTableIterator iterator(
+ ByteArray::cast(code->source_position_table()));
+ int count = 0;
+ while (!iterator.done()) {
+ count++;
+ iterator.Advance();
+ }
+ return count;
+}
+
+UNINITIALIZED_TEST(DetailedSourcePositionAPI) {
+ i::FLAG_detailed_line_info = false;
+ i::FLAG_allow_natives_syntax = true;
+ v8::Isolate::CreateParams create_params;
+ create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
+ v8::Isolate* isolate = v8::Isolate::New(create_params);
+
+ const char* source =
+ "function fib(i) {"
+ " if (i <= 1) return 1; "
+ " return fib(i - 1) +"
+ " fib(i - 2);"
+ "}"
+ "fib(5);"
+ "%OptimizeFunctionOnNextCall(fib);"
+ "fib(5);"
+ "fib";
+ {
+ v8::Isolate::Scope isolate_scope(isolate);
+ v8::HandleScope handle_scope(isolate);
+ v8::Local<v8::Context> context = v8::Context::New(isolate);
+ v8::Context::Scope context_scope(context);
+ i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
+
+ CHECK(!i_isolate->NeedsDetailedOptimizedCodeLineInfo());
+
+ int non_detailed_positions = GetSourcePositionEntryCount(i_isolate, source);
+
+ v8::CpuProfiler::UseDetailedSourcePositionsForProfiling(isolate);
+ CHECK(i_isolate->NeedsDetailedOptimizedCodeLineInfo());
+
+ int detailed_positions = GetSourcePositionEntryCount(i_isolate, source);
+
+ CHECK((non_detailed_positions == -1 && detailed_positions == -1) ||
+ non_detailed_positions < detailed_positions);
+ }
+
+ isolate->Dispose();
+}
+
} // namespace test_cpu_profiler
} // namespace internal
} // namespace v8
--
2.14.3 (Apple Git-98)

View file

@ -0,0 +1,352 @@
From 3d6d9749c273d8bbd19508a9f294cfedf44d01e2 Mon Sep 17 00:00:00 2001
From: Yang Guo <yangguo@chromium.org>
Date: Tue, 20 Nov 2018 08:59:38 +0100
Subject: [PATCH 4/4] deps: cherry-pick 88f8fe1 from upstream V8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Original commit message:
Fix collection iterator preview with deleted entries
We used to assume that we know the remaining entries returned by the
iterator based on the current index. However, that is not accurate,
since entries skipped by the current index could be deleted.
In the new approach, we allocate conservatively and shrink the result.
R=neis@chromium.org
Bug: v8:8433
Change-Id: I38a3004dc3af292daabb454bb76f38d65ef437e8
Reviewed-on: https://chromium-review.googlesource.com/c/1325966
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57360}
Refs: https://github.com/v8/v8/commit/88f8fe19a863c6392bd296faf86c06eff2a41bc1
PR-URL: https://github.com/nodejs/node/pull/24514
Refs: https://github.com/nodejs/node/issues/24053
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
---
src/api.cc | 52 ++++++------
test/cctest/test-api.cc | 214 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 241 insertions(+), 25 deletions(-)
diff --git a/src/api.cc b/src/api.cc
index 161538638b..64676f06c1 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -7033,30 +7033,30 @@ i::Handle<i::JSArray> MapAsArray(i::Isolate* isolate, i::Object* table_obj,
i::Factory* factory = isolate->factory();
i::Handle<i::OrderedHashMap> table(i::OrderedHashMap::cast(table_obj),
isolate);
- if (offset >= table->NumberOfElements()) return factory->NewJSArray(0);
- int length = (table->NumberOfElements() - offset) *
- (kind == MapAsArrayKind::kEntries ? 2 : 1);
- i::Handle<i::FixedArray> result = factory->NewFixedArray(length);
+ const bool collect_keys =
+ kind == MapAsArrayKind::kEntries || kind == MapAsArrayKind::kKeys;
+ const bool collect_values =
+ kind == MapAsArrayKind::kEntries || kind == MapAsArrayKind::kValues;
+ int capacity = table->UsedCapacity();
+ int max_length =
+ (capacity - offset) * ((collect_keys && collect_values) ? 2 : 1);
+ i::Handle<i::FixedArray> result = factory->NewFixedArray(max_length);
int result_index = 0;
{
i::DisallowHeapAllocation no_gc;
- int capacity = table->UsedCapacity();
i::Oddball* the_hole = i::ReadOnlyRoots(isolate).the_hole_value();
- for (int i = 0; i < capacity; ++i) {
+ for (int i = offset; i < capacity; ++i) {
i::Object* key = table->KeyAt(i);
if (key == the_hole) continue;
- if (offset-- > 0) continue;
- if (kind == MapAsArrayKind::kEntries || kind == MapAsArrayKind::kKeys) {
- result->set(result_index++, key);
- }
- if (kind == MapAsArrayKind::kEntries || kind == MapAsArrayKind::kValues) {
- result->set(result_index++, table->ValueAt(i));
- }
+ if (collect_keys) result->set(result_index++, key);
+ if (collect_values) result->set(result_index++, table->ValueAt(i));
}
}
- DCHECK_EQ(result_index, result->length());
- DCHECK_EQ(result_index, length);
- return factory->NewJSArrayWithElements(result, i::PACKED_ELEMENTS, length);
+ DCHECK_GE(max_length, result_index);
+ if (result_index == 0) return factory->NewJSArray(0);
+ result->Shrink(isolate, result_index);
+ return factory->NewJSArrayWithElements(result, i::PACKED_ELEMENTS,
+ result_index);
}
} // namespace
@@ -7141,24 +7141,26 @@ i::Handle<i::JSArray> SetAsArray(i::Isolate* isolate, i::Object* table_obj,
i::Factory* factory = isolate->factory();
i::Handle<i::OrderedHashSet> table(i::OrderedHashSet::cast(table_obj),
isolate);
- int length = table->NumberOfElements() - offset;
- if (length <= 0) return factory->NewJSArray(0);
- i::Handle<i::FixedArray> result = factory->NewFixedArray(length);
+ // Elements skipped by |offset| may already be deleted.
+ int capacity = table->UsedCapacity();
+ int max_length = capacity - offset;
+ if (max_length == 0) return factory->NewJSArray(0);
+ i::Handle<i::FixedArray> result = factory->NewFixedArray(max_length);
int result_index = 0;
{
i::DisallowHeapAllocation no_gc;
- int capacity = table->UsedCapacity();
i::Oddball* the_hole = i::ReadOnlyRoots(isolate).the_hole_value();
- for (int i = 0; i < capacity; ++i) {
+ for (int i = offset; i < capacity; ++i) {
i::Object* key = table->KeyAt(i);
if (key == the_hole) continue;
- if (offset-- > 0) continue;
result->set(result_index++, key);
}
}
- DCHECK_EQ(result_index, result->length());
- DCHECK_EQ(result_index, length);
- return factory->NewJSArrayWithElements(result, i::PACKED_ELEMENTS, length);
+ DCHECK_GE(max_length, result_index);
+ if (result_index == 0) return factory->NewJSArray(0);
+ result->Shrink(isolate, result_index);
+ return factory->NewJSArrayWithElements(result, i::PACKED_ELEMENTS,
+ result_index);
}
} // namespace
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 0d92508d24..9bf7870f75 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -28852,3 +28852,217 @@ TEST(TestGetEmbeddedCodeRange) {
CHECK_EQ(0, builtins_range.length_in_bytes);
}
}
+
+TEST(PreviewSetIteratorEntriesWithDeleted) {
+ LocalContext env;
+ v8::HandleScope handle_scope(env->GetIsolate());
+ v8::Local<v8::Context> context = env.local();
+
+ {
+ // Create set, delete entry, create iterator, preview.
+ v8::Local<v8::Object> iterator =
+ CompileRun("var set = new Set([1,2,3]); set.delete(1); set.keys()")
+ ->ToObject(context)
+ .ToLocalChecked();
+ bool is_key;
+ v8::Local<v8::Array> entries =
+ iterator->PreviewEntries(&is_key).ToLocalChecked();
+ CHECK(!is_key);
+ CHECK_EQ(2, entries->Length());
+ CHECK_EQ(2, entries->Get(context, 0)
+ .ToLocalChecked()
+ ->Int32Value(context)
+ .FromJust());
+ CHECK_EQ(3, entries->Get(context, 1)
+ .ToLocalChecked()
+ ->Int32Value(context)
+ .FromJust());
+ }
+ {
+ // Create set, create iterator, delete entry, preview.
+ v8::Local<v8::Object> iterator =
+ CompileRun("var set = new Set([1,2,3]); set.keys()")
+ ->ToObject(context)
+ .ToLocalChecked();
+ CompileRun("set.delete(1);");
+ bool is_key;
+ v8::Local<v8::Array> entries =
+ iterator->PreviewEntries(&is_key).ToLocalChecked();
+ CHECK(!is_key);
+ CHECK_EQ(2, entries->Length());
+ CHECK_EQ(2, entries->Get(context, 0)
+ .ToLocalChecked()
+ ->Int32Value(context)
+ .FromJust());
+ CHECK_EQ(3, entries->Get(context, 1)
+ .ToLocalChecked()
+ ->Int32Value(context)
+ .FromJust());
+ }
+ {
+ // Create set, create iterator, delete entry, iterate, preview.
+ v8::Local<v8::Object> iterator =
+ CompileRun("var set = new Set([1,2,3]); var it = set.keys(); it")
+ ->ToObject(context)
+ .ToLocalChecked();
+ CompileRun("set.delete(1); it.next();");
+ bool is_key;
+ v8::Local<v8::Array> entries =
+ iterator->PreviewEntries(&is_key).ToLocalChecked();
+ CHECK(!is_key);
+ CHECK_EQ(1, entries->Length());
+ CHECK_EQ(3, entries->Get(context, 0)
+ .ToLocalChecked()
+ ->Int32Value(context)
+ .FromJust());
+ }
+ {
+ // Create set, create iterator, delete entry, iterate until empty, preview.
+ v8::Local<v8::Object> iterator =
+ CompileRun("var set = new Set([1,2,3]); var it = set.keys(); it")
+ ->ToObject(context)
+ .ToLocalChecked();
+ CompileRun("set.delete(1); it.next(); it.next();");
+ bool is_key;
+ v8::Local<v8::Array> entries =
+ iterator->PreviewEntries(&is_key).ToLocalChecked();
+ CHECK(!is_key);
+ CHECK_EQ(0, entries->Length());
+ }
+ {
+ // Create set, create iterator, delete entry, iterate, trigger rehash,
+ // preview.
+ v8::Local<v8::Object> iterator =
+ CompileRun("var set = new Set([1,2,3]); var it = set.keys(); it")
+ ->ToObject(context)
+ .ToLocalChecked();
+ CompileRun("set.delete(1); it.next();");
+ CompileRun("for (var i = 4; i < 20; i++) set.add(i);");
+ bool is_key;
+ v8::Local<v8::Array> entries =
+ iterator->PreviewEntries(&is_key).ToLocalChecked();
+ CHECK(!is_key);
+ CHECK_EQ(17, entries->Length());
+ for (uint32_t i = 0; i < 17; i++) {
+ CHECK_EQ(i + 3, entries->Get(context, i)
+ .ToLocalChecked()
+ ->Int32Value(context)
+ .FromJust());
+ }
+ }
+}
+
+TEST(PreviewMapIteratorEntriesWithDeleted) {
+ LocalContext env;
+ v8::HandleScope handle_scope(env->GetIsolate());
+ v8::Local<v8::Context> context = env.local();
+
+ {
+ // Create map, delete entry, create iterator, preview.
+ v8::Local<v8::Object> iterator = CompileRun(
+ "var map = new Map();"
+ "var key = {}; map.set(key, 1);"
+ "map.set({}, 2); map.set({}, 3);"
+ "map.delete(key);"
+ "map.values()")
+ ->ToObject(context)
+ .ToLocalChecked();
+ bool is_key;
+ v8::Local<v8::Array> entries =
+ iterator->PreviewEntries(&is_key).ToLocalChecked();
+ CHECK(!is_key);
+ CHECK_EQ(2, entries->Length());
+ CHECK_EQ(2, entries->Get(context, 0)
+ .ToLocalChecked()
+ ->Int32Value(context)
+ .FromJust());
+ CHECK_EQ(3, entries->Get(context, 1)
+ .ToLocalChecked()
+ ->Int32Value(context)
+ .FromJust());
+ }
+ {
+ // Create map, create iterator, delete entry, preview.
+ v8::Local<v8::Object> iterator = CompileRun(
+ "var map = new Map();"
+ "var key = {}; map.set(key, 1);"
+ "map.set({}, 2); map.set({}, 3);"
+ "map.values()")
+ ->ToObject(context)
+ .ToLocalChecked();
+ CompileRun("map.delete(key);");
+ bool is_key;
+ v8::Local<v8::Array> entries =
+ iterator->PreviewEntries(&is_key).ToLocalChecked();
+ CHECK(!is_key);
+ CHECK_EQ(2, entries->Length());
+ CHECK_EQ(2, entries->Get(context, 0)
+ .ToLocalChecked()
+ ->Int32Value(context)
+ .FromJust());
+ CHECK_EQ(3, entries->Get(context, 1)
+ .ToLocalChecked()
+ ->Int32Value(context)
+ .FromJust());
+ }
+ {
+ // Create map, create iterator, delete entry, iterate, preview.
+ v8::Local<v8::Object> iterator = CompileRun(
+ "var map = new Map();"
+ "var key = {}; map.set(key, 1);"
+ "map.set({}, 2); map.set({}, 3);"
+ "var it = map.values(); it")
+ ->ToObject(context)
+ .ToLocalChecked();
+ CompileRun("map.delete(key); it.next();");
+ bool is_key;
+ v8::Local<v8::Array> entries =
+ iterator->PreviewEntries(&is_key).ToLocalChecked();
+ CHECK(!is_key);
+ CHECK_EQ(1, entries->Length());
+ CHECK_EQ(3, entries->Get(context, 0)
+ .ToLocalChecked()
+ ->Int32Value(context)
+ .FromJust());
+ }
+ {
+ // Create map, create iterator, delete entry, iterate until empty, preview.
+ v8::Local<v8::Object> iterator = CompileRun(
+ "var map = new Map();"
+ "var key = {}; map.set(key, 1);"
+ "map.set({}, 2); map.set({}, 3);"
+ "var it = map.values(); it")
+ ->ToObject(context)
+ .ToLocalChecked();
+ CompileRun("map.delete(key); it.next(); it.next();");
+ bool is_key;
+ v8::Local<v8::Array> entries =
+ iterator->PreviewEntries(&is_key).ToLocalChecked();
+ CHECK(!is_key);
+ CHECK_EQ(0, entries->Length());
+ }
+ {
+ // Create map, create iterator, delete entry, iterate, trigger rehash,
+ // preview.
+ v8::Local<v8::Object> iterator = CompileRun(
+ "var map = new Map();"
+ "var key = {}; map.set(key, 1);"
+ "map.set({}, 2); map.set({}, 3);"
+ "var it = map.values(); it")
+ ->ToObject(context)
+ .ToLocalChecked();
+ CompileRun("map.delete(key); it.next();");
+ CompileRun("for (var i = 4; i < 20; i++) map.set({}, i);");
+ bool is_key;
+ v8::Local<v8::Array> entries =
+ iterator->PreviewEntries(&is_key).ToLocalChecked();
+ CHECK(!is_key);
+ CHECK_EQ(17, entries->Length());
+ for (uint32_t i = 0; i < 17; i++) {
+ CHECK_EQ(i + 3, entries->Get(context, i)
+ .ToLocalChecked()
+ ->Int32Value(context)
+ .FromJust());
+ }
+ }
+}
--
2.14.3 (Apple Git-98)

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 a83305560c2ea33d4a6247d76655e83c7a14b0ca..fa3a4dd82c0deeaddba0a84e8bf2841e04bc8483 100644
index a4bbe1b0c43d665a6b6c4e6c46205c32eac9548b..b2301cd8d07c1ef57e77cedab920a43f0b498597 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -4604,6 +4604,13 @@ class V8_EXPORT ArrayBuffer : public Object {
@@ -4486,6 +4486,13 @@ class V8_EXPORT ArrayBuffer : public Object {
*/
virtual void* AllocateUninitialized(size_t length) = 0;
@ -30,10 +30,10 @@ index a83305560c2ea33d4a6247d76655e83c7a14b0ca..fa3a4dd82c0deeaddba0a84e8bf2841e
* 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.cc b/src/api.cc
index 4eb31a447c3d2dbce8ddaffb777b799ec28c2f8c..809bbe52178a3f8cbcf0b6eb81fba0910c1fb0e6 100644
index 3f62a23d43c1c82c273e379e78fd0a4292cf4a20..2863b73e0677b666040766fef638abbc6fc95b8c 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -508,6 +508,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) {
@@ -488,6 +488,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) {
i::V8::SetSnapshotBlob(snapshot_blob);
}

View file

@ -5,10 +5,10 @@ Subject: array_buffer.patch
diff --git a/include/v8.h b/include/v8.h
index fa3a4dd82c0deeaddba0a84e8bf2841e04bc8483..3070f4aa50eed8722805feaf8d9b9db0d68fbbbf 100644
index b2301cd8d07c1ef57e77cedab920a43f0b498597..6934a9c3838641446fa96a8ab48abed4cfc1841c 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -7737,6 +7737,9 @@ class V8_EXPORT Isolate {
@@ -7653,6 +7653,9 @@ class V8_EXPORT Isolate {
*/
void SetIdle(bool is_idle);
@ -19,10 +19,10 @@ index fa3a4dd82c0deeaddba0a84e8bf2841e04bc8483..3070f4aa50eed8722805feaf8d9b9db0
bool InContext();
diff --git a/src/api.cc b/src/api.cc
index 809bbe52178a3f8cbcf0b6eb81fba0910c1fb0e6..c1f863d148243d3988a70959fd91a37788137393 100644
index 2863b73e0677b666040766fef638abbc6fc95b8c..8d83474bcd0ed257b8f387d7996085c605326236 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -8107,6 +8107,13 @@ void Isolate::SetIdle(bool is_idle) {
@@ -7984,6 +7984,13 @@ void Isolate::SetIdle(bool is_idle) {
isolate->SetIdle(is_idle);
}

View file

@ -1,28 +1,37 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aleksei Kuzmin <alkuzmin@microsoft.com>
Date: Mon, 22 Oct 2018 10:47:13 -0700
From: deepak1556 <hop2deep@gmail.com>
Date: Fri, 4 Jan 2019 15:50:24 +0530
Subject: build-torque-with-x64-toolchain-on-arm.patch
torque binary has to be run during the build.
diff --git a/BUILD.gn b/BUILD.gn
index c1b08958b500da1910a8067198cdec7650534f20..78e672e18eff27a3777bd0c0adc94e88a6eb126a 100644
index d40848056235b9a8307533c8b1e238aecf18207d..d8db6363b8560b5c4a1595437e59edf1c6ec3974 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -914,7 +914,8 @@ action("run_torque") {
# is the target toolchain and, hence, can't be used.
v8_torque_toolchain = v8_snapshot_toolchain
if (host_cpu == "x64" &&
- (v8_current_cpu == "mips" || v8_current_cpu == "mips64")) {
+ (v8_current_cpu == "mips" || v8_current_cpu == "mips64" ||
+ v8_current_cpu == "arm" || v8_current_cpu == "arm64")) {
v8_torque_toolchain = "//build/toolchain/linux:clang_x64"
}
@@ -3256,7 +3257,7 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
@@ -170,7 +170,8 @@ declare_args() {
v8_generator_toolchain = v8_snapshot_toolchain
if (host_cpu == "x64" &&
- (v8_current_cpu == "mips" || v8_current_cpu == "mips64")) {
+ (v8_current_cpu == "mips" || v8_current_cpu == "mips64" ||
+ v8_current_cpu == "arm" || v8_current_cpu == "arm64")) {
v8_generator_toolchain = "//build/toolchain/linux:clang_x64"
}
@@ -3340,7 +3341,7 @@ if (v8_monolithic) {
# Executables
#
-if (current_toolchain == v8_generator_toolchain) {
+if (current_toolchain == current_toolchain) {
v8_executable("bytecode_builtins_list_generator") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
@@ -3384,7 +3385,7 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
}
}
-if (current_toolchain == v8_snapshot_toolchain) {
+if (current_toolchain == current_toolchain) {
v8_executable("torque") {

View file

@ -5,10 +5,10 @@ Subject: build_gn.patch
diff --git a/BUILD.gn b/BUILD.gn
index c6a58776cd6a81cf5653b94a8db1a04dd7e54045..ac74cdec115b6cc54d05817f063153628cf5e9fe 100644
index 83f1fdb0bf75dd5f7efa490cd5bd1221e31748ed..5489b943f1d8bb8ffc02cabf4e0a15788c7d4e48 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -221,7 +221,7 @@ config("internal_config") {
@@ -226,7 +226,7 @@ config("internal_config") {
defines = []
@ -17,7 +17,7 @@ index c6a58776cd6a81cf5653b94a8db1a04dd7e54045..ac74cdec115b6cc54d05817f06315362
defines += [ "BUILDING_V8_SHARED" ]
}
}
@@ -3245,6 +3245,8 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
@@ -3363,6 +3363,8 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
configs = [ ":internal_config" ]

View file

@ -5,10 +5,10 @@ Subject: dcheck.patch
diff --git a/src/api.cc b/src/api.cc
index c1f863d148243d3988a70959fd91a37788137393..8dca7ec88e59c775da5cf7e30721d064f349c634 100644
index 8d83474bcd0ed257b8f387d7996085c605326236..9be405b6c4822da81e48daf96169450be3e4356f 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -8649,7 +8649,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
@@ -8540,7 +8540,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
void Isolate::RunMicrotasks() {
@ -18,10 +18,10 @@ index c1f863d148243d3988a70959fd91a37788137393..8dca7ec88e59c775da5cf7e30721d064
}
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 2ec30635be2b75fe1e308068b6e16b9568472ead..7058396f3009fec5635a01961368ab14c287d882 100644
index b509d211425fc755f8cecd4727c050d47d7f87f7..36e5023a77b46305b70196cf3c25a8c625dae96b 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -5035,9 +5035,9 @@ void Heap::TearDown() {
@@ -4696,9 +4696,9 @@ void Heap::TearDown() {
void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback,
GCType gc_type, void* data) {
DCHECK_NOT_NULL(callback);

View file

@ -20,10 +20,10 @@ Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index 69ec7472bba0f9a04b32c1ce135083cc82456b0a..4f8b5780c832d2faf27340cffe32b298e3b0b04d 100644
index 170a777c724e9daca0aee44b63455ade724426e9..5a7664474f15fa9a466c536d2ac554e8f485b32d 100644
--- a/src/flag-definitions.h
+++ b/src/flag-definitions.h
@@ -1267,7 +1267,7 @@ DEFINE_BOOL(log_function_events, false,
@@ -1266,7 +1266,7 @@ DEFINE_BOOL(log_function_events, false,
DEFINE_BOOL(prof, false,
"Log statistical profiling information (implies --log-code).")

View file

@ -1,74 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ali Ijaz Sheikh <ofrobots@google.com>
Date: Tue, 11 Sep 2018 15:40:28 -0700
Subject: deps: cherry-pick 2363cdf from upstream V8
Original commit message:
[tracing] do not add traces when disabled
https://github.com/nodejs/node/issues/21038
Change-Id: Ic4c9f403b5e54a97d3170b2311dd5aab8c8357c8
Reviewed-on: https://chromium-review.googlesource.com/1217726
Commit-Queue: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55809}
Refs: https://github.com/v8/v8/commit/2363cdfefeb643285cbe8593b7c17d80e5d06cd9
PR-URL: https://github.com/nodejs/node/pull/22812
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
diff --git a/src/libplatform/tracing/tracing-controller.cc b/src/libplatform/tracing/tracing-controller.cc
index daaebc291a5a3f566fcd65cfcced0f5c3725fe08..aa8789fa07c167ecce97dd787782ce684d3a7c38 100644
--- a/src/libplatform/tracing/tracing-controller.cc
+++ b/src/libplatform/tracing/tracing-controller.cc
@@ -77,13 +77,15 @@ uint64_t TracingController::AddTraceEvent(
const uint64_t* arg_values,
std::unique_ptr<v8::ConvertableToTraceFormat>* arg_convertables,
unsigned int flags) {
- uint64_t handle;
- TraceObject* trace_object = trace_buffer_->AddTraceEvent(&handle);
- if (trace_object) {
- trace_object->Initialize(
- phase, category_enabled_flag, name, scope, id, bind_id, num_args,
- arg_names, arg_types, arg_values, arg_convertables, flags,
- CurrentTimestampMicroseconds(), CurrentCpuTimestampMicroseconds());
+ uint64_t handle = 0;
+ if (mode_ != DISABLED) {
+ TraceObject* trace_object = trace_buffer_->AddTraceEvent(&handle);
+ if (trace_object) {
+ trace_object->Initialize(
+ phase, category_enabled_flag, name, scope, id, bind_id, num_args,
+ arg_names, arg_types, arg_values, arg_convertables, flags,
+ CurrentTimestampMicroseconds(), CurrentCpuTimestampMicroseconds());
+ }
}
return handle;
}
@@ -95,13 +97,15 @@ uint64_t TracingController::AddTraceEventWithTimestamp(
const uint64_t* arg_values,
std::unique_ptr<v8::ConvertableToTraceFormat>* arg_convertables,
unsigned int flags, int64_t timestamp) {
- uint64_t handle;
- TraceObject* trace_object = trace_buffer_->AddTraceEvent(&handle);
- if (trace_object) {
- trace_object->Initialize(phase, category_enabled_flag, name, scope, id,
- bind_id, num_args, arg_names, arg_types,
- arg_values, arg_convertables, flags, timestamp,
- CurrentCpuTimestampMicroseconds());
+ uint64_t handle = 0;
+ if (mode_ != DISABLED) {
+ TraceObject* trace_object = trace_buffer_->AddTraceEvent(&handle);
+ if (trace_object) {
+ trace_object->Initialize(phase, category_enabled_flag, name, scope, id,
+ bind_id, num_args, arg_names, arg_types,
+ arg_values, arg_convertables, flags, timestamp,
+ CurrentCpuTimestampMicroseconds());
+ }
}
return handle;
}

View file

@ -22,10 +22,10 @@ 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 784e1830edeebaf2b15eaad4230f318f91acad5f..cc2fefc56a4eeaeab48f2042d6c8dbbadb1e3210 100644
index 6934a9c3838641446fa96a8ab48abed4cfc1841c..2ab60e2ceebf0648ff5b58f5d9909e0bf000585f 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1123,6 +1123,10 @@ class V8_EXPORT PrimitiveArray {
@@ -999,6 +999,10 @@ class V8_EXPORT PrimitiveArray {
public:
static Local<PrimitiveArray> New(Isolate* isolate, int length);
int Length() const;
@ -36,7 +36,7 @@ index 784e1830edeebaf2b15eaad4230f318f91acad5f..cc2fefc56a4eeaeab48f2042d6c8dbba
void Set(Isolate* isolate, int index, Local<Primitive> item);
Local<Primitive> Get(Isolate* isolate, int index);
};
@@ -1829,6 +1833,8 @@ class V8_EXPORT StackTrace {
@@ -1710,6 +1714,8 @@ class V8_EXPORT StackTrace {
/**
* Returns a StackFrame at a particular index.
*/
@ -45,7 +45,7 @@ index 784e1830edeebaf2b15eaad4230f318f91acad5f..cc2fefc56a4eeaeab48f2042d6c8dbba
Local<StackFrame> GetFrame(Isolate* isolate, uint32_t index) const;
/**
@@ -2537,6 +2543,13 @@ class V8_EXPORT Value : public Data {
@@ -2423,6 +2429,13 @@ class V8_EXPORT Value : public Data {
V8_DEPRECATE_SOON("Use maybe version",
Local<Int32> ToInt32(Isolate* isolate) const);
@ -59,7 +59,7 @@ index 784e1830edeebaf2b15eaad4230f318f91acad5f..cc2fefc56a4eeaeab48f2042d6c8dbba
/**
* Attempts to convert a string to an array index.
* Returns an empty handle if the conversion fails.
@@ -2552,7 +2565,14 @@ class V8_EXPORT Value : public Data {
@@ -2442,7 +2455,14 @@ class V8_EXPORT Value : public Data {
Local<Context> context) const;
V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
@ -74,7 +74,7 @@ index 784e1830edeebaf2b15eaad4230f318f91acad5f..cc2fefc56a4eeaeab48f2042d6c8dbba
V8_WARN_UNUSED_RESULT Maybe<bool> Equals(Local<Context> context,
Local<Value> that) const;
bool StrictEquals(Local<Value> that) const;
@@ -2659,6 +2679,8 @@ class V8_EXPORT String : public Name {
@@ -2549,6 +2569,8 @@ class V8_EXPORT String : public Name {
* Returns the number of bytes in the UTF-8 encoded
* representation of this string.
*/
@ -83,7 +83,7 @@ index 784e1830edeebaf2b15eaad4230f318f91acad5f..cc2fefc56a4eeaeab48f2042d6c8dbba
int Utf8Length(Isolate* isolate) const;
/**
@@ -2715,12 +2737,23 @@ class V8_EXPORT String : public Name {
@@ -2605,12 +2627,23 @@ 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;
@ -99,15 +99,15 @@ index 784e1830edeebaf2b15eaad4230f318f91acad5f..cc2fefc56a4eeaeab48f2042d6c8dbba
+ const);
// UTF-8 encoded characters.
int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
int* nchars_ref = NULL, int options = NO_OPTIONS) const;
int* nchars_ref = nullptr, int options = NO_OPTIONS) const;
+ V8_DEPRECATED("Use Isolate* version",
+ int WriteUtf8(char* buffer, int length = -1,
+ int* nchars_ref = NULL,
+ int* nchars_ref = nullptr,
+ int options = NO_OPTIONS) const);
/**
* A zero length string.
@@ -2884,6 +2917,9 @@ class V8_EXPORT String : public Name {
@@ -2812,6 +2845,9 @@ class V8_EXPORT String : public Name {
*/
static Local<String> Concat(Isolate* isolate, Local<String> left,
Local<String> right);
@ -117,7 +117,7 @@ index 784e1830edeebaf2b15eaad4230f318f91acad5f..cc2fefc56a4eeaeab48f2042d6c8dbba
/**
* Creates a new external string using the data defined in the given
@@ -2952,6 +2988,8 @@ class V8_EXPORT String : public Name {
@@ -2880,6 +2916,8 @@ class V8_EXPORT String : public Name {
*/
class V8_EXPORT Utf8Value {
public:
@ -126,7 +126,7 @@ index 784e1830edeebaf2b15eaad4230f318f91acad5f..cc2fefc56a4eeaeab48f2042d6c8dbba
Utf8Value(Isolate* isolate, Local<v8::Value> obj);
~Utf8Value();
char* operator*() { return str_; }
@@ -2975,6 +3013,7 @@ class V8_EXPORT String : public Name {
@@ -2903,6 +2941,7 @@ class V8_EXPORT String : public Name {
*/
class V8_EXPORT Value {
public:
@ -134,7 +134,7 @@ index 784e1830edeebaf2b15eaad4230f318f91acad5f..cc2fefc56a4eeaeab48f2042d6c8dbba
Value(Isolate* isolate, Local<v8::Value> obj);
~Value();
uint16_t* operator*() { return str_; }
@@ -5224,6 +5263,8 @@ class V8_EXPORT BooleanObject : public Object {
@@ -5140,6 +5179,8 @@ class V8_EXPORT BooleanObject : public Object {
class V8_EXPORT StringObject : public Object {
public:
static Local<Value> New(Isolate* isolate, Local<String> value);
@ -143,7 +143,7 @@ index 784e1830edeebaf2b15eaad4230f318f91acad5f..cc2fefc56a4eeaeab48f2042d6c8dbba
Local<String> ValueOf() const;
@@ -10226,6 +10267,30 @@ template <class T> Value* Value::Cast(T* value) {
@@ -9999,6 +10040,30 @@ template <class T> Value* Value::Cast(T* value) {
}
@ -175,10 +175,10 @@ index 784e1830edeebaf2b15eaad4230f318f91acad5f..cc2fefc56a4eeaeab48f2042d6c8dbba
#ifdef V8_ENABLE_CHECKS
CheckCast(value);
diff --git a/src/api.cc b/src/api.cc
index 7a53cc1370cf30c858fd87156e2eb75d4b57a60b..bc544f1c7c7f9f8e3bac9804697848ededb6a30a 100644
index 9be405b6c4822da81e48daf96169450be3e4356f..f34a63cb528ea619896957009922b0a0ee576616 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -2161,6 +2161,10 @@ int PrimitiveArray::Length() const {
@@ -2162,6 +2162,10 @@ int PrimitiveArray::Length() const {
return array->length();
}
@ -189,7 +189,7 @@ index 7a53cc1370cf30c858fd87156e2eb75d4b57a60b..bc544f1c7c7f9f8e3bac9804697848ed
void PrimitiveArray::Set(Isolate* v8_isolate, int index,
Local<Primitive> item) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
@@ -2174,6 +2178,10 @@ void PrimitiveArray::Set(Isolate* v8_isolate, int index,
@@ -2175,6 +2179,10 @@ void PrimitiveArray::Set(Isolate* v8_isolate, int index,
array->set(index, *i_item);
}
@ -200,7 +200,7 @@ index 7a53cc1370cf30c858fd87156e2eb75d4b57a60b..bc544f1c7c7f9f8e3bac9804697848ed
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);
@@ -2904,6 +2912,10 @@ void Message::PrintCurrentStackTrace(Isolate* isolate, FILE* out) {
@@ -2909,6 +2917,10 @@ void Message::PrintCurrentStackTrace(Isolate* isolate, FILE* out) {
// --- S t a c k T r a c e ---
@ -211,7 +211,7 @@ index 7a53cc1370cf30c858fd87156e2eb75d4b57a60b..bc544f1c7c7f9f8e3bac9804697848ed
Local<StackFrame> StackTrace::GetFrame(Isolate* v8_isolate,
uint32_t index) const {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
@@ -3880,6 +3892,36 @@ void v8::RegExp::CheckCast(v8::Value* that) {
@@ -3888,6 +3900,36 @@ void v8::RegExp::CheckCast(v8::Value* that) {
}
@ -248,7 +248,7 @@ index 7a53cc1370cf30c858fd87156e2eb75d4b57a60b..bc544f1c7c7f9f8e3bac9804697848ed
Maybe<bool> Value::BooleanValue(Local<Context> context) const {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
return Just(Utils::OpenHandle(this)->BooleanValue(isolate));
@@ -3968,6 +4010,12 @@ MaybeLocal<Uint32> Value::ToArrayIndex(Local<Context> context) const {
@@ -3976,6 +4018,12 @@ MaybeLocal<Uint32> Value::ToArrayIndex(Local<Context> context) const {
}
@ -261,7 +261,7 @@ index 7a53cc1370cf30c858fd87156e2eb75d4b57a60b..bc544f1c7c7f9f8e3bac9804697848ed
Maybe<bool> Value::Equals(Local<Context> context, Local<Value> that) const {
i::Isolate* isolate = Utils::OpenHandle(*context)->GetIsolate();
auto self = Utils::OpenHandle(this);
@@ -5299,6 +5347,10 @@ bool String::ContainsOnlyOneByte() const {
@@ -5312,6 +5360,10 @@ bool String::ContainsOnlyOneByte() const {
return helper.Check(*str);
}
@ -272,7 +272,7 @@ index 7a53cc1370cf30c858fd87156e2eb75d4b57a60b..bc544f1c7c7f9f8e3bac9804697848ed
int String::Utf8Length(Isolate* isolate) const {
i::Handle<i::String> str = Utils::OpenHandle(this);
str = i::String::Flatten(reinterpret_cast<i::Isolate*>(isolate), str);
@@ -5522,6 +5574,14 @@ static bool RecursivelySerializeToUtf8(i::String* current,
@@ -5535,6 +5587,14 @@ static bool RecursivelySerializeToUtf8(i::String* current,
return true;
}
@ -287,7 +287,7 @@ index 7a53cc1370cf30c858fd87156e2eb75d4b57a60b..bc544f1c7c7f9f8e3bac9804697848ed
int String::WriteUtf8(Isolate* v8_isolate, char* buffer, int capacity,
int* nchars_ref, int options) const {
i::Handle<i::String> str = Utils::OpenHandle(this);
@@ -5589,6 +5649,18 @@ static inline int WriteHelper(i::Isolate* isolate, const String* string,
@@ -5602,6 +5662,18 @@ static inline int WriteHelper(i::Isolate* isolate, const String* string,
}
@ -306,7 +306,7 @@ index 7a53cc1370cf30c858fd87156e2eb75d4b57a60b..bc544f1c7c7f9f8e3bac9804697848ed
int String::WriteOneByte(Isolate* isolate, uint8_t* buffer, int start,
int length, int options) const {
return WriteHelper(reinterpret_cast<i::Isolate*>(isolate), this, buffer,
@@ -6536,6 +6608,11 @@ MaybeLocal<String> String::NewFromTwoByte(Isolate* isolate,
@@ -6549,6 +6621,11 @@ MaybeLocal<String> String::NewFromTwoByte(Isolate* isolate,
return result;
}
@ -318,7 +318,7 @@ index 7a53cc1370cf30c858fd87156e2eb75d4b57a60b..bc544f1c7c7f9f8e3bac9804697848ed
Local<String> v8::String::Concat(Isolate* v8_isolate, Local<String> left,
Local<String> right) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
@@ -6762,6 +6839,11 @@ bool v8::BooleanObject::ValueOf() const {
@@ -6774,6 +6851,11 @@ bool v8::BooleanObject::ValueOf() const {
}
@ -330,7 +330,7 @@ index 7a53cc1370cf30c858fd87156e2eb75d4b57a60b..bc544f1c7c7f9f8e3bac9804697848ed
Local<v8::Value> v8::StringObject::New(Isolate* v8_isolate,
Local<String> value) {
i::Handle<i::String> string = Utils::OpenHandle(*value);
@@ -8904,6 +8986,9 @@ bool MicrotasksScope::IsRunningMicrotasks(Isolate* v8Isolate) {
@@ -8915,6 +8997,9 @@ bool MicrotasksScope::IsRunningMicrotasks(Isolate* v8Isolate) {
return isolate->IsRunningMicrotasks();
}
@ -340,7 +340,7 @@ index 7a53cc1370cf30c858fd87156e2eb75d4b57a60b..bc544f1c7c7f9f8e3bac9804697848ed
String::Utf8Value::Utf8Value(v8::Isolate* isolate, v8::Local<v8::Value> obj)
: str_(nullptr), length_(0) {
if (obj.IsEmpty()) return;
@@ -8923,6 +9008,9 @@ String::Utf8Value::~Utf8Value() {
@@ -8934,6 +9019,9 @@ String::Utf8Value::~Utf8Value() {
i::DeleteArray(str_);
}

View file

@ -1,409 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Anna Henningsen <anna@addaleax.net>
Date: Thu, 4 Oct 2018 14:38:59 -0700
Subject: deps: revert 9136dd8088a9 from upstream V8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Reverting this enables us to provide slower, but longer-lasting
replacements for the deprecated APIs.
Original commit message:
Put back deleted V8_DEPRECATE_SOON methods
This partially reverts
https://chromium-review.googlesource.com/c/v8/v8/+/1177861,
which deleted many V8_DEPRECATE_SOON methods rather than moving them to
V8_DEPRECATED first. This puts them back and marks them V8_DEPRECATED.
Note V8_DEPRECATED that were deleted in the same CL stay deleted.
NOTRY=true
NOPRESUBMIT=true
NOTREECHECKS=true
Bug: v8:7786, v8:8240
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I00330036d957f98dab403465b25e30d8382aac22
Reviewed-on: https://chromium-review.googlesource.com/1251422
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Hablich <hablich@chromium.org>
Cr-Commit-Position: refs/branch-heads/7.0@{#49}
Cr-Branched-From: 6e2adae6f7f8e891cfd01f3280482b20590427a6-refs/heads/7.0.276@{#1}
Cr-Branched-From: bc08a8624cbbea7a2d30071472bc73ad9544eadf-refs/heads/master@{#55424}
Refs: https://github.com/v8/v8/commit/9136dd8088a95484b059a0301b25235510fc2882
Refs: https://github.com/nodejs/node/issues/23122
PR-URL: https://github.com/nodejs/node/pull/23158
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 3070f4aa50eed8722805feaf8d9b9db0d68fbbbf..784e1830edeebaf2b15eaad4230f318f91acad5f 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1125,10 +1125,6 @@ class V8_EXPORT PrimitiveArray {
int Length() const;
void Set(Isolate* isolate, int index, Local<Primitive> item);
Local<Primitive> Get(Isolate* isolate, int index);
-
- V8_DEPRECATED("Use Isolate version",
- void Set(int index, Local<Primitive> item));
- V8_DEPRECATED("Use Isolate version", Local<Primitive> Get(int index));
};
/**
@@ -1833,8 +1829,6 @@ class V8_EXPORT StackTrace {
/**
* Returns a StackFrame at a particular index.
*/
- V8_DEPRECATED("Use Isolate version",
- Local<StackFrame> GetFrame(uint32_t index) const);
Local<StackFrame> GetFrame(Isolate* isolate, uint32_t index) const;
/**
@@ -2543,11 +2537,6 @@ class V8_EXPORT Value : public Data {
V8_DEPRECATE_SOON("Use maybe version",
Local<Int32> ToInt32(Isolate* isolate) const);
- inline V8_DEPRECATED("Use maybe version", Local<Boolean> ToBoolean() const);
- inline V8_DEPRECATED("Use maybe version", Local<String> ToString() const);
- inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
- inline V8_DEPRECATED("Use maybe version", Local<Integer> ToInteger() const);
-
/**
* Attempts to convert a string to an array index.
* Returns an empty handle if the conversion fails.
@@ -2563,14 +2552,7 @@ class V8_EXPORT Value : public Data {
Local<Context> context) const;
V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
- V8_DEPRECATED("Use maybe version", bool BooleanValue() const);
- V8_DEPRECATED("Use maybe version", double NumberValue() const);
- V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const);
- V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);
- V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
-
/** JS == */
- V8_DEPRECATED("Use maybe version", bool Equals(Local<Value> that) const);
V8_WARN_UNUSED_RESULT Maybe<bool> Equals(Local<Context> context,
Local<Value> that) const;
bool StrictEquals(Local<Value> that) const;
@@ -2677,8 +2659,6 @@ class V8_EXPORT String : public Name {
* Returns the number of bytes in the UTF-8 encoded
* representation of this string.
*/
- V8_DEPRECATED("Use Isolate version instead", int Utf8Length() const);
-
int Utf8Length(Isolate* isolate) const;
/**
@@ -2735,23 +2715,12 @@ 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;
- V8_DEPRECATED("Use Isolate* version",
- int Write(uint16_t* buffer, int start = 0, int length = -1,
- int options = NO_OPTIONS) const);
// One byte characters.
int WriteOneByte(Isolate* isolate, uint8_t* buffer, int start = 0,
int length = -1, int options = NO_OPTIONS) const;
- V8_DEPRECATED("Use Isolate* version",
- int WriteOneByte(uint8_t* buffer, int start = 0,
- int length = -1, int options = NO_OPTIONS)
- const);
// UTF-8 encoded characters.
int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
int* nchars_ref = NULL, int options = NO_OPTIONS) const;
- V8_DEPRECATED("Use Isolate* version",
- int WriteUtf8(char* buffer, int length = -1,
- int* nchars_ref = NULL, int options = NO_OPTIONS)
- const);
/**
* A zero length string.
@@ -2915,9 +2884,6 @@ class V8_EXPORT String : public Name {
*/
static Local<String> Concat(Isolate* isolate, Local<String> left,
Local<String> right);
- static V8_DEPRECATED("Use Isolate* version",
- Local<String> Concat(Local<String> left,
- Local<String> right));
/**
* Creates a new external string using the data defined in the given
@@ -5258,8 +5224,6 @@ class V8_EXPORT BooleanObject : public Object {
class V8_EXPORT StringObject : public Object {
public:
static Local<Value> New(Isolate* isolate, Local<String> value);
- static V8_DEPRECATED("Use Isolate* version",
- Local<Value> New(Local<String> value));
Local<String> ValueOf() const;
@@ -10261,25 +10225,6 @@ template <class T> Value* Value::Cast(T* value) {
return static_cast<Value*>(value);
}
-Local<Boolean> Value::ToBoolean() const {
- return ToBoolean(Isolate::GetCurrent()->GetCurrentContext())
- .FromMaybe(Local<Boolean>());
-}
-
-Local<String> Value::ToString() const {
- return ToString(Isolate::GetCurrent()->GetCurrentContext())
- .FromMaybe(Local<String>());
-}
-
-Local<Object> Value::ToObject() const {
- return ToObject(Isolate::GetCurrent()->GetCurrentContext())
- .FromMaybe(Local<Object>());
-}
-
-Local<Integer> Value::ToInteger() const {
- return ToInteger(Isolate::GetCurrent()->GetCurrentContext())
- .FromMaybe(Local<Integer>());
-}
Boolean* Boolean::Cast(v8::Value* value) {
#ifdef V8_ENABLE_CHECKS
diff --git a/src/api.cc b/src/api.cc
index 8dca7ec88e59c775da5cf7e30721d064f349c634..7a53cc1370cf30c858fd87156e2eb75d4b57a60b 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -219,28 +219,6 @@ Local<Context> ContextFromNeverReadOnlySpaceObject(
return reinterpret_cast<v8::Isolate*>(obj->GetIsolate())->GetCurrentContext();
}
-// TODO(delphick): Remove this completely when the deprecated functions that use
-// it are removed.
-// DO NOT USE THIS IN NEW CODE!
-i::Isolate* UnsafeIsolateFromHeapObject(i::Handle<i::HeapObject> obj) {
- // Use MemoryChunk directly instead of Isolate::FromWritableHeapObject to
- // temporarily allow isolate access from read-only space objects.
- i::MemoryChunk* chunk = i::MemoryChunk::FromHeapObject(*obj);
- return chunk->heap()->isolate();
-}
-
-// TODO(delphick): Remove this completely when the deprecated functions that use
-// it are removed.
-// DO NOT USE THIS IN NEW CODE!
-Local<Context> UnsafeContextFromHeapObject(i::Handle<i::Object> obj) {
- // Use MemoryChunk directly instead of Isolate::FromWritableHeapObject to
- // temporarily allow isolate access from read-only space objects.
- i::MemoryChunk* chunk =
- i::MemoryChunk::FromHeapObject(i::HeapObject::cast(*obj));
- return reinterpret_cast<Isolate*>(chunk->heap()->isolate())
- ->GetCurrentContext();
-}
-
class InternalEscapableScope : public v8::EscapableHandleScope {
public:
explicit inline InternalEscapableScope(i::Isolate* isolate)
@@ -2196,12 +2174,6 @@ void PrimitiveArray::Set(Isolate* v8_isolate, int index,
array->set(index, *i_item);
}
-void PrimitiveArray::Set(int index, Local<Primitive> item) {
- i::Handle<i::FixedArray> array = Utils::OpenHandle(this);
- i::Isolate* isolate = UnsafeIsolateFromHeapObject(array);
- Set(reinterpret_cast<Isolate*>(isolate), index, item);
-}
-
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);
@@ -2214,12 +2186,6 @@ Local<Primitive> PrimitiveArray::Get(Isolate* v8_isolate, int index) {
return ToApiHandle<Primitive>(i_item);
}
-Local<Primitive> PrimitiveArray::Get(int index) {
- i::Handle<i::FixedArray> array = Utils::OpenHandle(this);
- i::Isolate* isolate = UnsafeIsolateFromHeapObject(array);
- return Get(reinterpret_cast<Isolate*>(isolate), index);
-}
-
Module::Status Module::GetStatus() const {
i::Handle<i::Module> self = Utils::OpenHandle(this);
switch (self->status()) {
@@ -2948,11 +2914,6 @@ Local<StackFrame> StackTrace::GetFrame(Isolate* v8_isolate,
return scope.Escape(Utils::StackFrameToLocal(info));
}
-Local<StackFrame> StackTrace::GetFrame(uint32_t index) const {
- i::Isolate* isolate = UnsafeIsolateFromHeapObject(Utils::OpenHandle(this));
- return GetFrame(reinterpret_cast<Isolate*>(isolate), index);
-}
-
int StackTrace::GetFrameCount() const {
return Utils::OpenHandle(this)->length();
}
@@ -3924,14 +3885,6 @@ Maybe<bool> Value::BooleanValue(Local<Context> context) const {
return Just(Utils::OpenHandle(this)->BooleanValue(isolate));
}
-bool Value::BooleanValue() const {
- auto obj = Utils::OpenHandle(this);
- if (obj->IsSmi()) return *obj != i::Smi::kZero;
- DCHECK(obj->IsHeapObject());
- i::Isolate* isolate =
- UnsafeIsolateFromHeapObject(i::Handle<i::HeapObject>::cast(obj));
- return obj->BooleanValue(isolate);
-}
Maybe<double> Value::NumberValue(Local<Context> context) const {
auto obj = Utils::OpenHandle(this);
@@ -3945,12 +3898,6 @@ Maybe<double> Value::NumberValue(Local<Context> context) const {
return Just(num->Number());
}
-double Value::NumberValue() const {
- auto obj = Utils::OpenHandle(this);
- if (obj->IsNumber()) return obj->Number();
- return NumberValue(UnsafeContextFromHeapObject(obj))
- .FromMaybe(std::numeric_limits<double>::quiet_NaN());
-}
Maybe<int64_t> Value::IntegerValue(Local<Context> context) const {
auto obj = Utils::OpenHandle(this);
@@ -3966,17 +3913,6 @@ Maybe<int64_t> Value::IntegerValue(Local<Context> context) const {
return Just(NumberToInt64(*num));
}
-int64_t Value::IntegerValue() const {
- auto obj = Utils::OpenHandle(this);
- if (obj->IsNumber()) {
- if (obj->IsSmi()) {
- return i::Smi::ToInt(*obj);
- } else {
- return static_cast<int64_t>(obj->Number());
- }
- }
- return IntegerValue(UnsafeContextFromHeapObject(obj)).FromMaybe(0);
-}
Maybe<int32_t> Value::Int32Value(Local<Context> context) const {
auto obj = Utils::OpenHandle(this);
@@ -3991,11 +3927,6 @@ Maybe<int32_t> Value::Int32Value(Local<Context> context) const {
: static_cast<int32_t>(num->Number()));
}
-int32_t Value::Int32Value() const {
- auto obj = Utils::OpenHandle(this);
- if (obj->IsNumber()) return NumberToInt32(*obj);
- return Int32Value(UnsafeContextFromHeapObject(obj)).FromMaybe(0);
-}
Maybe<uint32_t> Value::Uint32Value(Local<Context> context) const {
auto obj = Utils::OpenHandle(this);
@@ -4010,11 +3941,6 @@ Maybe<uint32_t> Value::Uint32Value(Local<Context> context) const {
: static_cast<uint32_t>(num->Number()));
}
-uint32_t Value::Uint32Value() const {
- auto obj = Utils::OpenHandle(this);
- if (obj->IsNumber()) return NumberToUint32(*obj);
- return Uint32Value(UnsafeContextFromHeapObject(obj)).FromMaybe(0);
-}
MaybeLocal<Uint32> Value::ToArrayIndex(Local<Context> context) const {
auto self = Utils::OpenHandle(this);
@@ -4049,19 +3975,6 @@ Maybe<bool> Value::Equals(Local<Context> context, Local<Value> that) const {
return i::Object::Equals(isolate, self, other);
}
-bool Value::Equals(Local<Value> that) const {
- auto self = Utils::OpenHandle(this);
- auto other = Utils::OpenHandle(*that);
- if (self->IsSmi() && other->IsSmi()) {
- return self->Number() == other->Number();
- }
- if (self->IsJSObject() && other->IsJSObject()) {
- return *self == *other;
- }
- auto heap_object = self->IsSmi() ? other : self;
- auto context = UnsafeContextFromHeapObject(heap_object);
- return Equals(context, that).FromMaybe(false);
-}
bool Value::StrictEquals(Local<Value> that) const {
auto self = Utils::OpenHandle(this);
@@ -5386,11 +5299,6 @@ bool String::ContainsOnlyOneByte() const {
return helper.Check(*str);
}
-int String::Utf8Length() const {
- i::Isolate* isolate = UnsafeIsolateFromHeapObject(Utils::OpenHandle(this));
- return Utf8Length(reinterpret_cast<Isolate*>(isolate));
-}
-
int String::Utf8Length(Isolate* isolate) const {
i::Handle<i::String> str = Utils::OpenHandle(this);
str = i::String::Flatten(reinterpret_cast<i::Isolate*>(isolate), str);
@@ -5659,14 +5567,6 @@ int String::WriteUtf8(Isolate* v8_isolate, char* buffer, int capacity,
return writer.CompleteWrite(write_null, nchars_ref);
}
-int String::WriteUtf8(char* buffer, int capacity, int* nchars_ref,
- int options) const {
- i::Handle<i::String> str = Utils::OpenHandle(this);
- i::Isolate* isolate = UnsafeIsolateFromHeapObject(str);
- return WriteUtf8(reinterpret_cast<Isolate*>(isolate), buffer, capacity,
- nchars_ref, options);
-}
-
template <typename CharType>
static inline int WriteHelper(i::Isolate* isolate, const String* string,
CharType* buffer, int start, int length,
@@ -5688,11 +5588,6 @@ static inline int WriteHelper(i::Isolate* isolate, const String* string,
return end - start;
}
-int String::WriteOneByte(uint8_t* buffer, int start, int length,
- int options) const {
- i::Isolate* isolate = UnsafeIsolateFromHeapObject(Utils::OpenHandle(this));
- return WriteHelper(isolate, this, buffer, start, length, options);
-}
int String::WriteOneByte(Isolate* isolate, uint8_t* buffer, int start,
int length, int options) const {
@@ -5700,10 +5595,6 @@ int String::WriteOneByte(Isolate* isolate, uint8_t* buffer, int start,
start, length, options);
}
-int String::Write(uint16_t* buffer, int start, int length, int options) const {
- i::Isolate* isolate = UnsafeIsolateFromHeapObject(Utils::OpenHandle(this));
- return WriteHelper(isolate, this, buffer, start, length, options);
-}
int String::Write(Isolate* isolate, uint16_t* buffer, int start, int length,
int options) const {
@@ -6662,12 +6553,6 @@ Local<String> v8::String::Concat(Isolate* v8_isolate, Local<String> left,
return Utils::ToLocal(result);
}
-Local<String> v8::String::Concat(Local<String> left, Local<String> right) {
- i::Handle<i::String> left_string = Utils::OpenHandle(*left);
- i::Isolate* isolate = UnsafeIsolateFromHeapObject(left_string);
- return Concat(reinterpret_cast<Isolate*>(isolate), left, right);
-}
-
MaybeLocal<String> v8::String::NewExternalTwoByte(
Isolate* isolate, v8::String::ExternalStringResource* resource) {
CHECK(resource && resource->data());
@@ -6876,11 +6761,6 @@ bool v8::BooleanObject::ValueOf() const {
return jsvalue->value()->IsTrue(isolate);
}
-Local<v8::Value> v8::StringObject::New(Local<String> value) {
- i::Handle<i::String> string = Utils::OpenHandle(*value);
- i::Isolate* isolate = UnsafeIsolateFromHeapObject(string);
- return New(reinterpret_cast<Isolate*>(isolate), value);
-}
Local<v8::Value> v8::StringObject::New(Isolate* v8_isolate,
Local<String> value) {

View file

@ -4,16 +4,16 @@ Date: Mon, 19 Nov 2018 18:33:56 -0500
Subject: Do not run arm/arm64 mksnapshot binaries
For arm and arm64 target_arches, Chromium builds mksnapshot as an x64 binary and
as part of that build mksnapshot is executed to produce snapshot_blob.bin.
Chromium does not build native arm and arm64 binaries of mksnapshot, but
Electron does, so this patch makes sure that the build doesn't try to run
as part of that build mksnapshot is executed to produce snapshot_blob.bin.
Chromium does not build native arm and arm64 binaries of mksnapshot, but
Electron does, so this patch makes sure that the build doesn't try to run
the mksnapshot binary if it was built for arm or arm64.
diff --git a/BUILD.gn b/BUILD.gn
index b1194e4b828e66d8d09fac57481efe313031f3ac..c256945650c24324c28a2e17fb299a1d0c2dcd19 100644
index 1f9dd022ac804e58263f527af5a47768c882de40..d40848056235b9a8307533c8b1e238aecf18207d 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1247,9 +1247,19 @@ if (v8_use_snapshot && v8_use_external_startup_data) {
@@ -1286,9 +1286,19 @@ if (v8_use_snapshot && v8_use_external_startup_data) {
]
public_deps = [
":natives_blob",

View file

@ -6,7 +6,7 @@ Subject: export_platform.patch
v8::Platform::SystemClockTimeMillis must be exported so that node::NodePlatform can call it
diff --git a/include/v8-platform.h b/include/v8-platform.h
index cfeb13b65829f9e0bad2518b8c4b03a645b6223c..2b38e24e233b5ba7061fd4a3d5e49063b0165f11 100644
index d983c30249591bd05b760dbae6a1afb413c7d021..183d77e55619970644868747fab26d250f790c3c 100644
--- a/include/v8-platform.h
+++ b/include/v8-platform.h
@@ -11,6 +11,7 @@
@ -17,7 +17,7 @@ index cfeb13b65829f9e0bad2518b8c4b03a645b6223c..2b38e24e233b5ba7061fd4a3d5e49063
#include "v8config.h" // NOLINT(build/include)
namespace v8 {
@@ -387,7 +388,7 @@ class Platform {
@@ -394,7 +395,7 @@ class Platform {
* since epoch. Useful for implementing |CurrentClockTimeMillis| if
* nothing special needed.
*/

View file

@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch
Needed in order to build mksnapshot on arm.
diff --git a/BUILD.gn b/BUILD.gn
index ac74cdec115b6cc54d05817f063153628cf5e9fe..c1b08958b500da1910a8067198cdec7650534f20 100644
index 5489b943f1d8bb8ffc02cabf4e0a15788c7d4e48..1f9dd022ac804e58263f527af5a47768c882de40 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -3237,8 +3237,6 @@ if (v8_monolithic) {
@@ -3355,8 +3355,6 @@ if (current_toolchain == v8_generator_toolchain) {
if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
v8_executable("mksnapshot") {

View file

@ -5,10 +5,10 @@ Subject: ostreams.patch
diff --git a/src/ostreams.h b/src/ostreams.h
index c6b64a1cd95b92ed37abe56d71dd6132c4ff9db4..236a73d01800f58a4f37c8abdd8df346d8fcf2c5 100644
index 189f5384b99438f3dad1d77a0836ceb45f6ed938..83a5930d4bd690dde01749bcd88acb11d75aa0cb 100644
--- a/src/ostreams.h
+++ b/src/ostreams.h
@@ -32,7 +32,7 @@ class OFStreamBase : public std::streambuf {
@@ -32,7 +32,7 @@ class V8_EXPORT_PRIVATE OFStreamBase : public std::streambuf {
};
// An output stream writing to a file.
@ -16,4 +16,4 @@ index c6b64a1cd95b92ed37abe56d71dd6132c4ff9db4..236a73d01800f58a4f37c8abdd8df346
+class V8_EXPORT_PRIVATE OFStream : public NON_EXPORTED_BASE(std::ostream) {
public:
explicit OFStream(FILE* f);
virtual ~OFStream();
~OFStream() override = default;