update v8, ffmpeg, chromium, crashpad, boringssl, and webrtc patches
This commit is contained in:
parent
d5e9b662f8
commit
6f2f761df3
90 changed files with 7411 additions and 7874 deletions
|
@ -1,9 +1,5 @@
|
|||
repo: src/third_party/boringssl/src
|
||||
patches:
|
||||
-
|
||||
author: Jeremy Apthorp <nornagon@nornagon.net>
|
||||
file: 0001-Implement-legacy-OCSP-APIs-for-libssl.patch
|
||||
description: see patch header
|
||||
-
|
||||
author: Aleksei Kuzmin <alkuzmin@microsoft.com>
|
||||
file: implement-SSL_get_tlsext_status_type.patch
|
||||
|
|
|
@ -1,741 +0,0 @@
|
|||
From 81d4909d00c3628453a8712bc331304bd01d8eaf Mon Sep 17 00:00:00 2001
|
||||
From: David Benjamin <davidben@google.com>
|
||||
Date: Thu, 10 May 2018 19:55:02 -0400
|
||||
Subject: [PATCH] Implement legacy OCSP APIs for libssl.
|
||||
|
||||
Previously, we'd omitted OpenSSL's OCSP APIs because they depend on a
|
||||
complex OCSP mechanism and encourage the the unreliable server behavior
|
||||
that hampers using OCSP stapling to fix revocation today. (OCSP
|
||||
responses should not be fetched on-demand on a callback. They should be
|
||||
managed like other server credentials and refreshed eagerly, so
|
||||
temporary CA outage does not translate to loss of OCSP.)
|
||||
|
||||
But most of the APIs are byte-oriented anyway, so they're easy to
|
||||
support. Intentionally omit the one that takes a bunch of OCSP_RESPIDs.
|
||||
|
||||
The callback is benign on the client (an artifact of OpenSSL reading
|
||||
OCSP and verifying certificates in the wrong order). On the server, it
|
||||
encourages unreliability, but pyOpenSSL/cryptography.io depends on this.
|
||||
Dcument that this is only for compatibility with legacy software.
|
||||
|
||||
Also tweak a few things for compatilibility. cryptography.io expects
|
||||
SSL_CTX_set_read_ahead to return something, SSL_get_server_tmp_key's
|
||||
signature was wrong, and cryptography.io tries to redefine
|
||||
SSL_get_server_tmp_key if SSL_CTRL_GET_SERVER_TMP_KEY is missing.
|
||||
|
||||
Change-Id: I2f99711783456bfb7324e9ad972510be8a95e845
|
||||
Reviewed-on: https://boringssl-review.googlesource.com/28404
|
||||
Commit-Queue: David Benjamin <davidben@google.com>
|
||||
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
|
||||
Reviewed-by: Adam Langley <agl@google.com>
|
||||
---
|
||||
crypto/err/ssl.errordata | 1 +
|
||||
include/openssl/ssl.h | 64 +++++++++++++--
|
||||
include/openssl/tls1.h | 1 +
|
||||
ssl/handshake.cc | 16 ++++
|
||||
ssl/handshake_server.cc | 16 ++++
|
||||
ssl/internal.h | 5 ++
|
||||
ssl/ssl_lib.cc | 39 ++++++++-
|
||||
ssl/test/bssl_shim.cc | 26 ++++++
|
||||
ssl/test/runner/alert.go | 122 +++++++++++++--------------
|
||||
ssl/test/runner/runner.go | 205 ++++++++++++++++++++++++++++++++++------------
|
||||
ssl/test/test_config.cc | 4 +
|
||||
ssl/test/test_config.h | 4 +
|
||||
12 files changed, 381 insertions(+), 122 deletions(-)
|
||||
|
||||
diff --git a/crypto/err/ssl.errordata b/crypto/err/ssl.errordata
|
||||
index 7b63bc8..375df9a 100644
|
||||
--- a/crypto/err/ssl.errordata
|
||||
+++ b/crypto/err/ssl.errordata
|
||||
@@ -108,6 +108,7 @@ SSL,266,NO_SHARED_GROUP
|
||||
SSL,280,NO_SUPPORTED_VERSIONS_ENABLED
|
||||
SSL,185,NULL_SSL_CTX
|
||||
SSL,186,NULL_SSL_METHOD_PASSED
|
||||
+SSL,289,OCSP_CB_ERROR
|
||||
SSL,187,OLD_SESSION_CIPHER_NOT_RETURNED
|
||||
SSL,268,OLD_SESSION_PRF_HASH_MISMATCH
|
||||
SSL,188,OLD_SESSION_VERSION_NOT_RETURNED
|
||||
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
|
||||
index 35506f7..d46a5af 100644
|
||||
--- a/include/openssl/ssl.h
|
||||
+++ b/include/openssl/ssl.h
|
||||
@@ -3715,14 +3715,14 @@ OPENSSL_EXPORT int SSL_set_tmp_rsa(SSL *ssl, const RSA *rsa);
|
||||
// SSL_CTX_get_read_ahead returns zero.
|
||||
OPENSSL_EXPORT int SSL_CTX_get_read_ahead(const SSL_CTX *ctx);
|
||||
|
||||
-// SSL_CTX_set_read_ahead does nothing.
|
||||
-OPENSSL_EXPORT void SSL_CTX_set_read_ahead(SSL_CTX *ctx, int yes);
|
||||
+// SSL_CTX_set_read_ahead returns one.
|
||||
+OPENSSL_EXPORT int SSL_CTX_set_read_ahead(SSL_CTX *ctx, int yes);
|
||||
|
||||
// SSL_get_read_ahead returns zero.
|
||||
OPENSSL_EXPORT int SSL_get_read_ahead(const SSL *ssl);
|
||||
|
||||
-// SSL_set_read_ahead does nothing.
|
||||
-OPENSSL_EXPORT void SSL_set_read_ahead(SSL *ssl, int yes);
|
||||
+// SSL_set_read_ahead returns one.
|
||||
+OPENSSL_EXPORT int SSL_set_read_ahead(SSL *ssl, int yes);
|
||||
|
||||
// SSL_renegotiate put an error on the error queue and returns zero.
|
||||
OPENSSL_EXPORT int SSL_renegotiate(SSL *ssl);
|
||||
@@ -3793,7 +3793,7 @@ OPENSSL_EXPORT const COMP_METHOD *SSL_get_current_compression(SSL *ssl);
|
||||
OPENSSL_EXPORT const COMP_METHOD *SSL_get_current_expansion(SSL *ssl);
|
||||
|
||||
// SSL_get_server_tmp_key returns zero.
|
||||
-OPENSSL_EXPORT int *SSL_get_server_tmp_key(SSL *ssl, EVP_PKEY **out_key);
|
||||
+OPENSSL_EXPORT int SSL_get_server_tmp_key(SSL *ssl, EVP_PKEY **out_key);
|
||||
|
||||
// SSL_CTX_set_tmp_dh returns 1.
|
||||
OPENSSL_EXPORT int SSL_CTX_set_tmp_dh(SSL_CTX *ctx, const DH *dh);
|
||||
@@ -4108,6 +4108,58 @@ extern "C++" OPENSSL_EXPORT void SSL_CTX_sess_set_get_cb(
|
||||
int id_len, int *out_copy));
|
||||
#endif
|
||||
|
||||
+// SSL_set_tlsext_status_type configures a client to request OCSP stapling if
|
||||
+// |type| is |TLSEXT_STATUSTYPE_ocsp| and disables it otherwise. It returns one
|
||||
+// on success and zero if handshake configuration has already been shed.
|
||||
+//
|
||||
+// Use |SSL_enable_ocsp_stapling| instead.
|
||||
+OPENSSL_EXPORT int SSL_set_tlsext_status_type(SSL *ssl, int type);
|
||||
+
|
||||
+// SSL_set_tlsext_status_ocsp_resp sets the OCSP response. It returns one on
|
||||
+// success and zero on error. On success, |ssl| takes ownership of |resp|, which
|
||||
+// must have been allocated by |OPENSSL_malloc|.
|
||||
+//
|
||||
+// Use |SSL_set_ocsp_response| instead.
|
||||
+OPENSSL_EXPORT int SSL_set_tlsext_status_ocsp_resp(SSL *ssl, uint8_t *resp,
|
||||
+ size_t resp_len);
|
||||
+
|
||||
+// SSL_get_tlsext_status_ocsp_resp sets |*out| to point to the OCSP response
|
||||
+// from the server. It returns the length of the response. If there was no
|
||||
+// response, it sets |*out| to NULL and returns zero.
|
||||
+//
|
||||
+// Use |SSL_get0_ocsp_response| instead.
|
||||
+//
|
||||
+// WARNING: the returned data is not guaranteed to be well formed.
|
||||
+OPENSSL_EXPORT size_t SSL_get_tlsext_status_ocsp_resp(const SSL *ssl,
|
||||
+ const uint8_t **out);
|
||||
+
|
||||
+// SSL_CTX_set_tlsext_status_cb configures the legacy OpenSSL OCSP callback and
|
||||
+// returns one. Though the type signature is the same, this callback has
|
||||
+// different behavior for client and server connections:
|
||||
+//
|
||||
+// For clients, the callback is called after certificate verification. It should
|
||||
+// return one for success, zero for a bad OCSP response, and a negative number
|
||||
+// for internal error. Instead, handle this as part of certificate verification.
|
||||
+// (Historically, OpenSSL verified certificates just before parsing stapled OCSP
|
||||
+// responses, but BoringSSL fixes this ordering. All server credentials are
|
||||
+// available during verification.)
|
||||
+//
|
||||
+// Do not use this callback as a server. It is provided for compatibility
|
||||
+// purposes only. For servers, it is called to configure server credentials. It
|
||||
+// should return |SSL_TLSEXT_ERR_OK| on success, |SSL_TLSEXT_ERR_NOACK| to
|
||||
+// ignore OCSP requests, or |SSL_TLSEXT_ERR_ALERT_FATAL| on error. It is usually
|
||||
+// used to fetch OCSP responses on demand, which is not ideal. Instead, treat
|
||||
+// OCSP responses like other server credentials, such as certificates or SCT
|
||||
+// lists. Configure, store, and refresh them eagerly. This avoids downtime if
|
||||
+// the CA's OCSP responder is briefly offline.
|
||||
+OPENSSL_EXPORT int SSL_CTX_set_tlsext_status_cb(SSL_CTX *ctx,
|
||||
+ int (*callback)(SSL *ssl,
|
||||
+ void *arg));
|
||||
+
|
||||
+// SSL_CTX_set_tlsext_status_arg sets additional data for
|
||||
+// |SSL_CTX_set_tlsext_status_cb|'s callback and returns one.
|
||||
+OPENSSL_EXPORT int SSL_CTX_set_tlsext_status_arg(SSL_CTX *ctx, void *arg);
|
||||
+
|
||||
|
||||
// Private structures.
|
||||
//
|
||||
@@ -4285,6 +4337,7 @@ struct ssl_session_st {
|
||||
#define SSL_CTRL_GET_NUM_RENEGOTIATIONS doesnt_exist
|
||||
#define SSL_CTRL_GET_READ_AHEAD doesnt_exist
|
||||
#define SSL_CTRL_GET_RI_SUPPORT doesnt_exist
|
||||
+#define SSL_CTRL_GET_SERVER_TMP_KEY doesnt_exist
|
||||
#define SSL_CTRL_GET_SESSION_REUSED doesnt_exist
|
||||
#define SSL_CTRL_GET_SESS_CACHE_MODE doesnt_exist
|
||||
#define SSL_CTRL_GET_SESS_CACHE_SIZE doesnt_exist
|
||||
@@ -4698,6 +4751,7 @@ OPENSSL_EXPORT bool SSL_apply_handback(SSL *ssl, Span<const uint8_t> handback);
|
||||
#define SSL_R_NEGOTIATED_TB_WITHOUT_EMS_OR_RI 285
|
||||
#define SSL_R_SERVER_ECHOED_INVALID_SESSION_ID 286
|
||||
#define SSL_R_PRIVATE_KEY_OPERATION_FAILED 287
|
||||
+#define SSL_R_OCSP_CB_ERROR 289
|
||||
#define SSL_R_SSLV3_ALERT_CLOSE_NOTIFY 1000
|
||||
#define SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE 1010
|
||||
#define SSL_R_SSLV3_ALERT_BAD_RECORD_MAC 1020
|
||||
diff --git a/include/openssl/tls1.h b/include/openssl/tls1.h
|
||||
index 3424f3d..7a05969 100644
|
||||
--- a/include/openssl/tls1.h
|
||||
+++ b/include/openssl/tls1.h
|
||||
@@ -237,6 +237,7 @@ extern "C" {
|
||||
#define TLSEXT_TYPE_dummy_pq_padding 54537
|
||||
|
||||
// status request value from RFC 3546
|
||||
+#define TLSEXT_STATUSTYPE_nothing (-1)
|
||||
#define TLSEXT_STATUSTYPE_ocsp 1
|
||||
|
||||
// ECPointFormat values from RFC 4492
|
||||
diff --git a/ssl/handshake.cc b/ssl/handshake.cc
|
||||
index 6432424..0a90b9f 100644
|
||||
--- a/ssl/handshake.cc
|
||||
+++ b/ssl/handshake.cc
|
||||
@@ -356,6 +356,22 @@ enum ssl_verify_result_t ssl_verify_peer_cert(SSL_HANDSHAKE *hs) {
|
||||
ssl_send_alert(ssl, SSL3_AL_FATAL, alert);
|
||||
}
|
||||
|
||||
+ // Emulate OpenSSL's client OCSP callback. OpenSSL verifies certificates
|
||||
+ // before it receives the OCSP, so it needs a second callback for OCSP.
|
||||
+ if (ret == ssl_verify_ok && !ssl->server &&
|
||||
+ hs->new_session->ocsp_response != nullptr &&
|
||||
+ ssl->ctx->legacy_ocsp_callback != nullptr) {
|
||||
+ int cb_ret =
|
||||
+ ssl->ctx->legacy_ocsp_callback(ssl, ssl->ctx->legacy_ocsp_callback_arg);
|
||||
+ if (cb_ret <= 0) {
|
||||
+ OPENSSL_PUT_ERROR(SSL, SSL_R_OCSP_CB_ERROR);
|
||||
+ ssl_send_alert(ssl, SSL3_AL_FATAL,
|
||||
+ cb_ret == 0 ? SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE
|
||||
+ : SSL_AD_INTERNAL_ERROR);
|
||||
+ ret = ssl_verify_invalid;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
|
||||
diff --git a/ssl/handshake_server.cc b/ssl/handshake_server.cc
|
||||
index fa8a241..7a96767 100644
|
||||
--- a/ssl/handshake_server.cc
|
||||
+++ b/ssl/handshake_server.cc
|
||||
@@ -534,6 +534,22 @@ static enum ssl_hs_wait_t do_select_certificate(SSL_HANDSHAKE *hs) {
|
||||
return ssl_hs_error;
|
||||
}
|
||||
|
||||
+ if (hs->ocsp_stapling_requested &&
|
||||
+ ssl->ctx->legacy_ocsp_callback != nullptr) {
|
||||
+ switch (ssl->ctx->legacy_ocsp_callback(
|
||||
+ ssl, ssl->ctx->legacy_ocsp_callback_arg)) {
|
||||
+ case SSL_TLSEXT_ERR_OK:
|
||||
+ break;
|
||||
+ case SSL_TLSEXT_ERR_NOACK:
|
||||
+ hs->ocsp_stapling_requested = false;
|
||||
+ break;
|
||||
+ default:
|
||||
+ OPENSSL_PUT_ERROR(SSL, SSL_R_OCSP_CB_ERROR);
|
||||
+ ssl_send_alert(ssl, SSL3_AL_FATAL, SSL_AD_INTERNAL_ERROR);
|
||||
+ return ssl_hs_error;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (ssl_protocol_version(ssl) >= TLS1_3_VERSION) {
|
||||
// Jump to the TLS 1.3 state machine.
|
||||
hs->state = state_tls13;
|
||||
diff --git a/ssl/internal.h b/ssl/internal.h
|
||||
index d13d5f2..1cdfb8e 100644
|
||||
--- a/ssl/internal.h
|
||||
+++ b/ssl/internal.h
|
||||
@@ -2140,6 +2140,11 @@ struct SSLContext {
|
||||
// session tickets.
|
||||
const SSL_TICKET_AEAD_METHOD *ticket_aead_method;
|
||||
|
||||
+ // legacy_ocsp_callback implements an OCSP-related callback for OpenSSL
|
||||
+ // compatibility.
|
||||
+ int (*legacy_ocsp_callback)(SSL *ssl, void *arg);
|
||||
+ void *legacy_ocsp_callback_arg;
|
||||
+
|
||||
// verify_sigalgs, if not empty, is the set of signature algorithms
|
||||
// accepted from the peer in decreasing order of preference.
|
||||
uint16_t *verify_sigalgs;
|
||||
diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
|
||||
index 9f56d54..50608e9 100644
|
||||
--- a/ssl/ssl_lib.cc
|
||||
+++ b/ssl/ssl_lib.cc
|
||||
@@ -1591,9 +1591,9 @@ int SSL_CTX_get_read_ahead(const SSL_CTX *ctx) { return 0; }
|
||||
|
||||
int SSL_get_read_ahead(const SSL *ssl) { return 0; }
|
||||
|
||||
-void SSL_CTX_set_read_ahead(SSL_CTX *ctx, int yes) { }
|
||||
+int SSL_CTX_set_read_ahead(SSL_CTX *ctx, int yes) { return 1; }
|
||||
|
||||
-void SSL_set_read_ahead(SSL *ssl, int yes) { }
|
||||
+int SSL_set_read_ahead(SSL *ssl, int yes) { return 1; }
|
||||
|
||||
int SSL_pending(const SSL *ssl) {
|
||||
return static_cast<int>(ssl->s3->pending_app_data.size());
|
||||
@@ -2205,7 +2205,7 @@ const COMP_METHOD *SSL_get_current_compression(SSL *ssl) { return NULL; }
|
||||
|
||||
const COMP_METHOD *SSL_get_current_expansion(SSL *ssl) { return NULL; }
|
||||
|
||||
-int *SSL_get_server_tmp_key(SSL *ssl, EVP_PKEY **out_key) { return 0; }
|
||||
+int SSL_get_server_tmp_key(SSL *ssl, EVP_PKEY **out_key) { return 0; }
|
||||
|
||||
void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode) {
|
||||
ctx->quiet_shutdown = (mode != 0);
|
||||
@@ -2717,3 +2717,33 @@ void SSL_CTX_set_ticket_aead_method(SSL_CTX *ctx,
|
||||
const SSL_TICKET_AEAD_METHOD *aead_method) {
|
||||
ctx->ticket_aead_method = aead_method;
|
||||
}
|
||||
+
|
||||
+int SSL_set_tlsext_status_type(SSL *ssl, int type) {
|
||||
+ ssl->ocsp_stapling_enabled = type == TLSEXT_STATUSTYPE_ocsp;
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+int SSL_set_tlsext_status_ocsp_resp(SSL *ssl, uint8_t *resp, size_t resp_len) {
|
||||
+ if (SSL_set_ocsp_response(ssl, resp, resp_len)) {
|
||||
+ OPENSSL_free(resp);
|
||||
+ return 1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+size_t SSL_get_tlsext_status_ocsp_resp(const SSL *ssl, const uint8_t **out) {
|
||||
+ size_t ret;
|
||||
+ SSL_get0_ocsp_response(ssl, out, &ret);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+int SSL_CTX_set_tlsext_status_cb(SSL_CTX *ctx,
|
||||
+ int (*callback)(SSL *ssl, void *arg)) {
|
||||
+ ctx->legacy_ocsp_callback = callback;
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+int SSL_CTX_set_tlsext_status_arg(SSL_CTX *ctx, void *arg) {
|
||||
+ ctx->legacy_ocsp_callback_arg = arg;
|
||||
+ return 1;
|
||||
+}
|
||||
diff --git a/ssl/test/bssl_shim.cc b/ssl/test/bssl_shim.cc
|
||||
index ae26ded..3a33d60 100644
|
||||
--- a/ssl/test/bssl_shim.cc
|
||||
+++ b/ssl/test/bssl_shim.cc
|
||||
@@ -495,6 +495,7 @@ static bool GetCertificate(SSL *ssl, bssl::UniquePtr<X509> *out_x509,
|
||||
return false;
|
||||
}
|
||||
if (!config->ocsp_response.empty() &&
|
||||
+ !config->set_ocsp_in_callback &&
|
||||
!SSL_set_ocsp_response(ssl, (const uint8_t *)config->ocsp_response.data(),
|
||||
config->ocsp_response.size())) {
|
||||
return false;
|
||||
@@ -1100,6 +1101,27 @@ static void MessageCallback(int is_write, int version, int content_type,
|
||||
}
|
||||
}
|
||||
|
||||
+static int LegacyOCSPCallback(SSL *ssl, void *arg) {
|
||||
+ const TestConfig *config = GetTestConfig(ssl);
|
||||
+ if (!SSL_is_server(ssl)) {
|
||||
+ return !config->fail_ocsp_callback;
|
||||
+ }
|
||||
+
|
||||
+ if (!config->ocsp_response.empty() &&
|
||||
+ config->set_ocsp_in_callback &&
|
||||
+ !SSL_set_ocsp_response(ssl, (const uint8_t *)config->ocsp_response.data(),
|
||||
+ config->ocsp_response.size())) {
|
||||
+ return SSL_TLSEXT_ERR_ALERT_FATAL;
|
||||
+ }
|
||||
+ if (config->fail_ocsp_callback) {
|
||||
+ return SSL_TLSEXT_ERR_ALERT_FATAL;
|
||||
+ }
|
||||
+ if (config->decline_ocsp_callback) {
|
||||
+ return SSL_TLSEXT_ERR_NOACK;
|
||||
+ }
|
||||
+ return SSL_TLSEXT_ERR_OK;
|
||||
+}
|
||||
+
|
||||
// Connect returns a new socket connected to localhost on |port| or -1 on
|
||||
// error.
|
||||
static int Connect(uint16_t port) {
|
||||
@@ -1334,6 +1356,10 @@ static bssl::UniquePtr<SSL_CTX> SetupCtx(SSL_CTX *old_ctx,
|
||||
SSL_CTX_set_false_start_allowed_without_alpn(ssl_ctx.get(), 1);
|
||||
}
|
||||
|
||||
+ if (config->use_ocsp_callback) {
|
||||
+ SSL_CTX_set_tlsext_status_cb(ssl_ctx.get(), LegacyOCSPCallback);
|
||||
+ }
|
||||
+
|
||||
if (old_ctx) {
|
||||
uint8_t keys[48];
|
||||
if (!SSL_CTX_get_tlsext_ticket_keys(old_ctx, &keys, sizeof(keys)) ||
|
||||
diff --git a/ssl/test/runner/alert.go b/ssl/test/runner/alert.go
|
||||
index 652e9ee..c79725e 100644
|
||||
--- a/ssl/test/runner/alert.go
|
||||
+++ b/ssl/test/runner/alert.go
|
||||
@@ -15,69 +15,71 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
- alertCloseNotify alert = 0
|
||||
- alertEndOfEarlyData alert = 1
|
||||
- alertUnexpectedMessage alert = 10
|
||||
- alertBadRecordMAC alert = 20
|
||||
- alertDecryptionFailed alert = 21
|
||||
- alertRecordOverflow alert = 22
|
||||
- alertDecompressionFailure alert = 30
|
||||
- alertHandshakeFailure alert = 40
|
||||
- alertNoCertificate alert = 41
|
||||
- alertBadCertificate alert = 42
|
||||
- alertUnsupportedCertificate alert = 43
|
||||
- alertCertificateRevoked alert = 44
|
||||
- alertCertificateExpired alert = 45
|
||||
- alertCertificateUnknown alert = 46
|
||||
- alertIllegalParameter alert = 47
|
||||
- alertUnknownCA alert = 48
|
||||
- alertAccessDenied alert = 49
|
||||
- alertDecodeError alert = 50
|
||||
- alertDecryptError alert = 51
|
||||
- alertProtocolVersion alert = 70
|
||||
- alertInsufficientSecurity alert = 71
|
||||
- alertInternalError alert = 80
|
||||
- alertInappropriateFallback alert = 86
|
||||
- alertUserCanceled alert = 90
|
||||
- alertNoRenegotiation alert = 100
|
||||
- alertMissingExtension alert = 109
|
||||
- alertUnsupportedExtension alert = 110
|
||||
- alertUnrecognizedName alert = 112
|
||||
- alertUnknownPSKIdentity alert = 115
|
||||
- alertCertificateRequired alert = 116
|
||||
+ alertCloseNotify alert = 0
|
||||
+ alertEndOfEarlyData alert = 1
|
||||
+ alertUnexpectedMessage alert = 10
|
||||
+ alertBadRecordMAC alert = 20
|
||||
+ alertDecryptionFailed alert = 21
|
||||
+ alertRecordOverflow alert = 22
|
||||
+ alertDecompressionFailure alert = 30
|
||||
+ alertHandshakeFailure alert = 40
|
||||
+ alertNoCertificate alert = 41
|
||||
+ alertBadCertificate alert = 42
|
||||
+ alertUnsupportedCertificate alert = 43
|
||||
+ alertCertificateRevoked alert = 44
|
||||
+ alertCertificateExpired alert = 45
|
||||
+ alertCertificateUnknown alert = 46
|
||||
+ alertIllegalParameter alert = 47
|
||||
+ alertUnknownCA alert = 48
|
||||
+ alertAccessDenied alert = 49
|
||||
+ alertDecodeError alert = 50
|
||||
+ alertDecryptError alert = 51
|
||||
+ alertProtocolVersion alert = 70
|
||||
+ alertInsufficientSecurity alert = 71
|
||||
+ alertInternalError alert = 80
|
||||
+ alertInappropriateFallback alert = 86
|
||||
+ alertUserCanceled alert = 90
|
||||
+ alertNoRenegotiation alert = 100
|
||||
+ alertMissingExtension alert = 109
|
||||
+ alertUnsupportedExtension alert = 110
|
||||
+ alertUnrecognizedName alert = 112
|
||||
+ alertBadCertificateStatusResponse alert = 113
|
||||
+ alertUnknownPSKIdentity alert = 115
|
||||
+ alertCertificateRequired alert = 116
|
||||
)
|
||||
|
||||
var alertText = map[alert]string{
|
||||
- alertCloseNotify: "close notify",
|
||||
- alertEndOfEarlyData: "end of early data",
|
||||
- alertUnexpectedMessage: "unexpected message",
|
||||
- alertBadRecordMAC: "bad record MAC",
|
||||
- alertDecryptionFailed: "decryption failed",
|
||||
- alertRecordOverflow: "record overflow",
|
||||
- alertDecompressionFailure: "decompression failure",
|
||||
- alertHandshakeFailure: "handshake failure",
|
||||
- alertNoCertificate: "no certificate",
|
||||
- alertBadCertificate: "bad certificate",
|
||||
- alertUnsupportedCertificate: "unsupported certificate",
|
||||
- alertCertificateRevoked: "revoked certificate",
|
||||
- alertCertificateExpired: "expired certificate",
|
||||
- alertCertificateUnknown: "unknown certificate",
|
||||
- alertIllegalParameter: "illegal parameter",
|
||||
- alertUnknownCA: "unknown certificate authority",
|
||||
- alertAccessDenied: "access denied",
|
||||
- alertDecodeError: "error decoding message",
|
||||
- alertDecryptError: "error decrypting message",
|
||||
- alertProtocolVersion: "protocol version not supported",
|
||||
- alertInsufficientSecurity: "insufficient security level",
|
||||
- alertInternalError: "internal error",
|
||||
- alertInappropriateFallback: "inappropriate fallback",
|
||||
- alertUserCanceled: "user canceled",
|
||||
- alertNoRenegotiation: "no renegotiation",
|
||||
- alertMissingExtension: "missing extension",
|
||||
- alertUnsupportedExtension: "unsupported extension",
|
||||
- alertUnrecognizedName: "unrecognized name",
|
||||
- alertUnknownPSKIdentity: "unknown PSK identity",
|
||||
- alertCertificateRequired: "certificate required",
|
||||
+ alertCloseNotify: "close notify",
|
||||
+ alertEndOfEarlyData: "end of early data",
|
||||
+ alertUnexpectedMessage: "unexpected message",
|
||||
+ alertBadRecordMAC: "bad record MAC",
|
||||
+ alertDecryptionFailed: "decryption failed",
|
||||
+ alertRecordOverflow: "record overflow",
|
||||
+ alertDecompressionFailure: "decompression failure",
|
||||
+ alertHandshakeFailure: "handshake failure",
|
||||
+ alertNoCertificate: "no certificate",
|
||||
+ alertBadCertificate: "bad certificate",
|
||||
+ alertUnsupportedCertificate: "unsupported certificate",
|
||||
+ alertCertificateRevoked: "revoked certificate",
|
||||
+ alertCertificateExpired: "expired certificate",
|
||||
+ alertCertificateUnknown: "unknown certificate",
|
||||
+ alertIllegalParameter: "illegal parameter",
|
||||
+ alertUnknownCA: "unknown certificate authority",
|
||||
+ alertAccessDenied: "access denied",
|
||||
+ alertDecodeError: "error decoding message",
|
||||
+ alertDecryptError: "error decrypting message",
|
||||
+ alertProtocolVersion: "protocol version not supported",
|
||||
+ alertInsufficientSecurity: "insufficient security level",
|
||||
+ alertInternalError: "internal error",
|
||||
+ alertInappropriateFallback: "inappropriate fallback",
|
||||
+ alertUserCanceled: "user canceled",
|
||||
+ alertNoRenegotiation: "no renegotiation",
|
||||
+ alertMissingExtension: "missing extension",
|
||||
+ alertUnsupportedExtension: "unsupported extension",
|
||||
+ alertBadCertificateStatusResponse: "bad certificate status response",
|
||||
+ alertUnrecognizedName: "unrecognized name",
|
||||
+ alertUnknownPSKIdentity: "unknown PSK identity",
|
||||
+ alertCertificateRequired: "certificate required",
|
||||
}
|
||||
|
||||
func (e alert) String() string {
|
||||
diff --git a/ssl/test/runner/runner.go b/ssl/test/runner/runner.go
|
||||
index 510a48b..1a6d0f9 100644
|
||||
--- a/ssl/test/runner/runner.go
|
||||
+++ b/ssl/test/runner/runner.go
|
||||
@@ -4744,60 +4744,157 @@ func addStateMachineCoverageTests(config stateMachineTestConfig) {
|
||||
})
|
||||
|
||||
// OCSP stapling tests.
|
||||
- tests = append(tests, testCase{
|
||||
- testType: clientTest,
|
||||
- name: "OCSPStapling-Client",
|
||||
- config: Config{
|
||||
- MaxVersion: VersionTLS12,
|
||||
- },
|
||||
- flags: []string{
|
||||
- "-enable-ocsp-stapling",
|
||||
- "-expect-ocsp-response",
|
||||
- base64.StdEncoding.EncodeToString(testOCSPResponse),
|
||||
- "-verify-peer",
|
||||
- },
|
||||
- resumeSession: true,
|
||||
- })
|
||||
- tests = append(tests, testCase{
|
||||
- testType: serverTest,
|
||||
- name: "OCSPStapling-Server",
|
||||
- config: Config{
|
||||
- MaxVersion: VersionTLS12,
|
||||
- },
|
||||
- expectedOCSPResponse: testOCSPResponse,
|
||||
- flags: []string{
|
||||
- "-ocsp-response",
|
||||
- base64.StdEncoding.EncodeToString(testOCSPResponse),
|
||||
- },
|
||||
- resumeSession: true,
|
||||
- })
|
||||
- tests = append(tests, testCase{
|
||||
- testType: clientTest,
|
||||
- name: "OCSPStapling-Client-TLS13",
|
||||
- config: Config{
|
||||
- MaxVersion: VersionTLS13,
|
||||
- },
|
||||
- flags: []string{
|
||||
- "-enable-ocsp-stapling",
|
||||
- "-expect-ocsp-response",
|
||||
- base64.StdEncoding.EncodeToString(testOCSPResponse),
|
||||
- "-verify-peer",
|
||||
- },
|
||||
- resumeSession: true,
|
||||
- })
|
||||
- tests = append(tests, testCase{
|
||||
- testType: serverTest,
|
||||
- name: "OCSPStapling-Server-TLS13",
|
||||
- config: Config{
|
||||
- MaxVersion: VersionTLS13,
|
||||
- },
|
||||
- expectedOCSPResponse: testOCSPResponse,
|
||||
- flags: []string{
|
||||
- "-ocsp-response",
|
||||
- base64.StdEncoding.EncodeToString(testOCSPResponse),
|
||||
- },
|
||||
- resumeSession: true,
|
||||
- })
|
||||
+ for _, vers := range tlsVersions {
|
||||
+ if config.protocol == dtls && !vers.hasDTLS {
|
||||
+ continue
|
||||
+ }
|
||||
+ if vers.version == VersionSSL30 {
|
||||
+ continue
|
||||
+ }
|
||||
+ tests = append(tests, testCase{
|
||||
+ testType: clientTest,
|
||||
+ name: "OCSPStapling-Client-" + vers.name,
|
||||
+ config: Config{
|
||||
+ MaxVersion: vers.version,
|
||||
+ },
|
||||
+ tls13Variant: vers.tls13Variant,
|
||||
+ flags: []string{
|
||||
+ "-enable-ocsp-stapling",
|
||||
+ "-expect-ocsp-response",
|
||||
+ base64.StdEncoding.EncodeToString(testOCSPResponse),
|
||||
+ "-verify-peer",
|
||||
+ },
|
||||
+ resumeSession: true,
|
||||
+ })
|
||||
+ tests = append(tests, testCase{
|
||||
+ testType: serverTest,
|
||||
+ name: "OCSPStapling-Server-" + vers.name,
|
||||
+ config: Config{
|
||||
+ MaxVersion: vers.version,
|
||||
+ },
|
||||
+ tls13Variant: vers.tls13Variant,
|
||||
+ expectedOCSPResponse: testOCSPResponse,
|
||||
+ flags: []string{
|
||||
+ "-ocsp-response",
|
||||
+ base64.StdEncoding.EncodeToString(testOCSPResponse),
|
||||
+ },
|
||||
+ resumeSession: true,
|
||||
+ })
|
||||
+
|
||||
+ // The client OCSP callback is an alternate certificate
|
||||
+ // verification callback.
|
||||
+ tests = append(tests, testCase{
|
||||
+ testType: clientTest,
|
||||
+ name: "ClientOCSPCallback-Pass-" + vers.name,
|
||||
+ config: Config{
|
||||
+ MaxVersion: vers.version,
|
||||
+ Certificates: []Certificate{rsaCertificate},
|
||||
+ },
|
||||
+ tls13Variant: vers.tls13Variant,
|
||||
+ flags: []string{
|
||||
+ "-enable-ocsp-stapling",
|
||||
+ "-use-ocsp-callback",
|
||||
+ },
|
||||
+ })
|
||||
+ var expectedLocalError string
|
||||
+ if !config.async {
|
||||
+ // TODO(davidben): Asynchronous fatal alerts are never
|
||||
+ // sent. https://crbug.com/boringssl/130.
|
||||
+ expectedLocalError = "remote error: bad certificate status response"
|
||||
+ }
|
||||
+ tests = append(tests, testCase{
|
||||
+ testType: clientTest,
|
||||
+ name: "ClientOCSPCallback-Fail-" + vers.name,
|
||||
+ config: Config{
|
||||
+ MaxVersion: vers.version,
|
||||
+ Certificates: []Certificate{rsaCertificate},
|
||||
+ },
|
||||
+ tls13Variant: vers.tls13Variant,
|
||||
+ flags: []string{
|
||||
+ "-enable-ocsp-stapling",
|
||||
+ "-use-ocsp-callback",
|
||||
+ "-fail-ocsp-callback",
|
||||
+ },
|
||||
+ shouldFail: true,
|
||||
+ expectedLocalError: expectedLocalError,
|
||||
+ expectedError: ":OCSP_CB_ERROR:",
|
||||
+ })
|
||||
+ // The callback does not run if the server does not send an
|
||||
+ // OCSP response.
|
||||
+ certNoStaple := rsaCertificate
|
||||
+ certNoStaple.OCSPStaple = nil
|
||||
+ tests = append(tests, testCase{
|
||||
+ testType: clientTest,
|
||||
+ name: "ClientOCSPCallback-FailNoStaple-" + vers.name,
|
||||
+ config: Config{
|
||||
+ MaxVersion: vers.version,
|
||||
+ Certificates: []Certificate{certNoStaple},
|
||||
+ },
|
||||
+ tls13Variant: vers.tls13Variant,
|
||||
+ flags: []string{
|
||||
+ "-enable-ocsp-stapling",
|
||||
+ "-use-ocsp-callback",
|
||||
+ "-fail-ocsp-callback",
|
||||
+ },
|
||||
+ })
|
||||
+
|
||||
+ // The server OCSP callback is a legacy mechanism for
|
||||
+ // configuring OCSP, used by unreliable server software.
|
||||
+ tests = append(tests, testCase{
|
||||
+ testType: serverTest,
|
||||
+ name: "ServerOCSPCallback-SetInCallback-" + vers.name,
|
||||
+ config: Config{
|
||||
+ MaxVersion: vers.version,
|
||||
+ },
|
||||
+ tls13Variant: vers.tls13Variant,
|
||||
+ expectedOCSPResponse: testOCSPResponse,
|
||||
+ flags: []string{
|
||||
+ "-use-ocsp-callback",
|
||||
+ "-set-ocsp-in-callback",
|
||||
+ "-ocsp-response",
|
||||
+ base64.StdEncoding.EncodeToString(testOCSPResponse),
|
||||
+ },
|
||||
+ resumeSession: true,
|
||||
+ })
|
||||
+
|
||||
+ // The callback may decline OCSP, in which case we act as if
|
||||
+ // the client did not support it, even if a response was
|
||||
+ // configured.
|
||||
+ tests = append(tests, testCase{
|
||||
+ testType: serverTest,
|
||||
+ name: "ServerOCSPCallback-Decline-" + vers.name,
|
||||
+ config: Config{
|
||||
+ MaxVersion: vers.version,
|
||||
+ },
|
||||
+ tls13Variant: vers.tls13Variant,
|
||||
+ expectedOCSPResponse: []byte{},
|
||||
+ flags: []string{
|
||||
+ "-use-ocsp-callback",
|
||||
+ "-decline-ocsp-callback",
|
||||
+ "-ocsp-response",
|
||||
+ base64.StdEncoding.EncodeToString(testOCSPResponse),
|
||||
+ },
|
||||
+ resumeSession: true,
|
||||
+ })
|
||||
+
|
||||
+ // The callback may also signal an internal error.
|
||||
+ tests = append(tests, testCase{
|
||||
+ testType: serverTest,
|
||||
+ name: "ServerOCSPCallback-Fail-" + vers.name,
|
||||
+ config: Config{
|
||||
+ MaxVersion: vers.version,
|
||||
+ },
|
||||
+ tls13Variant: vers.tls13Variant,
|
||||
+ flags: []string{
|
||||
+ "-use-ocsp-callback",
|
||||
+ "-fail-ocsp-callback",
|
||||
+ "-ocsp-response",
|
||||
+ base64.StdEncoding.EncodeToString(testOCSPResponse),
|
||||
+ },
|
||||
+ shouldFail: true,
|
||||
+ expectedError: ":OCSP_CB_ERROR:",
|
||||
+ })
|
||||
+ }
|
||||
|
||||
// Certificate verification tests.
|
||||
for _, vers := range tlsVersions {
|
||||
diff --git a/ssl/test/test_config.cc b/ssl/test/test_config.cc
|
||||
index f50251d..3afb01b 100644
|
||||
--- a/ssl/test/test_config.cc
|
||||
+++ b/ssl/test/test_config.cc
|
||||
@@ -133,6 +133,10 @@ const Flag<bool> kBoolFlags[] = {
|
||||
{ "-expect-draft-downgrade", &TestConfig::expect_draft_downgrade },
|
||||
{ "-handoff", &TestConfig::handoff },
|
||||
{ "-expect-dummy-pq-padding", &TestConfig::expect_dummy_pq_padding },
|
||||
+ { "-use-ocsp-callback", &TestConfig::use_ocsp_callback },
|
||||
+ { "-set-ocsp-in-callback", &TestConfig::set_ocsp_in_callback },
|
||||
+ { "-decline-ocsp-callback", &TestConfig::decline_ocsp_callback },
|
||||
+ { "-fail-ocsp-callback", &TestConfig::fail_ocsp_callback },
|
||||
};
|
||||
|
||||
const Flag<std::string> kStringFlags[] = {
|
||||
diff --git a/ssl/test/test_config.h b/ssl/test/test_config.h
|
||||
index fb479d1..a9eec62 100644
|
||||
--- a/ssl/test/test_config.h
|
||||
+++ b/ssl/test/test_config.h
|
||||
@@ -154,6 +154,10 @@ struct TestConfig {
|
||||
int dummy_pq_padding_len = 0;
|
||||
bool handoff = false;
|
||||
bool expect_dummy_pq_padding = false;
|
||||
+ bool use_ocsp_callback = false;
|
||||
+ bool set_ocsp_in_callback = false;
|
||||
+ bool decline_ocsp_callback = false;
|
||||
+ bool fail_ocsp_callback = false;
|
||||
};
|
||||
|
||||
bool ParseConfig(int argc, char **argv, TestConfig *out_initial,
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -452,9 +452,7 @@ patches:
|
|||
-
|
||||
author: Jeremy Apthorp <nornagon@nornagon.net>
|
||||
file: crashpad_http_status.patch
|
||||
description: |
|
||||
Accept all HTTP codes in [200, 300) as successful, instead of just 200.
|
||||
For example HockeyApp responds with 202.
|
||||
description: backport of crashpad f540abb506
|
||||
-
|
||||
author: Jeremy Apthorp <jeremya@chromium.org>
|
||||
file: backport_cd7154e0bb5.patch
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
|
||||
index a6756c2..5352958 100644
|
||||
index a6756c20f22c..53529588af27 100644
|
||||
--- a/ui/base/accelerators/accelerator.cc
|
||||
+++ b/ui/base/accelerators/accelerator.cc
|
||||
@@ -11,6 +11,7 @@
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/base/BUILD.gn b/base/BUILD.gn
|
||||
index b674e703617d..5a7a11d816cf 100644
|
||||
index 943412faefd7..c505df950b2b 100644
|
||||
--- a/base/BUILD.gn
|
||||
+++ b/base/BUILD.gn
|
||||
@@ -1131,7 +1131,7 @@ component("base") {
|
||||
@@ -1217,7 +1217,7 @@ jumbo_component("base") {
|
||||
# Needed for <atomic> if using newer C++ library than sysroot, except if
|
||||
# building inside the cros_sdk environment - use host_toolchain as a
|
||||
# more robust check for this.
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
diff --git a/gin/array_buffer.cc b/gin/array_buffer.cc
|
||||
index f84934bfd712..63bce16a9d06 100644
|
||||
index f84934bfd712..fc23fef68b6f 100644
|
||||
--- a/gin/array_buffer.cc
|
||||
+++ b/gin/array_buffer.cc
|
||||
@@ -43,6 +43,10 @@ void* ArrayBufferAllocator::AllocateUninitialized(size_t length) {
|
||||
return malloc(length);
|
||||
}
|
||||
|
||||
|
||||
+void* ArrayBufferAllocator::Realloc(void* data, size_t length) {
|
||||
+ return realloc(data, length);
|
||||
+}
|
||||
|
@ -14,7 +14,7 @@ index f84934bfd712..63bce16a9d06 100644
|
|||
free(data);
|
||||
}
|
||||
diff --git a/gin/array_buffer.h b/gin/array_buffer.h
|
||||
index 2aef366ac819..c037808a9bb3 100644
|
||||
index 2aef366ac819..3c7d66c81032 100644
|
||||
--- a/gin/array_buffer.h
|
||||
+++ b/gin/array_buffer.h
|
||||
@@ -21,6 +21,7 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
|
||||
|
@ -23,8 +23,23 @@ index 2aef366ac819..c037808a9bb3 100644
|
|||
void* AllocateUninitialized(size_t length) override;
|
||||
+ void* Realloc(void* data, size_t length) override;
|
||||
void Free(void* data, size_t length) override;
|
||||
|
||||
|
||||
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 c8c822632a69..d12976b3cd01 100644
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
@@ -619,6 +619,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
|
||||
size, WTF::ArrayBufferContents::kDontInitialize);
|
||||
}
|
||||
|
||||
+ void* Realloc(void* data, size_t size) override {
|
||||
+ return WTF::ArrayBufferContents::Realloc(data, size);
|
||||
+ }
|
||||
+
|
||||
void Free(void* data, size_t size) override {
|
||||
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 053babce1051..e33d6d4ceb5a 100644
|
||||
--- a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
|
||||
|
@ -53,18 +68,3 @@ index 809229caa872..6248ad32d6b0 100644
|
|||
static void FreeMemory(void*);
|
||||
static DataHandle CreateDataHandle(size_t, InitializationPolicy);
|
||||
static void Initialize(
|
||||
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 cf2762ede559..f065b5ebafb8 100644
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
@@ -555,6 +555,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
|
||||
size, WTF::ArrayBufferContents::kDontInitialize);
|
||||
}
|
||||
|
||||
+ void* Realloc(void* data, size_t size) override {
|
||||
+ return WTF::ArrayBufferContents::Realloc(data, size);
|
||||
+ }
|
||||
+
|
||||
void Free(void* data, size_t size) override {
|
||||
WTF::ArrayBufferContents::FreeMemory(data);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/base/process/launch.h b/base/process/launch.h
|
||||
index 20b76fc..9db73bf 100644
|
||||
index b4530b755a23..d6f02d9ab2e3 100644
|
||||
--- a/base/process/launch.h
|
||||
+++ b/base/process/launch.h
|
||||
@@ -147,7 +147,7 @@ struct BASE_EXPORT LaunchOptions {
|
||||
@@ -176,7 +176,7 @@ struct BASE_EXPORT LaunchOptions {
|
||||
|
||||
// By default, child processes will have the PR_SET_NO_NEW_PRIVS bit set. If
|
||||
// true, then this bit will not be set in the new child process.
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
|
||||
index 0c57d20..0916ed0 100644
|
||||
index 1c1fb59e02c8..86b87e294336 100644
|
||||
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
|
||||
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
|
||||
@@ -1870,6 +1870,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
|
||||
@@ -1597,6 +1597,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
|
||||
!policy->IsWebSafeScheme(info.common_params.url.scheme()) &&
|
||||
!is_external_protocol;
|
||||
|
||||
+ non_web_url_in_guest = false;
|
||||
+
|
||||
if (is_shutdown_ || non_web_url_in_guest ||
|
||||
(delegate_ && !delegate_->ShouldBeginRequest(
|
||||
info.common_params.method,
|
||||
if (is_shutdown_ || non_web_url_in_guest) {
|
||||
url_loader_client->OnComplete(
|
||||
network::URLLoaderCompletionStatus(net::ERR_ABORTED));
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc b/chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc
|
||||
index 91674b9..8a4c391 100644
|
||||
index 40399a35f8d2..1d3a0da948dc 100644
|
||||
--- a/chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc
|
||||
+++ b/chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc
|
||||
@@ -116,7 +116,7 @@ void AppIndicatorIconMenu::OnMenuItemActivated(GtkWidget* menu_item) {
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
|
||||
index bf4b1d0..a3b72c4 100644
|
||||
@@ -995,7 +996,8 @@
|
||||
|
||||
index bf4b1d07f7fe..8435c60a0786 100644
|
||||
--- a/ui/views/widget/widget.cc
|
||||
+++ b/ui/views/widget/widget.cc
|
||||
@@ -995,7 +995,8 @@ bool Widget::IsTranslucentWindowOpacitySupported() const {
|
||||
|
||||
void Widget::OnSizeConstraintsChanged() {
|
||||
native_widget_->OnSizeConstraintsChanged();
|
||||
- non_client_view_->SizeConstraintsChanged();
|
||||
+ if (non_client_view_)
|
||||
+ non_client_view_->SizeConstraintsChanged();
|
||||
}
|
||||
|
||||
|
||||
void Widget::OnOwnerClosing() {}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
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 bdd886eff5e3..42a3f0ef6e55 100644
|
||||
index 4b47f551f366..227c58a5629d 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
|
||||
@@ -255,7 +255,6 @@ void WorkerScriptLoader::ProcessContentSecurityPolicy(
|
||||
@@ -246,7 +246,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy(
|
||||
// document (which is implemented in WorkerMessagingProxy, and
|
||||
// m_contentSecurityPolicy should be left as nullptr to inherit the policy).
|
||||
if (!response.Url().ProtocolIs("blob") &&
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/third_party/blink/renderer/core/fileapi/file.h b/third_party/blink/renderer/core/fileapi/file.h
|
||||
index 0bfe29512050..81439f7ab8f7 100644
|
||||
index 39831f1902c6..fddb013aa122 100644
|
||||
--- a/third_party/blink/renderer/core/fileapi/file.h
|
||||
+++ b/third_party/blink/renderer/core/fileapi/file.h
|
||||
@@ -170,6 +170,9 @@ class CORE_EXPORT File final : public Blob {
|
||||
@@ -168,6 +168,9 @@ class CORE_EXPORT File final : public Blob {
|
||||
}
|
||||
const String& name() const { return name_; }
|
||||
|
||||
|
@ -13,7 +13,7 @@ index 0bfe29512050..81439f7ab8f7 100644
|
|||
// 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 df954bc8f818..4683b2853bb4 100644
|
||||
index a74beceda3e7..7196fd5f5f9e 100644
|
||||
--- a/third_party/blink/renderer/core/fileapi/file.idl
|
||||
+++ b/third_party/blink/renderer/core/fileapi/file.idl
|
||||
@@ -32,6 +32,7 @@
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
cdiff --git a/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc b/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc
|
||||
index aedc832..8c26681 100644
|
||||
diff --git a/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc b/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc
|
||||
index 87f2176ce897..ce3d9ce19bff 100644
|
||||
--- a/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc
|
||||
+++ b/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc
|
||||
@@ -94,8 +94,10 @@ v8::Local<v8::Function> V8ObjectConstructor::CreateInterfaceObject(
|
||||
@@ -98,8 +98,10 @@ v8::Local<v8::Function> V8ObjectConstructor::CreateInterfaceObject(
|
||||
bool get_prototype_value =
|
||||
interface_object->Get(context, V8AtomicString(isolate, "prototype"))
|
||||
.ToLocal(&prototype_value);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
index 33d958fb31ae..47efe62650aa 100644
|
||||
index 5c00e3e935b2..43f882eb0883 100644
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
@@ -170,11 +170,11 @@ void LocalWindowProxy::Initialize() {
|
||||
@@ -171,11 +171,11 @@ void LocalWindowProxy::Initialize() {
|
||||
GetFrame()->IsMainFrame());
|
||||
MainThreadDebugger::Instance()->ContextCreated(script_state_.get(),
|
||||
GetFrame(), origin);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
index 97a5393d40b4..04f88dd2ea15 100644
|
||||
index 5686e6a06d6f..4798d7e36bec 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -303,10 +303,6 @@ void LocalFrame::Detach(FrameDetachType type) {
|
||||
@@ -382,10 +382,6 @@ void LocalFrame::Detach(FrameDetachType type) {
|
||||
}
|
||||
CHECK(!view_ || !view_->IsAttached());
|
||||
|
||||
|
@ -13,7 +13,7 @@ index 97a5393d40b4..04f88dd2ea15 100644
|
|||
if (!Client())
|
||||
return;
|
||||
|
||||
@@ -316,6 +312,10 @@ void LocalFrame::Detach(FrameDetachType type) {
|
||||
@@ -403,6 +399,10 @@ void LocalFrame::Detach(FrameDetachType type) {
|
||||
// Notify ScriptController that the frame is closing, since its cleanup ends
|
||||
// up calling back to LocalFrameClient via WindowProxy.
|
||||
GetScriptController().ClearForClose();
|
||||
|
|
|
@ -1,8 +1,22 @@
|
|||
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
|
||||
index 601242f8df12..8cb523f82df0 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame.h
|
||||
@@ -427,6 +427,9 @@ class WebLocalFrame : public WebFrame {
|
||||
// be calling this API.
|
||||
virtual v8::Local<v8::Context> MainWorldScriptContext() const = 0;
|
||||
|
||||
+ virtual v8::Local<v8::Context> WorldScriptContext(
|
||||
+ v8::Isolate* isolate, int world_id) const = 0;
|
||||
+
|
||||
// Executes script in the context of the current page and returns the value
|
||||
// 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 a93834fbe86e..937b7f335693 100644
|
||||
index db86ae3c5eb4..602841d00df4 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
|
||||
@@ -843,6 +843,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
|
||||
@@ -892,6 +892,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
|
||||
return MainWorldScriptContext()->Global();
|
||||
}
|
||||
|
||||
|
@ -17,10 +31,10 @@ index a93834fbe86e..937b7f335693 100644
|
|||
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 d66499296ff8..bfea68983fda 100644
|
||||
index 0adc92eb48f2..a17891ce397c 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
|
||||
@@ -142,6 +142,8 @@ class CORE_EXPORT WebLocalFrameImpl final
|
||||
@@ -144,6 +144,8 @@ class CORE_EXPORT WebLocalFrameImpl final
|
||||
int argc,
|
||||
v8::Local<v8::Value> argv[]) override;
|
||||
v8::Local<v8::Context> MainWorldScriptContext() const override;
|
||||
|
@ -28,18 +42,4 @@ index d66499296ff8..bfea68983fda 100644
|
|||
+ v8::Isolate* isolate, int world_id) const override;
|
||||
v8::Local<v8::Object> GlobalProxy() const override;
|
||||
void Reload(WebFrameLoadType) override;
|
||||
void ReloadWithOverrideURL(const WebURL& override_url,
|
||||
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
|
||||
index ad0fa84f9511..69f96587b1f1 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame.h
|
||||
@@ -404,6 +404,9 @@ class WebLocalFrame : public WebFrame {
|
||||
// be calling this API.
|
||||
virtual v8::Local<v8::Context> MainWorldScriptContext() const = 0;
|
||||
|
||||
+ virtual v8::Local<v8::Context> WorldScriptContext(
|
||||
+ v8::Isolate* isolate, int world_id) const = 0;
|
||||
+
|
||||
// Executes script in the context of the current page and returns the value
|
||||
// that the script evaluated to with callback. Script execution can be
|
||||
// suspend.
|
||||
void ReloadImage(const WebNode&) override;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
|
||||
index c75fb7c2bb7e..423f4b2ddb10 100644
|
||||
index d31a9f29fa9c..dea5a6403f4c 100644
|
||||
--- a/third_party/boringssl/BUILD.gn
|
||||
+++ b/third_party/boringssl/BUILD.gn
|
||||
@@ -44,6 +44,13 @@ config("no_asm_config") {
|
||||
}
|
||||
@@ -46,6 +46,13 @@ config("no_asm_config") {
|
||||
|
||||
all_sources = crypto_sources + ssl_sources
|
||||
all_headers = crypto_headers + ssl_headers
|
||||
+if (is_electron_build) {
|
||||
+ # Needed to build a nodejs-compatible boringssl.
|
||||
+ all_sources += [
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.h b/content/browser/renderer_host/browser_compositor_view_mac.h
|
||||
index 7426062f7381..bd5cd2fcd230 100644
|
||||
index bc9eba153a6a..5200f79afd05 100644
|
||||
--- a/content/browser/renderer_host/browser_compositor_view_mac.h
|
||||
+++ b/content/browser/renderer_host/browser_compositor_view_mac.h
|
||||
@@ -54,10 +54,13 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient {
|
||||
@@ -59,6 +59,8 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
|
||||
// These will not return nullptr until Destroy is called.
|
||||
DelegatedFrameHost* GetDelegatedFrameHost();
|
||||
|
||||
|
@ -11,16 +11,19 @@ index 7426062f7381..bd5cd2fcd230 100644
|
|||
// Ensure that the currect compositor frame be cleared (even if it is
|
||||
// potentially visible).
|
||||
void ClearCompositorFrame();
|
||||
@@ -69,6 +71,7 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
|
||||
// no valid frame is available.
|
||||
const gfx::CALayerParams* GetLastCALayerParams() const;
|
||||
|
||||
+ ui::Compositor* GetCompositor();
|
||||
gfx::AcceleratedWidget GetAcceleratedWidget();
|
||||
void DidCreateNewRendererCompositorFrameSink(
|
||||
viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink);
|
||||
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.mm b/content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
index 7fcc24c15c37..7c31977b20f9 100644
|
||||
index 3d12a1126a0d..7a60368b2c8a 100644
|
||||
--- a/content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
@@ -208,6 +208,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {
|
||||
@@ -240,6 +240,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {
|
||||
g_spare_recyclable_compositors.Get().clear();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
|
||||
index 964c9a093a3b..f3b3d66ff267 100644
|
||||
index a0bc9305e62d..7f022f6cfda7 100644
|
||||
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
|
||||
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
|
||||
@@ -214,8 +214,11 @@ void BrowserPluginGuest::Init() {
|
||||
@@ -207,8 +207,11 @@ void BrowserPluginGuest::Init() {
|
||||
|
||||
WebContentsImpl* owner_web_contents = static_cast<WebContentsImpl*>(
|
||||
delegate_->GetOwnerWebContents());
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
|
||||
index 06762fb..e89b1f0 100644
|
||||
index d64895137a73..c42dd6ddf172 100644
|
||||
--- a/content/renderer/browser_plugin/browser_plugin.cc
|
||||
+++ b/content/renderer/browser_plugin/browser_plugin.cc
|
||||
@@ -448,15 +448,11 @@ blink::WebInputEventResult BrowserPlugin::handleInputEvent(
|
||||
@@ -642,15 +642,11 @@ blink::WebInputEventResult BrowserPlugin::HandleInputEvent(
|
||||
|
||||
DCHECK(!blink::WebInputEvent::IsTouchEventType(event.GetType()));
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
|
||||
index 9e38ee0e592b..bd54ce154b13 100644
|
||||
index 93a97ff2803f..02c469e930a1 100644
|
||||
--- a/build/config/BUILDCONFIG.gn
|
||||
+++ b/build/config/BUILDCONFIG.gn
|
||||
@@ -123,6 +123,9 @@ if (current_os == "") {
|
||||
|
@ -12,7 +12,7 @@ index 9e38ee0e592b..bd54ce154b13 100644
|
|||
# Set to enable the official build level of optimization. This has nothing
|
||||
# to do with branding, but enables an additional level of optimization above
|
||||
# release (!is_debug). This might be better expressed as a tri-state
|
||||
@@ -539,6 +542,7 @@ default_compiler_configs = [
|
||||
@@ -527,6 +531,7 @@ default_compiler_configs = [
|
||||
"//build/config/compiler:thin_archive",
|
||||
"//build/config/coverage:default_coverage",
|
||||
"//build/config/sanitizers:default_sanitizer_flags",
|
||||
|
@ -21,10 +21,10 @@ index 9e38ee0e592b..bd54ce154b13 100644
|
|||
|
||||
if (is_win) {
|
||||
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
|
||||
index 9a10137aa405..bb33e5450eaa 100644
|
||||
index 83337d52e4b9..8ec56ca46c74 100644
|
||||
--- a/build/config/compiler/BUILD.gn
|
||||
+++ b/build/config/compiler/BUILD.gn
|
||||
@@ -579,10 +579,13 @@ config("compiler") {
|
||||
@@ -636,10 +636,13 @@ config("compiler") {
|
||||
ldflags += [ "-Wl,--lto-O0" ]
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn
|
||||
index 53f767a0bddb..661466b779e8 100644
|
||||
index 4d9d1f45f870..286c791613ba 100644
|
||||
--- a/build/toolchain/win/BUILD.gn
|
||||
+++ b/build/toolchain/win/BUILD.gn
|
||||
@@ -176,6 +176,12 @@ template("msvc_toolchain") {
|
||||
@@ -154,6 +154,12 @@ template("msvc_toolchain") {
|
||||
]
|
||||
|
||||
command = "$env_wrapper$cl /nologo /showIncludes ${clflags} $sys_include_flags{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
|
||||
|
@ -15,7 +15,7 @@ index 53f767a0bddb..661466b779e8 100644
|
|||
}
|
||||
|
||||
tool("cxx") {
|
||||
@@ -192,6 +198,12 @@ template("msvc_toolchain") {
|
||||
@@ -170,6 +176,12 @@ template("msvc_toolchain") {
|
||||
]
|
||||
|
||||
command = "$env_wrapper$cl /nologo /showIncludes ${clflags} $sys_include_flags{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
|
||||
|
@ -29,10 +29,10 @@ index 53f767a0bddb..661466b779e8 100644
|
|||
|
||||
tool("rc") {
|
||||
diff --git a/build/toolchain/win/tool_wrapper.py b/build/toolchain/win/tool_wrapper.py
|
||||
index 3a81368f3469..7c5ef1ea5db4 100644
|
||||
index b2cb093377ee..801d7a9b8e03 100644
|
||||
--- a/build/toolchain/win/tool_wrapper.py
|
||||
+++ b/build/toolchain/win/tool_wrapper.py
|
||||
@@ -315,6 +315,25 @@ class WinTool(object):
|
||||
@@ -270,6 +270,25 @@ class WinTool(object):
|
||||
dirname = dirname[0] if dirname else None
|
||||
return subprocess.call(args, shell=True, env=env, cwd=dirname)
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
|
||||
index 25841d376bcd..df41213f4c49 100644
|
||||
index 321a12f74202..7a53675a2139 100644
|
||||
--- a/content/browser/frame_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/frame_host/render_frame_host_impl.cc
|
||||
@@ -2874,6 +2874,38 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -3058,6 +3058,38 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
"frame_tree_node", frame_tree_node_->frame_tree_node_id(), "url",
|
||||
params->target_url.possibly_invalid_spec());
|
||||
|
||||
|
@ -41,7 +41,7 @@ index 25841d376bcd..df41213f4c49 100644
|
|||
bool no_javascript_access = false;
|
||||
|
||||
// Filter out URLs to which navigation is disallowed from this context.
|
||||
@@ -2896,8 +2928,9 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -3080,8 +3112,9 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
frame_tree_node_->frame_tree()->GetMainFrame()->GetLastCommittedURL(),
|
||||
last_committed_origin_.GetURL(), params->window_container_type,
|
||||
params->target_url, params->referrer, params->frame_name,
|
||||
|
@ -53,8 +53,20 @@ index 25841d376bcd..df41213f4c49 100644
|
|||
|
||||
if (!can_create_window) {
|
||||
std::move(callback).Run(mojom::CreateNewWindowStatus::kIgnore, nullptr);
|
||||
diff --git a/content/browser/security_exploit_browsertest.cc b/content/browser/security_exploit_browsertest.cc
|
||||
index 9c298b182440..2fcbde75ba47 100644
|
||||
--- a/content/browser/security_exploit_browsertest.cc
|
||||
+++ b/content/browser/security_exploit_browsertest.cc
|
||||
@@ -293,6 +293,7 @@ IN_PROC_BROWSER_TEST_F(SecurityExploitBrowserTest,
|
||||
|
||||
mojom::CreateNewWindowParamsPtr params = mojom::CreateNewWindowParams::New();
|
||||
params->target_url = GURL("about:blank");
|
||||
+ params->body = mojom::ResourceRequestBody::New();
|
||||
pending_rfh->CreateNewWindow(
|
||||
std::move(params), base::BindOnce([](mojom::CreateNewWindowStatus,
|
||||
mojom::CreateNewWindowReplyPtr) {}));
|
||||
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
|
||||
index 99ec7e8d7995..26a4040fba97 100644
|
||||
index 09b5766c0794..edb604c80d3f 100644
|
||||
--- a/content/common/frame.mojom
|
||||
+++ b/content/common/frame.mojom
|
||||
@@ -11,6 +11,8 @@ import "content/public/common/resource_type.mojom";
|
||||
|
@ -66,7 +78,7 @@ index 99ec7e8d7995..26a4040fba97 100644
|
|||
import "mojo/public/mojom/base/string16.mojom";
|
||||
import "mojo/public/mojom/base/unguessable_token.mojom";
|
||||
import "services/network/public/mojom/url_loader.mojom";
|
||||
@@ -146,6 +148,24 @@ interface FrameFactory {
|
||||
@@ -148,6 +150,24 @@ interface FrameFactory {
|
||||
CreateFrame(int32 frame_routing_id, Frame& frame);
|
||||
};
|
||||
|
||||
|
@ -91,7 +103,7 @@ index 99ec7e8d7995..26a4040fba97 100644
|
|||
struct CreateNewWindowParams {
|
||||
// True if this open request came in the context of a user gesture.
|
||||
bool user_gesture;
|
||||
@@ -182,6 +202,10 @@ struct CreateNewWindowParams {
|
||||
@@ -184,6 +204,10 @@ struct CreateNewWindowParams {
|
||||
|
||||
// The window features to use for the new window.
|
||||
blink.mojom.WindowFeatures features;
|
||||
|
@ -103,10 +115,10 @@ index 99ec7e8d7995..26a4040fba97 100644
|
|||
|
||||
// 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 37e2d88e28e9..6c366435ddd8 100644
|
||||
index a8927d0ba8da..396ae3d82ba2 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -382,6 +382,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
@@ -401,6 +401,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
|
@ -116,18 +128,18 @@ index 37e2d88e28e9..6c366435ddd8 100644
|
|||
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 63cb3851db0a..4a96c8851df0 100644
|
||||
index e9c6b810e050..3ca627448e33 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -151,6 +151,7 @@ class RenderFrameHost;
|
||||
@@ -153,6 +153,7 @@ class RenderFrameHost;
|
||||
class RenderProcessHost;
|
||||
class RenderViewHost;
|
||||
class ResourceContext;
|
||||
+class ResourceRequestBody;
|
||||
class ServiceManagerConnection;
|
||||
class SiteInstance;
|
||||
class SpeechRecognitionManagerDelegate;
|
||||
class StoragePartition;
|
||||
@@ -625,6 +626,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -651,6 +652,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
|
@ -137,18 +149,18 @@ index 63cb3851db0a..4a96c8851df0 100644
|
|||
bool opener_suppressed,
|
||||
bool* no_javascript_access);
|
||||
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
|
||||
index 7a866ded50f1..f019ce3b24bb 100644
|
||||
index 4aba7a9e290e..a13cc1599d70 100644
|
||||
--- a/content/renderer/render_view_impl.cc
|
||||
+++ b/content/renderer/render_view_impl.cc
|
||||
@@ -79,6 +79,7 @@
|
||||
#include "content/renderer/input/input_handler_manager.h"
|
||||
@@ -78,6 +78,7 @@
|
||||
#include "content/renderer/ime_event_guard.h"
|
||||
#include "content/renderer/internal_document_state_data.h"
|
||||
#include "content/renderer/loader/request_extra_data.h"
|
||||
+#include "content/renderer/loader/web_url_request_util.h"
|
||||
#include "content/renderer/media/audio_device_factory.h"
|
||||
#include "content/renderer/media/stream/media_stream_device_observer.h"
|
||||
#include "content/renderer/media/video_capture_impl_manager.h"
|
||||
@@ -1258,6 +1259,46 @@ WebView* RenderViewImpl::CreateView(WebLocalFrame* creator,
|
||||
@@ -1243,6 +1244,46 @@ WebView* RenderViewImpl::CreateView(WebLocalFrame* creator,
|
||||
}
|
||||
params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features);
|
||||
|
||||
|
@ -195,23 +207,11 @@ index 7a866ded50f1..f019ce3b24bb 100644
|
|||
// We preserve this information before sending the message since |params| is
|
||||
// moved on send.
|
||||
bool is_background_tab =
|
||||
diff --git a/content/browser/security_exploit_browsertest.cc b/content/browser/security_exploit_browsertest.cc
|
||||
index 0a1f363a673a..adcef6fca779 100644
|
||||
--- a/content/browser/security_exploit_browsertest.cc
|
||||
+++ b/content/browser/security_exploit_browsertest.cc
|
||||
@@ -293,6 +293,7 @@ IN_PROC_BROWSER_TEST_F(SecurityExploitBrowserTest,
|
||||
|
||||
mojom::CreateNewWindowParamsPtr params = mojom::CreateNewWindowParams::New();
|
||||
params->target_url = GURL("about:blank");
|
||||
+ params->body = mojom::ResourceRequestBody::New();
|
||||
pending_rfh->CreateNewWindow(
|
||||
std::move(params), base::BindOnce([](mojom::CreateNewWindowStatus,
|
||||
mojom::CreateNewWindowReplyPtr) {}));
|
||||
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 2eaee37ec780..9994df95a798 100644
|
||||
index 3a908d742130..52294125b799 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
|
||||
@@ -182,6 +182,8 @@ bool LayoutTestContentBrowserClient::CanCreateWindow(
|
||||
@@ -247,6 +247,8 @@ bool LayoutTestContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
|
@ -221,10 +221,10 @@ index 2eaee37ec780..9994df95a798 100644
|
|||
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 62b637bc80ce..1a9a06ce4bf6 100644
|
||||
index d0ba19167522..3d1154b3cb8a 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
|
||||
@@ -58,6 +58,8 @@ class LayoutTestContentBrowserClient : public ShellContentBrowserClient {
|
||||
@@ -67,6 +67,8 @@ class LayoutTestContentBrowserClient : public ShellContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc
|
||||
index f3033337199b..856bc8f0b143 100644
|
||||
index c0cf00b5da05..992827ca6782 100644
|
||||
--- a/chrome/renderer/media/chrome_key_systems.cc
|
||||
+++ b/chrome/renderer/media/chrome_key_systems.cc
|
||||
@@ -14,7 +14,9 @@
|
||||
|
@ -12,7 +12,7 @@ index f3033337199b..856bc8f0b143 100644
|
|||
#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"
|
||||
@@ -140,12 +142,14 @@ static void AddExternalClearKey(
|
||||
@@ -142,12 +144,14 @@ static void AddExternalClearKey(
|
||||
#if defined(WIDEVINE_CDM_AVAILABLE)
|
||||
// Returns persistent-license session support.
|
||||
EmeSessionTypeSupport GetPersistentLicenseSupport(bool supported_by_the_cdm) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc
|
||||
index 7b9fc4114c52..bdbbf93f6f0d 100644
|
||||
index e679dbb02a81..d90a276fc0e1 100644
|
||||
--- a/content/browser/compositor/gpu_process_transport_factory.cc
|
||||
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
|
||||
@@ -495,9 +495,19 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
|
||||
@@ -507,10 +507,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
|
||||
// surfaces as they are not following the correct mode.
|
||||
DisableGpuCompositing(compositor.get());
|
||||
}
|
||||
|
@ -13,18 +13,20 @@ index 7b9fc4114c52..bdbbf93f6f0d 100644
|
|||
+ compositor.get());
|
||||
+ }
|
||||
+ if (!output_device) {
|
||||
+ output_device = CreateSoftwareOutputDevice(compositor->widget());
|
||||
+ output_device = CreateSoftwareOutputDevice(compositor->widget(),
|
||||
+ compositor->task_runner());
|
||||
+ }
|
||||
+
|
||||
display_output_surface =
|
||||
std::make_unique<SoftwareBrowserCompositorOutputSurface>(
|
||||
- CreateSoftwareOutputDevice(compositor->widget()),
|
||||
- CreateSoftwareOutputDevice(compositor->widget(),
|
||||
- compositor->task_runner()),
|
||||
+ std::move(output_device),
|
||||
std::move(vsync_callback), compositor->task_runner());
|
||||
std::move(vsync_callback));
|
||||
} else {
|
||||
DCHECK(context_provider);
|
||||
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
|
||||
index d842aa55175b..2c2131774b71 100644
|
||||
index eb250697ebd6..36be87675e9a 100644
|
||||
--- a/ui/compositor/compositor.h
|
||||
+++ b/ui/compositor/compositor.h
|
||||
@@ -24,6 +24,7 @@
|
||||
|
@ -35,7 +37,7 @@ index d842aa55175b..2c2131774b71 100644
|
|||
#include "third_party/skia/include/core/SkColor.h"
|
||||
#include "third_party/skia/include/core/SkMatrix44.h"
|
||||
#include "ui/compositor/compositor_animation_observer.h"
|
||||
@@ -182,6 +183,15 @@ class COMPOSITOR_EXPORT ContextFactory {
|
||||
@@ -183,6 +184,15 @@ class COMPOSITOR_EXPORT ContextFactory {
|
||||
virtual void RemoveObserver(ContextFactoryObserver* observer) = 0;
|
||||
};
|
||||
|
||||
|
@ -51,7 +53,7 @@ index d842aa55175b..2c2131774b71 100644
|
|||
// 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
|
||||
@@ -221,6 +231,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
@@ -222,6 +232,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
// Schedules a redraw of the layer tree associated with this compositor.
|
||||
void ScheduleDraw();
|
||||
|
||||
|
@ -61,7 +63,7 @@ index d842aa55175b..2c2131774b71 100644
|
|||
// 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
|
||||
@@ -426,6 +439,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
@@ -447,6 +460,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
ui::ContextFactory* context_factory_;
|
||||
ui::ContextFactoryPrivate* context_factory_private_;
|
||||
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
diff --git a/content/public/app/mojo/content_browser_manifest.json b/content/public/app/mojo/content_browser_manifest.json
|
||||
index 5a217fa9b741..8fd1b39ea6ca 100644
|
||||
index a515b68616a8..dc0431fd17e6 100644
|
||||
--- a/content/public/app/mojo/content_browser_manifest.json
|
||||
+++ b/content/public/app/mojo/content_browser_manifest.json
|
||||
@@ -82,6 +82,7 @@
|
||||
@@ -90,6 +90,7 @@
|
||||
"device:battery_monitor",
|
||||
"device:generic_sensor",
|
||||
"device:geolocation",
|
||||
+ "device:geolocation_control",
|
||||
"device:hid",
|
||||
"device:input_service",
|
||||
"device:nfc",
|
||||
"device:mtp",
|
||||
--
|
||||
2.17.0
|
||||
|
||||
|
|
|
@ -1,54 +1,79 @@
|
|||
From 800aa10d300af0f3fe162ae586b6b1ebe0566ab4 Mon Sep 17 00:00:00 2001
|
||||
From: Catalin Fratila <catalinf@microsoft.com>
|
||||
Date: Fri, 19 May 2017 09:28:53 +0200
|
||||
Subject: [PATCH] Handle everything not in [200, 300) as error. For example
|
||||
HockeyApp responds with 202.
|
||||
|
||||
(cherry picked from commit f7c320766756a8aaa45ccbcff2945053d9f7e109)
|
||||
(cherry picked from commit 1875fddc7e671b14d8b54068301d9648d12e9dc2)
|
||||
(cherry picked from commit 670fb453b0c3d6ae0a0d5923f68df02464337617)
|
||||
---
|
||||
third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc | 2 +-
|
||||
third_party/crashpad/crashpad/util/net/http_transport_mac.mm | 2 +-
|
||||
third_party/crashpad/crashpad/util/net/http_transport_win.cc | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc b/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
|
||||
index c16a593..0e262b0 100644
|
||||
--- a/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
|
||||
+++ b/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
|
||||
@@ -338,7 +338,7 @@ bool HTTPTransportLibcurl::ExecuteSynchronously(std::string* response_body) {
|
||||
return false;
|
||||
}
|
||||
diff --git a/third_party/crashpad/crashpad/util/net/http_transport.h b/third_party/crashpad/crashpad/util/net/http_transport.h
|
||||
index f91a556..acd4e44 100644
|
||||
--- a/third_party/crashpad/crashpad/util/net/http_transport.h
|
||||
+++ b/third_party/crashpad/crashpad/util/net/http_transport.h
|
||||
@@ -90,7 +90,7 @@
|
||||
//! if the response body is not required.
|
||||
//!
|
||||
//! \return Whether or not the request was successful, defined as returning
|
||||
- //! a HTTP status 200 (OK) code.
|
||||
+ //! a HTTP status code in the range 200-203 (inclusive).
|
||||
virtual bool ExecuteSynchronously(std::string* response_body) = 0;
|
||||
|
||||
- if (status != 200) {
|
||||
+ if (status < 200 || status >= 300) {
|
||||
LOG(ERROR) << base::StringPrintf("HTTP status %ld", status);
|
||||
return false;
|
||||
}
|
||||
protected:
|
||||
diff --git a/third_party/crashpad/crashpad/util/net/http_transport_mac.mm b/third_party/crashpad/crashpad/util/net/http_transport_mac.mm
|
||||
index 8d5f78c..a6434c2 100644
|
||||
index 8d5f78c..a433bb3 100644
|
||||
--- a/third_party/crashpad/crashpad/util/net/http_transport_mac.mm
|
||||
+++ b/third_party/crashpad/crashpad/util/net/http_transport_mac.mm
|
||||
@@ -293,7 +293,7 @@ static void Unschedule(CFReadStreamRef stream,
|
||||
@@ -293,7 +293,7 @@
|
||||
return false;
|
||||
}
|
||||
NSInteger http_status = [http_response statusCode];
|
||||
- if (http_status != 200) {
|
||||
+ if (http_status < 200 || http_status >= 300) {
|
||||
+ if (http_status < 200 || http_status > 203) {
|
||||
LOG(ERROR) << base::StringPrintf("HTTP status %ld",
|
||||
implicit_cast<long>(http_status));
|
||||
return false;
|
||||
diff --git a/third_party/crashpad/crashpad/util/net/http_transport_socket.cc b/third_party/crashpad/crashpad/util/net/http_transport_socket.cc
|
||||
index f0e2dc1..34d8dee 100644
|
||||
--- a/third_party/crashpad/crashpad/util/net/http_transport_socket.cc
|
||||
+++ b/third_party/crashpad/crashpad/util/net/http_transport_socket.cc
|
||||
@@ -457,10 +457,18 @@
|
||||
LOG(ERROR) << "ReadLine";
|
||||
return false;
|
||||
}
|
||||
- static constexpr const char kHttp10[] = "HTTP/1.0 200 ";
|
||||
- static constexpr const char kHttp11[] = "HTTP/1.1 200 ";
|
||||
- return StartsWith(response_line, kHttp10, strlen(kHttp10)) ||
|
||||
- StartsWith(response_line, kHttp11, strlen(kHttp11));
|
||||
+ static constexpr const char kHttp10[] = "HTTP/1.0 ";
|
||||
+ static constexpr const char kHttp11[] = "HTTP/1.1 ";
|
||||
+ if (!(StartsWith(response_line, kHttp10, strlen(kHttp10)) ||
|
||||
+ StartsWith(response_line, kHttp11, strlen(kHttp11))) ||
|
||||
+ response_line.size() < strlen(kHttp10) + 3 ||
|
||||
+ response_line.at(strlen(kHttp10) + 3) != ' ') {
|
||||
+ return false;
|
||||
+ }
|
||||
+ unsigned int http_status = 0;
|
||||
+ return base::StringToUint(response_line.substr(strlen(kHttp10), 3),
|
||||
+ &http_status) &&
|
||||
+ http_status >= 200 && http_status <= 203;
|
||||
}
|
||||
|
||||
bool ReadResponseHeaders(int sock, HTTPHeaders* headers) {
|
||||
diff --git a/third_party/crashpad/crashpad/util/net/http_transport_test.cc b/third_party/crashpad/crashpad/util/net/http_transport_test.cc
|
||||
index 7b5f41d..d73dc99 100644
|
||||
--- a/third_party/crashpad/crashpad/util/net/http_transport_test.cc
|
||||
+++ b/third_party/crashpad/crashpad/util/net/http_transport_test.cc
|
||||
@@ -137,7 +137,7 @@
|
||||
|
||||
std::string response_body;
|
||||
bool success = transport->ExecuteSynchronously(&response_body);
|
||||
- if (response_code_ == 200) {
|
||||
+ if (response_code_ >= 200 && response_code_ <= 203) {
|
||||
EXPECT_TRUE(success);
|
||||
std::string expect_response_body = random_string + "\r\n";
|
||||
EXPECT_EQ(response_body, expect_response_body);
|
||||
diff --git a/third_party/crashpad/crashpad/util/net/http_transport_win.cc b/third_party/crashpad/crashpad/util/net/http_transport_win.cc
|
||||
index 18d343c..40c3061 100644
|
||||
index 18d343c..2919bc1 100644
|
||||
--- a/third_party/crashpad/crashpad/util/net/http_transport_win.cc
|
||||
+++ b/third_party/crashpad/crashpad/util/net/http_transport_win.cc
|
||||
@@ -375,7 +375,7 @@ bool HTTPTransportWin::ExecuteSynchronously(std::string* response_body) {
|
||||
@@ -375,7 +375,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
- if (status_code != 200) {
|
||||
+ if (status_code < 200 || status_code >= 300) {
|
||||
+ if (status_code < 200 || status_code > 203) {
|
||||
LOG(ERROR) << base::StringPrintf("HTTP status %lu", status_code);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/base/logging.h b/base/logging.h
|
||||
index 582fb89868cd..24d3e82232b6 100644
|
||||
index 29960599a5c6..7352201e7b66 100644
|
||||
--- a/base/logging.h
|
||||
+++ b/base/logging.h
|
||||
@@ -850,7 +850,7 @@ const LogSeverity LOG_DCHECK = LOG_INFO;
|
||||
@@ -874,7 +874,7 @@ const LogSeverity LOG_DCHECK = LOG_FATAL;
|
||||
|
||||
#else // !(defined(_PREFAST_) && defined(OS_WIN))
|
||||
|
||||
|
@ -12,7 +12,7 @@ index 582fb89868cd..24d3e82232b6 100644
|
|||
#define DCHECK(condition) \
|
||||
LAZY_STREAM(LOG_STREAM(DCHECK), !ANALYZER_ASSUME_TRUE(condition)) \
|
||||
diff --git a/base/memory/weak_ptr.cc b/base/memory/weak_ptr.cc
|
||||
index 8879651e6da7..33fe8948a063 100644
|
||||
index d2a7d89e5667..def40703ea25 100644
|
||||
--- a/base/memory/weak_ptr.cc
|
||||
+++ b/base/memory/weak_ptr.cc
|
||||
@@ -23,8 +23,8 @@ void WeakReference::Flag::Invalidate() {
|
||||
|
@ -27,10 +27,10 @@ index 8879651e6da7..33fe8948a063 100644
|
|||
}
|
||||
|
||||
diff --git a/base/process/kill_win.cc b/base/process/kill_win.cc
|
||||
index 6a0038e2c00d..dd00dfb3e5d0 100644
|
||||
index 7a664429bcd3..26f49dc3d1e7 100644
|
||||
--- a/base/process/kill_win.cc
|
||||
+++ b/base/process/kill_win.cc
|
||||
@@ -45,7 +45,7 @@ TerminationStatus GetTerminationStatus(ProcessHandle handle, int* exit_code) {
|
||||
@@ -23,7 +23,7 @@ TerminationStatus GetTerminationStatus(ProcessHandle handle, int* exit_code) {
|
||||
DWORD tmp_exit_code = 0;
|
||||
|
||||
if (!::GetExitCodeProcess(handle, &tmp_exit_code)) {
|
||||
|
@ -39,11 +39,29 @@ index 6a0038e2c00d..dd00dfb3e5d0 100644
|
|||
|
||||
// This really is a random number. We haven't received any
|
||||
// information about the exit code, presumably because this
|
||||
diff --git a/base/process/process_metrics_win.cc b/base/process/process_metrics_win.cc
|
||||
index 18ef58a725c3..239f319c8b4c 100644
|
||||
--- a/base/process/process_metrics_win.cc
|
||||
+++ b/base/process/process_metrics_win.cc
|
||||
@@ -153,10 +153,9 @@ bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const {
|
||||
ProcessMetrics::ProcessMetrics(ProcessHandle process) {
|
||||
if (process) {
|
||||
HANDLE duplicate_handle = INVALID_HANDLE_VALUE;
|
||||
- BOOL result = ::DuplicateHandle(::GetCurrentProcess(), process,
|
||||
- ::GetCurrentProcess(), &duplicate_handle,
|
||||
- PROCESS_QUERY_INFORMATION, FALSE, 0);
|
||||
- DPCHECK(result);
|
||||
+ ::DuplicateHandle(::GetCurrentProcess(), process,
|
||||
+ ::GetCurrentProcess(), &duplicate_handle,
|
||||
+ PROCESS_QUERY_INFORMATION, FALSE, 0);
|
||||
process_.Set(duplicate_handle);
|
||||
}
|
||||
}
|
||||
diff --git a/components/viz/service/display/program_binding.h b/components/viz/service/display/program_binding.h
|
||||
index 70f1ff97b1ac..d1abd804e988 100644
|
||||
index 8b28c57f854e..a0e7056af23f 100644
|
||||
--- a/components/viz/service/display/program_binding.h
|
||||
+++ b/components/viz/service/display/program_binding.h
|
||||
@@ -416,7 +416,7 @@ class VIZ_SERVICE_EXPORT Program : public ProgramBindingBase {
|
||||
@@ -433,7 +433,7 @@ class VIZ_SERVICE_EXPORT Program : public ProgramBindingBase {
|
||||
if (!ProgramBindingBase::Init(context_provider->ContextGL(),
|
||||
vertex_shader_.GetShaderString(),
|
||||
fragment_shader_.GetShaderString())) {
|
||||
|
@ -52,8 +70,8 @@ index 70f1ff97b1ac..d1abd804e988 100644
|
|||
return;
|
||||
}
|
||||
|
||||
@@ -428,7 +428,7 @@ class VIZ_SERVICE_EXPORT Program : public ProgramBindingBase {
|
||||
|
||||
@@ -445,7 +445,7 @@ class VIZ_SERVICE_EXPORT Program : public ProgramBindingBase {
|
||||
|
||||
// Link after binding uniforms
|
||||
if (!Link(context_provider->ContextGL())) {
|
||||
- DCHECK(IsContextLost(context_provider->ContextGL()));
|
||||
|
@ -61,11 +79,26 @@ index 70f1ff97b1ac..d1abd804e988 100644
|
|||
return;
|
||||
}
|
||||
|
||||
diff --git a/components/viz/service/display_embedder/server_shared_bitmap_manager.cc b/components/viz/service/display_embedder/server_shared_bitmap_manager.cc
|
||||
index 9d84f91109a3..5e252917bc0f 100644
|
||||
--- a/components/viz/service/display_embedder/server_shared_bitmap_manager.cc
|
||||
+++ b/components/viz/service/display_embedder/server_shared_bitmap_manager.cc
|
||||
@@ -63,7 +63,9 @@ base::LazyInstance<ServerSharedBitmapManager>::DestructorAtExit
|
||||
ServerSharedBitmapManager::ServerSharedBitmapManager() = default;
|
||||
|
||||
ServerSharedBitmapManager::~ServerSharedBitmapManager() {
|
||||
- DCHECK(handle_map_.empty());
|
||||
+ // FIXME(alexeykuzmin): Gets constantly triggered on Windows CI.
|
||||
+ // Backporting https://chromium-review.googlesource.com/802574 should help.
|
||||
+ // DCHECK(handle_map_.empty());
|
||||
}
|
||||
|
||||
ServerSharedBitmapManager* ServerSharedBitmapManager::current() {
|
||||
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
|
||||
index ff1d3fcb6eba..ad6578f645d4 100644
|
||||
index 74ff6b4286c2..02bf1c55d86f 100644
|
||||
--- a/content/browser/frame_host/navigation_controller_impl.cc
|
||||
+++ b/content/browser/frame_host/navigation_controller_impl.cc
|
||||
@@ -1079,8 +1079,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
|
||||
@@ -1083,8 +1083,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
|
||||
return NAVIGATION_TYPE_NEW_SUBFRAME;
|
||||
}
|
||||
|
||||
|
@ -78,7 +111,7 @@ index ff1d3fcb6eba..ad6578f645d4 100644
|
|||
|
||||
if (rfh->GetParent()) {
|
||||
// All manual subframes would be did_create_new_entry and handled above, so
|
||||
@@ -1301,7 +1303,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
|
||||
@@ -1305,7 +1307,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
|
||||
new_entry->GetFavicon() = GetLastCommittedEntry()->GetFavicon();
|
||||
}
|
||||
|
||||
|
@ -91,10 +124,10 @@ index ff1d3fcb6eba..ad6578f645d4 100644
|
|||
// navigation. Now we know that the renderer has updated its state accordingly
|
||||
// and it is safe to also clear the browser side history.
|
||||
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
|
||||
index 346765edaef9..a30e87bfcda6 100644
|
||||
index cd755cbc3f2c..321a12f74202 100644
|
||||
--- a/content/browser/frame_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/frame_host/render_frame_host_impl.cc
|
||||
@@ -2072,8 +2073,10 @@ void RenderFrameHostImpl::AllowBindings(int bindings_flags) {
|
||||
@@ -2345,8 +2345,10 @@ void RenderFrameHostImpl::AllowBindings(int bindings_flags) {
|
||||
}
|
||||
|
||||
enabled_bindings_ |= bindings_flags;
|
||||
|
@ -108,10 +141,10 @@ index 346765edaef9..a30e87bfcda6 100644
|
|||
if (render_frame_created_) {
|
||||
if (!frame_bindings_control_)
|
||||
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 8ee84cdafbde..c7ad6fa8c75f 100644
|
||||
index d86576cc36ac..5b4ae0732914 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_cocoa.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_cocoa.mm
|
||||
@@ -618,8 +618,8 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
@@ -650,8 +650,8 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
if (EventIsReservedBySystem(theEvent))
|
||||
return;
|
||||
|
||||
|
@ -135,6 +168,19 @@ index f3c68fab3de6..b8609daf3ef9 100644
|
|||
return;
|
||||
}
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/dom/node.cc b/third_party/blink/renderer/core/dom/node.cc
|
||||
index ca47b2d09693..b4b6ce96209b 100644
|
||||
--- a/third_party/blink/renderer/core/dom/node.cc
|
||||
+++ b/third_party/blink/renderer/core/dom/node.cc
|
||||
@@ -2535,7 +2535,7 @@ StaticNodeList* Node::getDestinationInsertionPoints() {
|
||||
|
||||
HTMLSlotElement* Node::AssignedSlot() const {
|
||||
// assignedSlot doesn't need to call updateDistribution().
|
||||
- DCHECK(!IsPseudoElement());
|
||||
+ // DCHECK(!IsPseudoElement());
|
||||
if (ShadowRoot* root = V1ShadowRootOfParent())
|
||||
return root->AssignedSlotFor(*this);
|
||||
return nullptr;
|
||||
diff --git a/third_party/blink/renderer/core/loader/BUILD.gn b/third_party/blink/renderer/core/loader/BUILD.gn
|
||||
index 82f6e8bc9d33..ccad95d61a4a 100644
|
||||
--- a/third_party/blink/renderer/core/loader/BUILD.gn
|
||||
|
@ -151,19 +197,6 @@ index 82f6e8bc9d33..ccad95d61a4a 100644
|
|||
+ defines += [ "ELECTRON_NO_DCHECK" ]
|
||||
+ }
|
||||
}
|
||||
diff --git a/third_party/blink/renderer/core/dom/node.cc b/third_party/blink/renderer/core/dom/node.cc
|
||||
index 922a2561bcef..e31fa34f98ea 100644
|
||||
--- a/third_party/blink/renderer/core/dom/node.cc
|
||||
+++ b/third_party/blink/renderer/core/dom/node.cc
|
||||
@@ -2435,7 +2435,7 @@ StaticNodeList* Node::getDestinationInsertionPoints() {
|
||||
|
||||
HTMLSlotElement* Node::AssignedSlot() const {
|
||||
// assignedSlot doesn't need to call updateDistribution().
|
||||
- DCHECK(!IsPseudoElement());
|
||||
+ // DCHECK(!IsPseudoElement());
|
||||
if (ShadowRoot* root = V1ShadowRootOfParent())
|
||||
return root->AssignedSlotFor(*this);
|
||||
return nullptr;
|
||||
diff --git a/third_party/blink/renderer/platform/wtf/text/string_impl.h b/third_party/blink/renderer/platform/wtf/text/string_impl.h
|
||||
index 158d81ca9ba2..1b6aafecadef 100644
|
||||
--- a/third_party/blink/renderer/platform/wtf/text/string_impl.h
|
||||
|
@ -193,26 +226,11 @@ index 158d81ca9ba2..1b6aafecadef 100644
|
|||
DCHECK(IsStatic() || verifier_.OnDeref(ref_count_))
|
||||
<< AsciiForDebugging() << " " << CurrentThread();
|
||||
#endif
|
||||
diff --git a/url/BUILD.gn b/url/BUILD.gn
|
||||
index 82eb115ae666..b4806804cdbf 100644
|
||||
--- a/url/BUILD.gn
|
||||
+++ b/url/BUILD.gn
|
||||
@@ -96,6 +96,10 @@ component("url") {
|
||||
]
|
||||
deps += [ "//third_party/icu" ]
|
||||
}
|
||||
+
|
||||
+ if (is_electron_build) {
|
||||
+ defines += [ "ELECTRON_NO_DCHECK" ]
|
||||
+ }
|
||||
}
|
||||
|
||||
if (is_android) {
|
||||
diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
|
||||
index 674b0e9a909c..a1bff6e40f56 100644
|
||||
index e49dd8c81270..9e61c901cd2d 100644
|
||||
--- a/ui/base/clipboard/clipboard_win.cc
|
||||
+++ b/ui/base/clipboard/clipboard_win.cc
|
||||
@@ -886,9 +886,9 @@ void ClipboardWin::WriteBitmapFromHandle(HBITMAP source_hbitmap,
|
||||
@@ -905,9 +905,9 @@ void ClipboardWin::WriteBitmapFromHandle(HBITMAP source_hbitmap,
|
||||
}
|
||||
|
||||
void ClipboardWin::WriteToClipboard(unsigned int format, HANDLE handle) {
|
||||
|
@ -224,49 +242,21 @@ index 674b0e9a909c..a1bff6e40f56 100644
|
|||
FreeData(format, handle);
|
||||
}
|
||||
}
|
||||
diff --git a/third_party/WebKit/Source/core/animation/ElementAnimations.cpp b/third_party/WebKit/Source/core/animation/ElementAnimations.cpp
|
||||
index 60b8123cd818..dc719dd31dbf 100644
|
||||
--- a/third_party/WebKit/Source/core/animation/ElementAnimations.cpp
|
||||
+++ b/third_party/WebKit/Source/core/animation/ElementAnimations.cpp
|
||||
@@ -108,7 +108,7 @@ void ElementAnimations::UpdateBaseComputedStyle(
|
||||
base_computed_style_ = nullptr;
|
||||
return;
|
||||
}
|
||||
-#if DCHECK_IS_ON()
|
||||
+#if 0
|
||||
if (base_computed_style_ && computed_style)
|
||||
DCHECK(*base_computed_style_ == *computed_style);
|
||||
#endif
|
||||
diff --git a/base/process/process_metrics_win.cc b/base/process/process_metrics_win.cc
|
||||
index faabdbf63a2a..ba56e4cd994c 100644
|
||||
--- a/base/process/process_metrics_win.cc
|
||||
+++ b/base/process/process_metrics_win.cc
|
||||
@@ -179,10 +179,9 @@ bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const {
|
||||
ProcessMetrics::ProcessMetrics(ProcessHandle process) : last_system_time_(0) {
|
||||
if (process) {
|
||||
HANDLE duplicate_handle = INVALID_HANDLE_VALUE;
|
||||
- BOOL result = ::DuplicateHandle(::GetCurrentProcess(), process,
|
||||
- ::GetCurrentProcess(), &duplicate_handle,
|
||||
- PROCESS_QUERY_INFORMATION, FALSE, 0);
|
||||
- DPCHECK(result);
|
||||
+ ::DuplicateHandle(::GetCurrentProcess(), process,
|
||||
+ ::GetCurrentProcess(), &duplicate_handle,
|
||||
+ PROCESS_QUERY_INFORMATION, FALSE, 0);
|
||||
process_.Set(duplicate_handle);
|
||||
diff --git a/url/BUILD.gn b/url/BUILD.gn
|
||||
index c4deb10db9ca..ecc068d7447a 100644
|
||||
--- a/url/BUILD.gn
|
||||
+++ b/url/BUILD.gn
|
||||
@@ -98,6 +98,10 @@ component("url") {
|
||||
]
|
||||
deps += [ "//third_party/icu" ]
|
||||
}
|
||||
}
|
||||
diff --git a/components/viz/service/display_embedder/server_shared_bitmap_manager.cc b/components/viz/service/display_embedder/server_shared_bitmap_manager.cc
|
||||
index 9477a5aa45f9..895425c8c6cc 100644
|
||||
--- a/components/viz/service/display_embedder/server_shared_bitmap_manager.cc
|
||||
+++ b/components/viz/service/display_embedder/server_shared_bitmap_manager.cc
|
||||
@@ -69,7 +69,9 @@ base::LazyInstance<ServerSharedBitmapManager>::DestructorAtExit
|
||||
ServerSharedBitmapManager::ServerSharedBitmapManager() = default;
|
||||
|
||||
ServerSharedBitmapManager::~ServerSharedBitmapManager() {
|
||||
- DCHECK(handle_map_.empty());
|
||||
+ // FIXME(alexeykuzmin): Gets constantly triggered on Windows CI.
|
||||
+ // Backporting https://chromium-review.googlesource.com/802574 should help.
|
||||
+ // DCHECK(handle_map_.empty());
|
||||
+
|
||||
+ if (is_electron_build) {
|
||||
+ defines += [ "ELECTRON_NO_DCHECK" ]
|
||||
+ }
|
||||
}
|
||||
|
||||
ServerSharedBitmapManager* ServerSharedBitmapManager::current() {
|
||||
if (is_android) {
|
||||
--
|
||||
2.17.0
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/ui/views/widget/desktop_aura/desktop_screen_win.cc b/ui/views/widget/desktop_aura/desktop_screen_win.cc
|
||||
index f772f64..7d13f9f 100644
|
||||
index f772f64d656e..7d13f9f81b6c 100644
|
||||
--- a/ui/views/widget/desktop_aura/desktop_screen_win.cc
|
||||
+++ b/ui/views/widget/desktop_aura/desktop_screen_win.cc
|
||||
@@ -32,6 +32,8 @@ display::Display DesktopScreenWin::GetDisplayMatching(
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index c8fb7eecb9c8..3d995aa331b1 100644
|
||||
index cadeb2322620..3c5d1afbdfee 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -251,6 +251,10 @@ const int kSynthesizedMouseMessagesTimeDifference = 500;
|
||||
|
||||
@@ -256,6 +256,10 @@ const int kSynthesizedMouseMessagesTimeDifference = 500;
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
+bool HWNDMessageHandlerDelegate::HasNativeFrame() const {
|
||||
+ return false;
|
||||
+}
|
||||
|
@ -13,7 +13,7 @@ index c8fb7eecb9c8..3d995aa331b1 100644
|
|||
// A scoping class that prevents a window from being able to redraw in response
|
||||
// to invalidations that may occur within it for the lifetime of the object.
|
||||
//
|
||||
@@ -302,6 +306,7 @@ class HWNDMessageHandler::ScopedRedrawLock {
|
||||
@@ -307,6 +311,7 @@ class HWNDMessageHandler::ScopedRedrawLock {
|
||||
cancel_unlock_(false),
|
||||
should_lock_(owner_->IsVisible() && !owner->HasChildRenderingWindow() &&
|
||||
::IsWindow(hwnd_) &&
|
||||
|
@ -21,38 +21,38 @@ index c8fb7eecb9c8..3d995aa331b1 100644
|
|||
(!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) ||
|
||||
!ui::win::IsAeroGlassEnabled())) {
|
||||
if (should_lock_)
|
||||
@@ -903,6 +908,10 @@ bool HWNDMessageHandler::HasChildRenderingWindow() {
|
||||
@@ -898,6 +903,10 @@ bool HWNDMessageHandler::HasChildRenderingWindow() {
|
||||
hwnd());
|
||||
}
|
||||
|
||||
|
||||
+bool HWNDMessageHandler::HasNativeFrame() {
|
||||
+ return delegate_->HasNativeFrame();
|
||||
+}
|
||||
+
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HWNDMessageHandler, gfx::WindowImpl overrides:
|
||||
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
|
||||
index 5d5765c1928e..d77991cfa737 100644
|
||||
index 5afb32aa043c..3d17f29dff9a 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.h
|
||||
+++ b/ui/views/win/hwnd_message_handler.h
|
||||
@@ -227,6 +227,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
|
||||
@@ -177,6 +177,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
|
||||
typedef std::set<DWORD> TouchIDs;
|
||||
enum class DwmFrameState { OFF, ON };
|
||||
|
||||
|
||||
+ bool HasNativeFrame();
|
||||
+
|
||||
// Overridden from WindowImpl:
|
||||
HICON GetDefaultWindowIcon() const override;
|
||||
HICON GetSmallWindowIcon() const override;
|
||||
diff --git a/ui/views/win/hwnd_message_handler_delegate.h b/ui/views/win/hwnd_message_handler_delegate.h
|
||||
index d13f807e4a75..877189d63616 100644
|
||||
index 1b2d98a85738..dd080180aebd 100644
|
||||
--- a/ui/views/win/hwnd_message_handler_delegate.h
|
||||
+++ b/ui/views/win/hwnd_message_handler_delegate.h
|
||||
@@ -46,6 +46,8 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate {
|
||||
// True if the widget associated with this window has a non-client view.
|
||||
virtual bool HasNonClientView() const = 0;
|
||||
|
||||
|
||||
+ virtual bool HasNativeFrame() const;
|
||||
+
|
||||
// Returns who we want to be drawing the frame. Either the system (Windows)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/content/browser/frame_host/render_frame_proxy_host.cc b/content/browser/frame_host/render_frame_proxy_host.cc
|
||||
index b44b0fd..a74d827 100644
|
||||
index 838bc1e20c30..2aa16fbf19fc 100644
|
||||
--- a/content/browser/frame_host/render_frame_proxy_host.cc
|
||||
+++ b/content/browser/frame_host/render_frame_proxy_host.cc
|
||||
@@ -253,6 +253,12 @@ void RenderFrameProxyHost::SetDestructionCallback(
|
||||
@@ -260,6 +260,12 @@ void RenderFrameProxyHost::SetDestructionCallback(
|
||||
|
||||
void RenderFrameProxyHost::OnDetach() {
|
||||
if (frame_tree_node_->render_manager()->ForInnerDelegate()) {
|
||||
|
|
|
@ -39,17 +39,18 @@ index b480129fcd7c..4f4f7d06029b 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
|
||||
index 72dde06a99a7..e00d6b863b84 100644
|
||||
index c514878fafe7..bcd3432f75c9 100644
|
||||
--- a/chrome/browser/ui/BUILD.gn
|
||||
+++ b/chrome/browser/ui/BUILD.gn
|
||||
@@ -2496,7 +2496,9 @@ split_static_library("ui") {
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2495,7 +2495,10 @@ split_static_library("ui") {
|
||||
"views/tabs/window_finder_mac.mm",
|
||||
]
|
||||
|
||||
- deps += [ "//extensions/components/native_app_window" ]
|
||||
+
|
||||
+ if (enable_extensions) {
|
||||
+ deps += [ "//extensions/components/native_app_window" ]
|
||||
+ }
|
||||
|
||||
|
||||
# Truly cocoa-browser-specific sources. These are secondary UI pieces that
|
||||
# are obsolete before mac_views_browser will ever ship, so they aren't
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index 77c870b8a075..f1c4076788c5 100644
|
||||
index 213f32e0891f..60cfacdcf9fc 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -664,6 +664,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
@@ -668,6 +668,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
if (is_hidden_)
|
||||
return;
|
||||
|
||||
|
@ -13,10 +13,10 @@ index 77c870b8a075..f1c4076788c5 100644
|
|||
|
||||
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 b6aa99e..ef4fa35 100644
|
||||
index 316385180c60..afce0525e89d 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -124,6 +124,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl : public RenderWidgetHost,
|
||||
@@ -149,6 +149,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
// RenderWidgetHostImpl.
|
||||
static RenderWidgetHostImpl* From(RenderWidgetHost* rwh);
|
||||
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
diff --git a/content/browser/renderer_host/input/mouse_wheel_event_queue.cc b/content/browser/renderer_host/input/mouse_wheel_event_queue.cc
|
||||
index 5d5bead..f2ac4d8 100644
|
||||
index c3f4641e8525..dd50ff1c2557 100644
|
||||
--- a/content/browser/renderer_host/input/mouse_wheel_event_queue.cc
|
||||
+++ b/content/browser/renderer_host/input/mouse_wheel_event_queue.cc
|
||||
@@ -339,7 +339,7 @@ void MouseWheelEventQueue::SendScrollBegin(
|
||||
@@ -362,7 +362,8 @@ void MouseWheelEventQueue::SendScrollBegin(
|
||||
(synthetic && !needs_scroll_begin_when_scroll_latching_disabled_) ||
|
||||
needs_scroll_begin_when_scroll_latching_disabled_);
|
||||
|
||||
- DCHECK(!scroll_in_progress_);
|
||||
+ // DCHECK(!scroll_in_progress_);
|
||||
scroll_in_progress_ = true;
|
||||
- DCHECK(!client_->IsWheelScrollInProgress());
|
||||
+ // DCHECK(!client_->IsWheelScrollInProgress());
|
||||
|
||||
WebGestureEvent scroll_begin(gesture_update);
|
||||
scroll_begin.SetType(WebInputEvent::kGestureScrollBegin);
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index 97ca37d843be..fdc4a3f90c64 100644
|
||||
index 9b930b8acd1d..f3d356f86f15 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -1230,8 +1238,8 @@ void RenderWidgetHostImpl::ForwardGestureEventWithLatencyInfo(
|
||||
@@ -1263,8 +1263,8 @@ void RenderWidgetHostImpl::ForwardGestureEventWithLatencyInfo(
|
||||
// GSB and GSU events instead of sending them to the renderer and continues
|
||||
// to progress the fling. So, the renderer doesn't receive two GSB events
|
||||
// without any GSE in between.
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc
|
||||
index a39067db8c52..4a0d69dc3fb5 100644
|
||||
index 9abb526ef011..296abf0a1b93 100644
|
||||
--- a/third_party/blink/renderer/core/dom/document.cc
|
||||
+++ b/third_party/blink/renderer/core/dom/document.cc
|
||||
@@ -3239,7 +3239,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient& chrome_client,
|
||||
@@ -3442,7 +3442,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient& chrome_client,
|
||||
"Blocked attempt to show a 'beforeunload' confirmation panel for a "
|
||||
"frame that never had a user gesture since its load. "
|
||||
"https://www.chromestatus.com/feature/5082396709879808"));
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
|
||||
index e6f6b3012b02..965b58e237ec 100644
|
||||
index b682235b0f87..0c88f4bf86b6 100644
|
||||
--- a/content/browser/frame_host/render_frame_host_manager.cc
|
||||
+++ b/content/browser/frame_host/render_frame_host_manager.cc
|
||||
@@ -1834,6 +1834,18 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
@@ -1912,6 +1912,18 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
bool was_server_redirect = request.navigation_handle() &&
|
||||
request.navigation_handle()->WasServerRedirect();
|
||||
|
||||
|
@ -21,8 +21,8 @@ index e6f6b3012b02..965b58e237ec 100644
|
|||
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
|
||||
@@ -1850,6 +1862,19 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
|
||||
@@ -1931,6 +1943,19 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
request.common_params().url));
|
||||
no_renderer_swap_allowed |=
|
||||
request.from_begin_navigation() && !can_renderer_initiate_transfer;
|
||||
+
|
||||
|
@ -41,7 +41,7 @@ index e6f6b3012b02..965b58e237ec 100644
|
|||
} else {
|
||||
// Subframe navigations will use the current renderer, unless specifically
|
||||
// allowed to swap processes.
|
||||
@@ -1861,18 +1886,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
@@ -1942,18 +1967,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
if (no_renderer_swap_allowed)
|
||||
return scoped_refptr<SiteInstance>(current_site_instance);
|
||||
|
||||
|
@ -59,13 +59,13 @@ index e6f6b3012b02..965b58e237ec 100644
|
|||
- request.dest_site_instance(), candidate_site_instance,
|
||||
+ request.dest_site_instance(), candidate_site_instance.get(),
|
||||
request.common_params().transition,
|
||||
request.state() == NavigationRequest::FAILED,
|
||||
request.restore_type() != RestoreType::NONE, request.is_view_source(),
|
||||
was_server_redirect);
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index 746760e8596c..99d9e0770f32 100644
|
||||
index 3ca627448e33..7d0c9ed7e1af 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -181,6 +181,15 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -186,6 +186,15 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
public:
|
||||
virtual ~ContentBrowserClient() {}
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
|
||||
index 56402d477ca3..8ab11bd18783 100644
|
||||
index 076d137eb7cf..c10c3b0be66b 100644
|
||||
--- a/gin/isolate_holder.cc
|
||||
+++ b/gin/isolate_holder.cc
|
||||
@@ -116,9 +116,10 @@ IsolateHolder::~IsolateHolder() {
|
||||
@@ -119,9 +119,10 @@ IsolateHolder::~IsolateHolder() {
|
||||
void IsolateHolder::Initialize(ScriptMode mode,
|
||||
V8ExtrasMode v8_extras_mode,
|
||||
v8::ArrayBuffer::Allocator* allocator,
|
||||
|
@ -30,7 +30,7 @@ index 2509aca609f9..94003c6031cf 100644
|
|||
v8::Isolate* isolate() { return isolate_; }
|
||||
|
||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
||||
index 02d4b1cd6521..ec6d51d7e5d8 100644
|
||||
index be2b9149e440..816e56aa4f6b 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -236,12 +236,14 @@ LoadV8FileResult MapOpenedFile(const OpenedFileMap::mapped_type& file_region,
|
||||
|
@ -51,7 +51,7 @@ index 02d4b1cd6521..ec6d51d7e5d8 100644
|
|||
if (base::FeatureList::IsEnabled(features::kV8OptimizeJavascript)) {
|
||||
static const char optimize[] = "--opt";
|
||||
diff --git a/gin/v8_initializer.h b/gin/v8_initializer.h
|
||||
index f0a7c5e0fb68..df4ab4f3e4b9 100644
|
||||
index 6f3265ba4d06..29f28bebbdcd 100644
|
||||
--- a/gin/v8_initializer.h
|
||||
+++ b/gin/v8_initializer.h
|
||||
@@ -21,7 +21,8 @@ class GIN_EXPORT V8Initializer {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
diff --git a/build/config/linux/gtk/BUILD.gn b/build/config/linux/gtk/BUILD.gn
|
||||
index eb75461..2116f93 100644
|
||||
index deae4d3455a8..fd5d906b98b0 100644
|
||||
--- a/build/config/linux/gtk/BUILD.gn
|
||||
+++ b/build/config/linux/gtk/BUILD.gn
|
||||
@@ -17,6 +17,8 @@ assert(is_linux, "This file should only be referenced on Linux")
|
||||
group("gtk") {
|
||||
@@ -18,6 +18,8 @@ group("gtk") {
|
||||
visibility = [
|
||||
"//chrome/test:interactive_ui_tests",
|
||||
"//chrome/test:unit_tests",
|
||||
+ "//electron:*",
|
||||
+ "//electron/brightray:*",
|
||||
"//examples:peerconnection_client",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/build/toolchain/win/tool_wrapper.py b/build/toolchain/win/tool_wrapper.py
|
||||
index a76e926a8681..c43839a01211 100644
|
||||
index 801d7a9b8e03..7b54f8dceb36 100644
|
||||
--- a/build/toolchain/win/tool_wrapper.py
|
||||
+++ b/build/toolchain/win/tool_wrapper.py
|
||||
@@ -258,7 +258,11 @@ class WinTool(object):
|
||||
@@ -254,7 +254,11 @@ class WinTool(object):
|
||||
if rc_exe_exit_code == 0:
|
||||
import filecmp
|
||||
# Strip "/fo" prefix.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
diff --git a/third_party/leveldatabase/port/port_chromium.h b/third_party/leveldatabase/port/port_chromium.h
|
||||
diff --git a/third_party/leveldatabase/port/port_chromium.h b/third_party/leveldatabase/port/port_chromium.h
|
||||
index a7c449eba19c..acbce7efd582 100644
|
||||
--- a/third_party/leveldatabase/port/port_chromium.h
|
||||
+++ b/third_party/leveldatabase/port/port_chromium.h
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/chrome/browser/ui/libgtkui/app_indicator_icon.h b/chrome/browser/ui/libgtkui/app_indicator_icon.h
|
||||
index 7815fbb..f17a5c5 100644
|
||||
index 7815fbb2cea8..f17a5c59e64b 100644
|
||||
--- a/chrome/browser/ui/libgtkui/app_indicator_icon.h
|
||||
+++ b/chrome/browser/ui/libgtkui/app_indicator_icon.h
|
||||
@@ -12,6 +12,7 @@
|
||||
|
@ -20,7 +20,7 @@ index 7815fbb..f17a5c5 100644
|
|||
// The id uniquely identifies the new status icon from other chrome status
|
||||
// icons.
|
||||
diff --git a/chrome/browser/ui/libgtkui/gtk_status_icon.h b/chrome/browser/ui/libgtkui/gtk_status_icon.h
|
||||
index e4e0da4..af02871 100644
|
||||
index e4e0da40981c..af028715ada9 100644
|
||||
--- a/chrome/browser/ui/libgtkui/gtk_status_icon.h
|
||||
+++ b/chrome/browser/ui/libgtkui/gtk_status_icon.h
|
||||
@@ -10,6 +10,7 @@
|
||||
|
@ -41,7 +41,7 @@ index e4e0da4..af02871 100644
|
|||
Gtk2StatusIcon(const gfx::ImageSkia& image, const base::string16& tool_tip);
|
||||
~Gtk2StatusIcon() override;
|
||||
diff --git a/chrome/browser/ui/libgtkui/gtk_util.h b/chrome/browser/ui/libgtkui/gtk_util.h
|
||||
index 665ec57..4ccb088 100644
|
||||
index 665ec57c09d5..4ccb08807fb4 100644
|
||||
--- a/chrome/browser/ui/libgtkui/gtk_util.h
|
||||
+++ b/chrome/browser/ui/libgtkui/gtk_util.h
|
||||
@@ -11,6 +11,7 @@
|
||||
|
@ -84,7 +84,7 @@ index 665ec57..4ccb088 100644
|
|||
// Renders the border from the style context created by
|
||||
// GetStyleContextFromCss(|css_selector|) into a 24x24 bitmap and
|
||||
diff --git a/chrome/browser/ui/libgtkui/skia_utils_gtk.h b/chrome/browser/ui/libgtkui/skia_utils_gtk.h
|
||||
index e05fbe9..3afca9a 100644
|
||||
index e05fbe9d8b2f..3afca9a72ab6 100644
|
||||
--- a/chrome/browser/ui/libgtkui/skia_utils_gtk.h
|
||||
+++ b/chrome/browser/ui/libgtkui/skia_utils_gtk.h
|
||||
@@ -7,6 +7,7 @@
|
||||
|
@ -105,7 +105,7 @@ index e05fbe9..3afca9a 100644
|
|||
} // namespace libgtkui
|
||||
|
||||
diff --git a/chrome/browser/ui/libgtkui/unity_service.h b/chrome/browser/ui/libgtkui/unity_service.h
|
||||
index 8d67e14..95fbb27 100644
|
||||
index 8d67e1460837..95fbb27b6a81 100644
|
||||
--- a/chrome/browser/ui/libgtkui/unity_service.h
|
||||
+++ b/chrome/browser/ui/libgtkui/unity_service.h
|
||||
@@ -5,18 +5,20 @@
|
||||
|
|
|
@ -1,17 +1,8 @@
|
|||
From d322e351554a4fa1fbaf529769416041031f07e9 Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Apthorp <jeremya@chromium.org>
|
||||
Date: Mon, 6 Aug 2018 13:02:53 -0700
|
||||
Subject: fix: [mas] don't call private api AudioDeviceDuck
|
||||
|
||||
---
|
||||
media/audio/mac/audio_low_latency_input_mac.cc | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc
|
||||
index 173167b54dfb..1c0fda354d03 100644
|
||||
index 53586b888d82..c1d750dbf32d 100644
|
||||
--- a/media/audio/mac/audio_low_latency_input_mac.cc
|
||||
+++ b/media/audio/mac/audio_low_latency_input_mac.cc
|
||||
@@ -28,12 +28,14 @@
|
||||
@@ -31,19 +31,23 @@
|
||||
|
||||
namespace {
|
||||
extern "C" {
|
||||
|
@ -25,23 +16,16 @@ index 173167b54dfb..1c0fda354d03 100644
|
|||
+#endif
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -604,6 +606,7 @@ bool AUAudioInputStream::OpenVoiceProcessingAU() {
|
||||
return false;
|
||||
}
|
||||
|
||||
void UndoDucking(AudioDeviceID output_device_id) {
|
||||
+#ifndef MAS_BUILD
|
||||
if (AudioDeviceDuck != nullptr) {
|
||||
// Undo the ducking.
|
||||
// Obtain the AudioDeviceID of the default output AudioDevice.
|
||||
@@ -619,6 +622,7 @@ bool AUAudioInputStream::OpenVoiceProcessingAU() {
|
||||
AudioDeviceDuck(output_device, 1.0, nullptr, 0.5);
|
||||
}
|
||||
// Ramp the volume back up over half a second.
|
||||
AudioDeviceDuck(output_device_id, 1.0, nullptr, 0.5);
|
||||
}
|
||||
+#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
--
|
||||
2.17.0
|
||||
|
||||
|
|
|
@ -1,25 +1,16 @@
|
|||
From 9fb1ac04b1a3e7ec53e27cf1f413469d04360d1e Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Apthorp <jeremya@chromium.org>
|
||||
Date: Mon, 6 Aug 2018 17:11:14 -0700
|
||||
Subject: fix: [mas] remove usage of _CFIsObjC
|
||||
|
||||
---
|
||||
base/mac/foundation_util.mm | 7 +------
|
||||
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
|
||||
index aec8c0f6398c..6a6dfc272d45 100644
|
||||
index 15fc15ba307e..7ca4e0ec5ca8 100644
|
||||
--- a/base/mac/foundation_util.mm
|
||||
+++ b/base/mac/foundation_util.mm
|
||||
@@ -25,7 +25,6 @@
|
||||
extern "C" {
|
||||
@@ -26,7 +26,6 @@ CFTypeID SecKeyGetTypeID();
|
||||
#if !defined(OS_IOS)
|
||||
CFTypeID SecACLGetTypeID();
|
||||
CFTypeID SecTrustedApplicationGetTypeID();
|
||||
-Boolean _CFIsObjC(CFTypeID typeID, CFTypeRef obj);
|
||||
} // extern "C"
|
||||
#endif
|
||||
} // extern "C"
|
||||
|
||||
@@ -323,8 +322,7 @@ NSFont* CFToNSCast(CTFontRef cf_val) {
|
||||
@@ -325,8 +324,7 @@ NSFont* CFToNSCast(CTFontRef cf_val) {
|
||||
const_cast<NSFont*>(reinterpret_cast<const NSFont*>(cf_val));
|
||||
DCHECK(!cf_val ||
|
||||
CTFontGetTypeID() == CFGetTypeID(cf_val) ||
|
||||
|
@ -29,7 +20,7 @@ index aec8c0f6398c..6a6dfc272d45 100644
|
|||
return ns_val;
|
||||
}
|
||||
|
||||
@@ -392,9 +390,6 @@ CFCast<CTFontRef>(const CFTypeRef& cf_val) {
|
||||
@@ -394,9 +392,6 @@ CFCast<CTFontRef>(const CFTypeRef& cf_val) {
|
||||
return (CTFontRef)(cf_val);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
From 82d0ef64e22c69c0435608276149977d2811a3f7 Mon Sep 17 00:00:00 2001
|
||||
From 0680698be349b3619561c65eb072d9880e405fae Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Apthorp <nornagon@nornagon.net>
|
||||
Date: Mon, 6 Aug 2018 10:58:46 -0700
|
||||
Subject: fix: [mas] remove usage of CGDisplayUsesForceToGray
|
||||
Date: Fri, 14 Sep 2018 09:53:11 -0700
|
||||
Subject: apply patch: mas-cgdisplayusesforcetogray
|
||||
|
||||
---
|
||||
ui/display/mac/screen_mac.mm | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm
|
||||
index 4850c795480e..ec34b25a6fe8 100644
|
||||
index be4f343bcd44..84fd3ec23cfa 100644
|
||||
--- a/ui/display/mac/screen_mac.mm
|
||||
+++ b/ui/display/mac/screen_mac.mm
|
||||
@@ -106,7 +106,17 @@ Display BuildDisplayForScreen(NSScreen* screen) {
|
||||
|
|
|
@ -1,14 +1,5 @@
|
|||
From 3fcbe57ff316894349907bf1c85f71d7487f0932 Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Apthorp <jeremya@chromium.org>
|
||||
Date: Mon, 6 Aug 2018 13:40:24 -0700
|
||||
Subject: fix: [mas] don't call LaunchServices private api
|
||||
|
||||
---
|
||||
content/gpu/gpu_main.cc | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
|
||||
index 115f871094bc..aa47a1c1a51e 100644
|
||||
index e6a589fb90e0..64ff5e248bd7 100644
|
||||
--- a/content/gpu/gpu_main.cc
|
||||
+++ b/content/gpu/gpu_main.cc
|
||||
@@ -276,8 +276,10 @@ int GpuMain(const MainFunctionParams& parameters) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/third_party/blink/renderer/core/paint/theme_painter_mac.mm b/third_party/blink/renderer/core/paint/theme_painter_mac.mm
|
||||
index 65e6437c22a6..3b726d196427 100644
|
||||
index dc115581a0e1..3466cfd86e9f 100644
|
||||
--- a/third_party/blink/renderer/core/paint/theme_painter_mac.mm
|
||||
+++ b/third_party/blink/renderer/core/paint/theme_painter_mac.mm
|
||||
@@ -43,6 +43,7 @@
|
||||
@@ -42,6 +42,7 @@
|
||||
|
||||
// The methods in this file are specific to the Mac OS X platform.
|
||||
|
||||
|
@ -10,7 +10,7 @@ index 65e6437c22a6..3b726d196427 100644
|
|||
// Forward declare Mac SPIs.
|
||||
extern "C" {
|
||||
void _NSDrawCarbonThemeBezel(NSRect frame, BOOL enabled, BOOL flipped);
|
||||
@@ -52,6 +53,7 @@ void _NSDrawCarbonThemeListBox(NSRect frame,
|
||||
@@ -51,6 +52,7 @@ void _NSDrawCarbonThemeListBox(NSRect frame,
|
||||
BOOL flipped,
|
||||
BOOL always_yes);
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ index 65e6437c22a6..3b726d196427 100644
|
|||
|
||||
namespace blink {
|
||||
|
||||
@@ -74,10 +76,12 @@ bool ThemePainterMac::PaintTextField(const Node* node,
|
||||
@@ -73,10 +75,12 @@ bool ThemePainterMac::PaintTextField(const Node* node,
|
||||
// behavior change while remaining a fragile solution.
|
||||
// https://bugs.chromium.org/p/chromium/issues/detail?id=658085#c3
|
||||
if (!use_ns_text_field_cell) {
|
||||
|
@ -31,7 +31,7 @@ index 65e6437c22a6..3b726d196427 100644
|
|||
return false;
|
||||
}
|
||||
|
||||
@@ -163,10 +167,12 @@ bool ThemePainterMac::PaintTextArea(const Node* node,
|
||||
@@ -162,10 +166,12 @@ bool ThemePainterMac::PaintTextArea(const Node* node,
|
||||
const PaintInfo& paint_info,
|
||||
const IntRect& r) {
|
||||
LocalCurrentGraphicsContext local_context(paint_info.context, r);
|
||||
|
@ -45,7 +45,7 @@ index 65e6437c22a6..3b726d196427 100644
|
|||
}
|
||||
|
||||
diff --git a/third_party/blink/renderer/platform/mac/kill_ring_mac.mm b/third_party/blink/renderer/platform/mac/kill_ring_mac.mm
|
||||
index acf60f09fdb9..6376120a954f 100644
|
||||
index 98dea7c4c3c9..44b4ae940dc5 100644
|
||||
--- a/third_party/blink/renderer/platform/mac/kill_ring_mac.mm
|
||||
+++ b/third_party/blink/renderer/platform/mac/kill_ring_mac.mm
|
||||
@@ -27,6 +27,7 @@
|
||||
|
|
|
@ -30,10 +30,10 @@ index a03585269db6..e7b028760bba 100644
|
|||
// 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 4cff922f28a3..e9c57f7a0879 100644
|
||||
index bc4b972f9c78..fb06c95af750 100644
|
||||
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
|
||||
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
|
||||
@@ -119,6 +119,7 @@ NSDictionary* attributeToMethodNameMap = nil;
|
||||
@@ -122,6 +122,7 @@ NSDictionary* attributeToMethodNameMap = nil;
|
||||
// VoiceOver uses -1 to mean "no limit" for AXResultsLimit.
|
||||
const int kAXResultsLimitNoLimit = -1;
|
||||
|
||||
|
@ -41,7 +41,7 @@ index 4cff922f28a3..e9c57f7a0879 100644
|
|||
extern "C" {
|
||||
|
||||
// The following are private accessibility APIs required for cursor navigation
|
||||
@@ -325,6 +326,7 @@ NSAttributedString* GetAttributedTextForTextMarkerRange(
|
||||
@@ -328,6 +329,7 @@ NSAttributedString* GetAttributedTextForTextMarkerRange(
|
||||
AddMisspelledTextAttributes(text_only_objects, attributed_text);
|
||||
return [attributed_text attributedSubstringFromRange:range];
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ index 4cff922f28a3..e9c57f7a0879 100644
|
|||
|
||||
// Returns an autoreleased copy of the AXNodeData's attribute.
|
||||
NSString* NSStringForStringAttribute(
|
||||
@@ -578,7 +580,9 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -581,7 +583,9 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
{NSAccessibilityDOMIdentifierAttribute, @"domIdentifier"},
|
||||
{NSAccessibilityEditableAncestorAttribute, @"editableAncestor"},
|
||||
{NSAccessibilityEnabledAttribute, @"enabled"},
|
||||
|
@ -59,7 +59,7 @@ index 4cff922f28a3..e9c57f7a0879 100644
|
|||
{NSAccessibilityExpandedAttribute, @"expanded"},
|
||||
{NSAccessibilityFocusedAttribute, @"focused"},
|
||||
{NSAccessibilityGrabbedAttribute, @"grabbed"},
|
||||
@@ -609,13 +613,17 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -614,13 +618,17 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
{NSAccessibilityRowsAttribute, @"rows"},
|
||||
// TODO(aboxhall): expose
|
||||
// NSAccessibilityServesAsTitleForUIElementsAttribute
|
||||
|
@ -77,7 +77,7 @@ index 4cff922f28a3..e9c57f7a0879 100644
|
|||
{NSAccessibilitySizeAttribute, @"size"},
|
||||
{NSAccessibilitySortDirectionAttribute, @"sortDirection"},
|
||||
{NSAccessibilitySubroleAttribute, @"subrole"},
|
||||
@@ -1069,6 +1077,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -1091,6 +1099,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
ax::mojom::Restriction::kDisabled];
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ index 4cff922f28a3..e9c57f7a0879 100644
|
|||
// Returns a text marker that points to the last character in the document that
|
||||
// can be selected with VoiceOver.
|
||||
- (id)endTextMarker {
|
||||
@@ -1080,6 +1089,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -1102,6 +1111,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
|
||||
return CreateTextMarker(position->CreatePositionAtEndOfAnchor());
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ index 4cff922f28a3..e9c57f7a0879 100644
|
|||
|
||||
- (NSNumber*)expanded {
|
||||
if (![self instanceActive])
|
||||
@@ -1892,6 +1902,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -1975,6 +1985,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
return [NSValue valueWithRange:NSMakeRange(selStart, selLength)];
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ index 4cff922f28a3..e9c57f7a0879 100644
|
|||
- (id)selectedTextMarkerRange {
|
||||
if (![self instanceActive])
|
||||
return nil;
|
||||
@@ -1924,6 +1935,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -2007,6 +2018,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
anchorAffinity, *focusObject,
|
||||
focusOffset, focusAffinity));
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ index 4cff922f28a3..e9c57f7a0879 100644
|
|||
|
||||
- (NSValue*)size {
|
||||
if (![self instanceActive])
|
||||
@@ -1956,6 +1968,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -2039,6 +2051,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ index 4cff922f28a3..e9c57f7a0879 100644
|
|||
// Returns a text marker that points to the first character in the document that
|
||||
// can be selected with VoiceOver.
|
||||
- (id)startTextMarker {
|
||||
@@ -1967,6 +1980,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -2050,6 +2063,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
|
||||
return CreateTextMarker(position->CreatePositionAtStartOfAnchor());
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ index 4cff922f28a3..e9c57f7a0879 100644
|
|||
|
||||
// Returns a subrole based upon the role.
|
||||
- (NSString*) subrole {
|
||||
@@ -2247,12 +2261,14 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -2335,12 +2349,14 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
NSMutableAttributedString* attributedValue =
|
||||
[[[NSMutableAttributedString alloc] initWithString:value] autorelease];
|
||||
|
||||
|
@ -140,7 +140,7 @@ index 4cff922f28a3..e9c57f7a0879 100644
|
|||
|
||||
return [attributedValue attributedSubstringFromRange:range];
|
||||
}
|
||||
@@ -2372,6 +2388,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -2460,6 +2476,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,7 @@ index 4cff922f28a3..e9c57f7a0879 100644
|
|||
if ([attribute isEqualToString:@"AXUIElementForTextMarker"]) {
|
||||
BrowserAccessibilityPositionInstance position =
|
||||
CreatePositionFromTextMarker(parameter);
|
||||
@@ -2549,6 +2566,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -2637,6 +2654,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
NSString* text = GetTextForTextMarkerRange(parameter);
|
||||
return [NSNumber numberWithInt:[text length]];
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ index 4cff922f28a3..e9c57f7a0879 100644
|
|||
|
||||
if ([attribute isEqualToString:
|
||||
NSAccessibilityBoundsForRangeParameterizedAttribute]) {
|
||||
@@ -2586,6 +2604,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -2674,6 +2692,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ index 4cff922f28a3..e9c57f7a0879 100644
|
|||
if ([attribute isEqualToString:
|
||||
NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) {
|
||||
BrowserAccessibilityPositionInstance position =
|
||||
@@ -2665,6 +2684,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
@@ -2753,6 +2772,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
|
||||
|
||||
return @(child->GetIndexInParent());
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ index 134f855de654..d588ed98839d 100644
|
|||
}
|
||||
|
||||
diff --git a/content/renderer/renderer_main_platform_delegate_mac.mm b/content/renderer/renderer_main_platform_delegate_mac.mm
|
||||
index 6b955bdb3724..1775f3b3c1d4 100644
|
||||
index 1e2cc38d3868..daa934c345e2 100644
|
||||
--- a/content/renderer/renderer_main_platform_delegate_mac.mm
|
||||
+++ b/content/renderer/renderer_main_platform_delegate_mac.mm
|
||||
@@ -22,6 +22,7 @@
|
||||
|
@ -220,16 +220,16 @@ index 6b955bdb3724..1775f3b3c1d4 100644
|
|||
// 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
|
||||
@@ -51,6 +54,7 @@ void DisconnectWindowServer() {
|
||||
SetApplicationIsDaemon(true);
|
||||
// Tell LaunchServices to continue without a connection to the daemon.
|
||||
_LSSetApplicationLaunchServicesServerConnectionStatus(0, nullptr);
|
||||
@@ -54,6 +57,7 @@ void DisconnectWindowServer() {
|
||||
0, ^bool(CFDictionaryRef options) {
|
||||
return false;
|
||||
});
|
||||
+#endif
|
||||
}
|
||||
|
||||
// You are about to read a pretty disgusting hack. In a static initializer,
|
||||
diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
|
||||
index 09123af7c2f0..69d6b926576f 100644
|
||||
index bb996bfd0876..eea959855615 100644
|
||||
--- a/device/bluetooth/bluetooth_adapter_mac.mm
|
||||
+++ b/device/bluetooth/bluetooth_adapter_mac.mm
|
||||
@@ -32,6 +32,7 @@
|
||||
|
@ -273,10 +273,10 @@ index 09123af7c2f0..69d6b926576f 100644
|
|||
|
||||
void BluetoothAdapterMac::RemovePairingDelegateInternal(
|
||||
diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn
|
||||
index 10d786fded92..10e6c6772351 100644
|
||||
index 8754161b0c90..7705c0dcc5cf 100644
|
||||
--- a/media/audio/BUILD.gn
|
||||
+++ b/media/audio/BUILD.gn
|
||||
@@ -189,6 +189,12 @@ source_set("audio") {
|
||||
@@ -194,6 +194,12 @@ source_set("audio") {
|
||||
"mac/scoped_audio_unit.cc",
|
||||
"mac/scoped_audio_unit.h",
|
||||
]
|
||||
|
@ -290,10 +290,10 @@ index 10d786fded92..10e6c6772351 100644
|
|||
"AudioToolbox.framework",
|
||||
"AudioUnit.framework",
|
||||
diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc
|
||||
index 1a74579e310b..0a15778d6825 100644
|
||||
index 66a5622f2d3d..b7adea918559 100644
|
||||
--- a/media/audio/mac/audio_manager_mac.cc
|
||||
+++ b/media/audio/mac/audio_manager_mac.cc
|
||||
@@ -993,7 +993,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters(
|
||||
@@ -864,7 +864,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters(
|
||||
|
||||
void AudioManagerMac::InitializeOnAudioThread() {
|
||||
DCHECK(GetTaskRunner()->BelongsToCurrentThread());
|
||||
|
@ -303,10 +303,10 @@ index 1a74579e310b..0a15778d6825 100644
|
|||
}
|
||||
|
||||
diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc
|
||||
index 706ba6e8e882..3fbe80c91cd9 100644
|
||||
index 06e9d7969c0f..6fc766e981fd 100644
|
||||
--- a/net/dns/dns_config_service_posix.cc
|
||||
+++ b/net/dns/dns_config_service_posix.cc
|
||||
@@ -244,6 +244,7 @@ class DnsConfigServicePosix::Watcher {
|
||||
@@ -242,6 +242,7 @@ class DnsConfigServicePosix::Watcher {
|
||||
|
||||
bool Watch() {
|
||||
bool success = true;
|
||||
|
@ -314,7 +314,7 @@ index 706ba6e8e882..3fbe80c91cd9 100644
|
|||
if (!config_watcher_.Watch(base::Bind(&Watcher::OnConfigChanged,
|
||||
base::Unretained(this)))) {
|
||||
LOG(ERROR) << "DNS config watch failed to start.";
|
||||
@@ -265,6 +266,7 @@ class DnsConfigServicePosix::Watcher {
|
||||
@@ -263,6 +264,7 @@ class DnsConfigServicePosix::Watcher {
|
||||
DNS_CONFIG_WATCH_MAX);
|
||||
}
|
||||
#endif // !defined(OS_ANDROID) && !defined(OS_IOS)
|
||||
|
@ -415,10 +415,10 @@ index 9073364142e8..2356add74dfa 100644
|
|||
NOTREACHED();
|
||||
return nullptr;
|
||||
diff --git a/ui/views/cocoa/bridged_native_widget.mm b/ui/views/cocoa/bridged_native_widget.mm
|
||||
index 3c6e9903d7df..ddc9061c64d1 100644
|
||||
index c37fd6286340..104cc98f731a 100644
|
||||
--- a/ui/views/cocoa/bridged_native_widget.mm
|
||||
+++ b/ui/views/cocoa/bridged_native_widget.mm
|
||||
@@ -43,6 +43,7 @@
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "ui/views/widget/widget_delegate.h"
|
||||
#include "ui/views/window/dialog_delegate.h"
|
||||
|
||||
|
@ -426,7 +426,7 @@ index 3c6e9903d7df..ddc9061c64d1 100644
|
|||
extern "C" {
|
||||
|
||||
typedef int32_t CGSConnection;
|
||||
@@ -52,6 +53,7 @@ CGError CGSSetWindowBackgroundBlurRadius(CGSConnection connection,
|
||||
@@ -51,6 +52,7 @@ CGError CGSSetWindowBackgroundBlurRadius(CGSConnection connection,
|
||||
int radius);
|
||||
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/net/url_request/url_request_job.h b/net/url_request/url_request_job.h
|
||||
index 2341999..3011bf7 100644
|
||||
index 389315a25d7d..d4e3c0e6c2ba 100644
|
||||
--- a/net/url_request/url_request_job.h
|
||||
+++ b/net/url_request/url_request_job.h
|
||||
@@ -269,6 +269,7 @@ class NET_EXPORT URLRequestJob : public base::PowerObserver {
|
||||
@@ -285,6 +285,7 @@ class NET_EXPORT URLRequestJob : public base::PowerObserver {
|
||||
void OnCallToDelegate();
|
||||
void OnCallToDelegateComplete();
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
diff --git a/content/browser/cache_storage/cache_storage.cc b/content/browser/cache_storage/cache_storage.cc
|
||||
index ce6a21b..10a3b18 100644
|
||||
index d91b54a4d2a1..7f946a5a04c9 100644
|
||||
--- a/content/browser/cache_storage/cache_storage.cc
|
||||
+++ b/content/browser/cache_storage/cache_storage.cc
|
||||
@@ -129,7 +129,7 @@ class CacheStorage::CacheLoader {
|
||||
blob_context_(blob_context),
|
||||
@@ -132,7 +132,7 @@ class CacheStorage::CacheLoader {
|
||||
cache_storage_(cache_storage),
|
||||
origin_(origin) {
|
||||
origin_(origin),
|
||||
owner_(owner) {
|
||||
- DCHECK(!origin_.unique());
|
||||
+ // DCHECK(!origin_.unique());
|
||||
}
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
|
||||
index c283922..397ba80 100644
|
||||
--- a/content/app/content_main_runner.cc
|
||||
+++ b/content/app/content_main_runner.cc
|
||||
@@ -657,7 +657,7 @@ class ContentMainRunnerImpl : public ContentMainRunner {
|
||||
|
||||
InitializeV8IfNeeded(command_line, process_type);
|
||||
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
|
||||
index 83e8990edf17..94b3450bbea5 100644
|
||||
--- a/content/app/content_main_runner_impl.cc
|
||||
+++ b/content/app/content_main_runner_impl.cc
|
||||
@@ -871,7 +871,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
|
||||
return nullptr;
|
||||
}));
|
||||
|
||||
-#if !defined(OFFICIAL_BUILD)
|
||||
+#if 0
|
||||
#if defined(OS_WIN)
|
||||
bool should_enable_stack_dump = !process_type.empty();
|
||||
#else
|
||||
--
|
||||
2.17.0
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc
|
||||
index 8b9c9f19a3dd..c4d801135053 100644
|
||||
index 8486db85360f..753c93a8c056 100644
|
||||
--- a/pdf/out_of_process_instance.cc
|
||||
+++ b/pdf/out_of_process_instance.cc
|
||||
@@ -333,7 +333,9 @@ bool OutOfProcessInstance::Init(uint32_t argc,
|
||||
@@ -455,7 +455,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);
|
||||
|
|
|
@ -38,7 +38,7 @@ index f4f1741a8ecf..103238cdd53f 100644
|
|||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/render_process_host.h"
|
||||
@@ -57,6 +59,7 @@ int32_t PepperBrokerMessageFilter::OnIsAllowed(
|
||||
RenderProcessHost::FromID(render_process_id_);
|
||||
RenderProcessHost::FromID(render_process_id_);
|
||||
if (!render_process_host)
|
||||
return PP_ERROR_FAILED;
|
||||
+#if 0
|
||||
|
@ -125,7 +125,7 @@ index 1c1844a9eb71..2c9834b11d34 100644
|
|||
device::mojom::WakeLock* PepperFlashBrowserHost::GetWakeLock() {
|
||||
// Here is a lazy binding, and will not reconnect after connection error.
|
||||
diff --git a/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h b/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h
|
||||
index ff0b687a51b6..ab6d96cbe9f8 100644
|
||||
index 154120ce5156..5152fd847c01 100644
|
||||
--- a/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h
|
||||
+++ b/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h
|
||||
@@ -23,9 +23,11 @@ namespace content {
|
||||
|
@ -140,7 +140,7 @@ index ff0b687a51b6..ab6d96cbe9f8 100644
|
|||
|
||||
class GURL;
|
||||
|
||||
@@ -51,15 +53,19 @@ class PepperFlashBrowserHost : public ppapi::host::ResourceHost {
|
||||
@@ -49,15 +51,19 @@ class PepperFlashBrowserHost : public ppapi::host::ResourceHost {
|
||||
const base::Time& t);
|
||||
int32_t OnGetLocalDataRestrictions(ppapi::host::HostMessageContext* context);
|
||||
|
||||
|
@ -160,7 +160,7 @@ index ff0b687a51b6..ab6d96cbe9f8 100644
|
|||
int render_process_id_;
|
||||
|
||||
// Requests a wake lock to prevent going to sleep, and a timer to cancel it
|
||||
@@ -67,8 +73,10 @@ class PepperFlashBrowserHost : public ppapi::host::ResourceHost {
|
||||
@@ -65,8 +71,10 @@ class PepperFlashBrowserHost : public ppapi::host::ResourceHost {
|
||||
device::mojom::WakeLockPtr wake_lock_;
|
||||
base::DelayTimer delay_timer_;
|
||||
|
||||
|
@ -227,7 +227,7 @@ index e267746783bd..bc84b44ceb27 100644
|
|||
}
|
||||
+#endif
|
||||
diff --git a/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h b/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h
|
||||
index faa83c9d32e5..bbae9c21b59a 100644
|
||||
index aa4433cccff4..d9630fdf6b87 100644
|
||||
--- a/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h
|
||||
+++ b/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h
|
||||
@@ -11,7 +11,9 @@
|
||||
|
@ -240,7 +240,7 @@ index faa83c9d32e5..bbae9c21b59a 100644
|
|||
#include "ppapi/host/host_message_context.h"
|
||||
#include "ppapi/host/resource_host.h"
|
||||
|
||||
@@ -50,7 +52,9 @@ class PepperFlashDRMHost : public ppapi::host::ResourceHost {
|
||||
@@ -49,7 +51,9 @@ class PepperFlashDRMHost : public ppapi::host::ResourceHost {
|
||||
const std::string& id,
|
||||
int32_t result);
|
||||
|
||||
|
@ -251,7 +251,7 @@ index faa83c9d32e5..bbae9c21b59a 100644
|
|||
|
||||
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 5599a2d3d62f..532c7290cc36 100644
|
||||
index 5599a2d3d62f..84e12cf5d273 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 @@
|
||||
|
@ -328,8 +328,8 @@ index 5599a2d3d62f..532c7290cc36 100644
|
|||
case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_INVALID:
|
||||
break;
|
||||
case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_CRX:
|
||||
- return OpenCrxFileSystem(context);
|
||||
+ return PP_ERROR_NOTSUPPORTED;
|
||||
- return OpenCrxFileSystem(context);
|
||||
+ return PP_ERROR_NOTSUPPORTED;
|
||||
case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_PLUGINPRIVATE:
|
||||
return OpenPluginPrivateFileSystem(context);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
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 09a37c1a2c70..ff8c2db3fdae 100644
|
||||
index 1c52a5fd396f..bfaa5a0c7c35 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
@@ -399,6 +399,15 @@ viz::FrameSinkId RenderWidgetHostViewBase::FrameSinkIdAtPoint(
|
||||
@@ -515,6 +515,15 @@ viz::FrameSinkId RenderWidgetHostViewBase::FrameSinkIdAtPoint(
|
||||
return frame_sink_id.is_valid() ? frame_sink_id : GetFrameSinkId();
|
||||
}
|
||||
|
||||
|
@ -19,12 +19,12 @@ index 09a37c1a2c70..ff8c2db3fdae 100644
|
|||
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 8e391207a8a7..d3637c82aba9 100644
|
||||
index 048fd7d3a8bf..1555b278a525 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
@@ -21,8 +21,10 @@
|
||||
#include "components/viz/common/surfaces/scoped_surface_id_allocator.h"
|
||||
@@ -22,8 +22,10 @@
|
||||
#include "components/viz/common/surfaces/surface_id.h"
|
||||
#include "components/viz/host/hit_test/hit_test_query.h"
|
||||
#include "content/browser/renderer_host/event_with_latency_info.h"
|
||||
+#include "content/browser/web_contents/web_contents_view.h"
|
||||
#include "content/common/content_export.h"
|
||||
|
@ -33,8 +33,8 @@ index 8e391207a8a7..d3637c82aba9 100644
|
|||
#include "content/public/browser/render_widget_host_view.h"
|
||||
#include "content/public/common/input_event_ack_state.h"
|
||||
#include "content/public/common/screen_info.h"
|
||||
@@ -79,10 +81,12 @@ class BrowserAccessibilityManager;
|
||||
class CursorManager;
|
||||
@@ -84,10 +86,12 @@ class CursorManager;
|
||||
class MouseWheelPhaseHandler;
|
||||
class RenderWidgetHostImpl;
|
||||
class RenderWidgetHostViewBaseObserver;
|
||||
+class RenderWidgetHostViewGuest;
|
||||
|
@ -46,17 +46,17 @@ index 8e391207a8a7..d3637c82aba9 100644
|
|||
class WebCursor;
|
||||
struct TextInputState;
|
||||
|
||||
@@ -124,6 +128,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
|
||||
float GetDeviceScaleFactor() const final;
|
||||
@@ -142,6 +146,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
|
||||
TouchSelectionControllerClientManager*
|
||||
GetTouchSelectionControllerClientManager() override;
|
||||
+
|
||||
|
||||
+ virtual void InitAsGuest(RenderWidgetHostView* parent_host_view,
|
||||
+ RenderWidgetHostViewGuest* guest_view) {}
|
||||
|
||||
+
|
||||
// This only needs to be overridden by RenderWidgetHostViewBase subclasses
|
||||
// that handle content embedded within other RenderWidgetHostViews.
|
||||
@@ -318,6 +325,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
|
||||
gfx::PointF TransformPointToRootCoordSpaceF(
|
||||
@@ -346,6 +353,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
|
||||
virtual void ProcessGestureEvent(const blink::WebGestureEvent& event,
|
||||
const ui::LatencyInfo& latency);
|
||||
|
||||
|
|
|
@ -1,33 +1,8 @@
|
|||
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 6a161f0f36c6..349bc78976ad 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "ui/gfx/geometry/dip_util.h"
|
||||
#include "ui/gfx/mac/coordinate_conversion.h"
|
||||
#include "ui/gl/gl_switches.h"
|
||||
+#include "ui/gl/gpu_switching_manager.h"
|
||||
|
||||
using blink::WebInputEvent;
|
||||
using blink::WebMouseEvent;
|
||||
@@ -1112,6 +1113,12 @@ void RenderWidgetHostViewMac::SetBackgroundColor(SkColor color) {
|
||||
DCHECK(SkColorGetA(color) == SK_AlphaOPAQUE ||
|
||||
SkColorGetA(color) == SK_AlphaTRANSPARENT);
|
||||
bool opaque = SkColorGetA(color) == SK_AlphaOPAQUE;
|
||||
+ if (opaque) {
|
||||
+ bool wantsTransparent = ui::GpuSwitchingManager::UseTransparent() ||
|
||||
+ ([cocoa_view() window] && ![[cocoa_view() window] isOpaque]);
|
||||
+ if (wantsTransparent)
|
||||
+ opaque = NO;
|
||||
+ }
|
||||
if (background_is_opaque_ != opaque) {
|
||||
background_is_opaque_ = opaque;
|
||||
if (host())
|
||||
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 c7ad6fa8c75f..bdfabc1061bb 100644
|
||||
index 5b4ae0732914..ea774eb81c75 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_cocoa.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_cocoa.mm
|
||||
@@ -178,6 +178,11 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
@@ -179,6 +179,11 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
|
||||
} // namespace
|
||||
|
||||
|
@ -39,7 +14,7 @@ index c7ad6fa8c75f..bdfabc1061bb 100644
|
|||
// These are not documented, so use only after checking -respondsToSelector:.
|
||||
@interface NSApplication (UndocumentedSpeechMethods)
|
||||
- (void)speakString:(NSString*)string;
|
||||
@@ -355,6 +360,9 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
@@ -363,6 +368,9 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
}
|
||||
|
||||
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
|
||||
|
@ -49,7 +24,7 @@ index c7ad6fa8c75f..bdfabc1061bb 100644
|
|||
return [self acceptsMouseEventsWhenInactive];
|
||||
}
|
||||
|
||||
@@ -555,6 +563,7 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
@@ -587,6 +595,7 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
if (EventIsReservedBySystem(theEvent))
|
||||
return NO;
|
||||
|
||||
|
@ -57,7 +32,7 @@ index c7ad6fa8c75f..bdfabc1061bb 100644
|
|||
// If we return |NO| from this function, cocoa will send the key event to
|
||||
// the menu and only if the menu does not process the event to |keyDown:|. We
|
||||
// want to send the event to a renderer _before_ sending it to the menu, so
|
||||
@@ -568,6 +577,7 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
@@ -600,6 +609,7 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
DCHECK(![[NSApp mainMenu] performKeyEquivalent:theEvent]);
|
||||
return NO;
|
||||
}
|
||||
|
@ -65,7 +40,7 @@ index c7ad6fa8c75f..bdfabc1061bb 100644
|
|||
|
||||
// Command key combinations are sent via performKeyEquivalent rather than
|
||||
// keyDown:. We just forward this on and if WebCore doesn't want to handle
|
||||
@@ -664,6 +674,10 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
@@ -699,6 +709,10 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
eventType == NSKeyDown &&
|
||||
!(modifierFlags & NSCommandKeyMask);
|
||||
|
||||
|
@ -76,7 +51,7 @@ index c7ad6fa8c75f..bdfabc1061bb 100644
|
|||
// We only handle key down events and just simply forward other events.
|
||||
if (eventType != NSKeyDown) {
|
||||
client_->OnNSViewForwardKeyboardEvent(event, latency_info);
|
||||
@@ -1425,9 +1439,11 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
@@ -1461,9 +1475,11 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
// Since this implementation doesn't have to wait any IPC calls, this doesn't
|
||||
// make any key-typing jank. --hbono 7/23/09
|
||||
//
|
||||
|
@ -88,7 +63,7 @@ index c7ad6fa8c75f..bdfabc1061bb 100644
|
|||
|
||||
- (NSArray*)validAttributesForMarkedText {
|
||||
// This code is just copied from WebKit except renaming variables.
|
||||
@@ -1436,7 +1452,10 @@ extern NSString* NSTextInputReplacementRangeAttributeName;
|
||||
@@ -1472,7 +1488,10 @@ extern NSString* NSTextInputReplacementRangeAttributeName;
|
||||
initWithObjects:NSUnderlineStyleAttributeName,
|
||||
NSUnderlineColorAttributeName,
|
||||
NSMarkedClauseSegmentAttributeName,
|
||||
|
@ -100,3 +75,18 @@ index c7ad6fa8c75f..bdfabc1061bb 100644
|
|||
}
|
||||
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 8b012bcb8f77..077ccbeaa913 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -53,6 +53,7 @@
|
||||
#include "ui/events/keycodes/dom/dom_code.h"
|
||||
#include "ui/gfx/geometry/dip_util.h"
|
||||
#include "ui/gfx/mac/coordinate_conversion.h"
|
||||
+#include "ui/gl/gpu_switching_manager.h"
|
||||
|
||||
using blink::WebInputEvent;
|
||||
using blink::WebMouseEvent;
|
||||
--
|
||||
2.17.0
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
|
||||
index 4304cc82494f..01588f173b16 100644
|
||||
index 395d16c7cef2..66d81de66f01 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -1663,6 +1663,11 @@ if (is_chrome_branded && !is_android) {
|
||||
@@ -1652,6 +1652,11 @@ if (is_chrome_branded && !is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ index 4304cc82494f..01588f173b16 100644
|
|||
chrome_paks("packed_resources") {
|
||||
if (is_mac) {
|
||||
output_dir = "$root_gen_dir/repack"
|
||||
@@ -1684,6 +1689,7 @@ chrome_paks("packed_resources") {
|
||||
@@ -1673,6 +1678,7 @@ chrome_paks("packed_resources") {
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc
|
||||
index 6850cd460b1d..6d652cca59b4 100644
|
||||
index 63b5d47b4069..5c48741a3fc7 100644
|
||||
--- a/ui/base/clipboard/scoped_clipboard_writer.cc
|
||||
+++ b/ui/base/clipboard/scoped_clipboard_writer.cc
|
||||
@@ -102,17 +102,16 @@ void ScopedClipboardWriter::WriteImage(const SkBitmap& bitmap) {
|
||||
@@ -103,17 +103,16 @@ void ScopedClipboardWriter::WriteImage(const SkBitmap& bitmap) {
|
||||
objects_[Clipboard::CBF_SMBITMAP] = parameters;
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ index 6850cd460b1d..6d652cca59b4 100644
|
|||
|
||||
Clipboard::ObjectMapParams parameters;
|
||||
parameters.push_back(format_parameter);
|
||||
@@ -121,6 +121,13 @@ void ScopedClipboardWriter::WritePickledData(
|
||||
@@ -121,6 +120,13 @@ void ScopedClipboardWriter::WritePickledData(
|
||||
objects_[Clipboard::CBF_DATA] = parameters;
|
||||
}
|
||||
|
||||
|
@ -40,10 +40,10 @@ index 6850cd460b1d..6d652cca59b4 100644
|
|||
objects_.clear();
|
||||
bitmap_.reset();
|
||||
diff --git a/ui/base/clipboard/scoped_clipboard_writer.h b/ui/base/clipboard/scoped_clipboard_writer.h
|
||||
index a7e064561ca9..d5a1b76bc6a7 100644
|
||||
index bb889c9dd484..bf6cafd9c55a 100644
|
||||
--- a/ui/base/clipboard/scoped_clipboard_writer.h
|
||||
+++ b/ui/base/clipboard/scoped_clipboard_writer.h
|
||||
@@ -61,6 +61,11 @@ class UI_BASE_EXPORT ScopedClipboardWriter {
|
||||
@@ -57,6 +57,11 @@ class UI_BASE_EXPORT ScopedClipboardWriter {
|
||||
// Used by WebKit to determine whether WebKit wrote the clipboard last
|
||||
void WriteWebSmartPaste();
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
|
||||
index 81d3f80..a8c4a57 100644
|
||||
index 06f7d4487997..e1deb93f8b0d 100644
|
||||
--- a/content/renderer/render_thread_impl.cc
|
||||
+++ b/content/renderer/render_thread_impl.cc
|
||||
@@ -1737,7 +1737,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {
|
||||
@@ -1644,7 +1644,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {
|
||||
}
|
||||
|
||||
bool RenderThreadImpl::IsElasticOverscrollEnabled() {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
diff --git a/chrome/browser/ssl/security_state_tab_helper.cc b/chrome/browser/ssl/security_state_tab_helper.cc
|
||||
index a73442a5476c..6cd7ae78b814 100644
|
||||
index 7b12c9d2df52..e75171b86ef1 100644
|
||||
--- a/chrome/browser/ssl/security_state_tab_helper.cc
|
||||
+++ b/chrome/browser/ssl/security_state_tab_helper.cc
|
||||
@@ -10,15 +10,21 @@
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
@@ -13,17 +13,23 @@
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/time/time.h"
|
||||
#include "build/build_config.h"
|
||||
+#if 0
|
||||
|
@ -12,19 +12,21 @@ index a73442a5476c..6cd7ae78b814 100644
|
|||
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
|
||||
#include "chrome/browser/safe_browsing/ui_manager.h"
|
||||
+#endif
|
||||
#include "chrome/common/chrome_switches.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "chrome/common/secure_origin_whitelist.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
+#if 0
|
||||
#include "components/safe_browsing/features.h"
|
||||
+#endif
|
||||
#include "components/security_state/content/content_utils.h"
|
||||
#include "components/ssl_config/ssl_config_prefs.h"
|
||||
+#if 0
|
||||
#include "components/toolbar/toolbar_field_trial.h"
|
||||
+#endif
|
||||
#include "content/public/browser/browser_context.h"
|
||||
#include "content/public/browser/navigation_entry.h"
|
||||
#include "content/public/browser/navigation_handle.h"
|
||||
@@ -37,7 +43,7 @@
|
||||
@@ -43,7 +49,7 @@
|
||||
#include "chrome/browser/chromeos/policy/policy_cert_service_factory.h"
|
||||
#endif // defined(OS_CHROMEOS)
|
||||
|
||||
|
@ -33,7 +35,7 @@ index a73442a5476c..6cd7ae78b814 100644
|
|||
#include "chrome/browser/safe_browsing/chrome_password_protection_service.h"
|
||||
#endif
|
||||
|
||||
@@ -59,7 +65,9 @@ void RecordSecurityLevel(const security_state::SecurityInfo& security_info) {
|
||||
@@ -81,7 +87,9 @@ bool IsOriginSecureWithWhitelist(
|
||||
|
||||
DEFINE_WEB_CONTENTS_USER_DATA_KEY(SecurityStateTabHelper);
|
||||
|
||||
|
@ -43,7 +45,7 @@ index a73442a5476c..6cd7ae78b814 100644
|
|||
|
||||
SecurityStateTabHelper::SecurityStateTabHelper(
|
||||
content::WebContents* web_contents)
|
||||
@@ -67,8 +75,11 @@ SecurityStateTabHelper::SecurityStateTabHelper(
|
||||
@@ -89,8 +97,11 @@ SecurityStateTabHelper::SecurityStateTabHelper(
|
||||
logged_http_warning_on_current_navigation_(false),
|
||||
is_incognito_(false) {
|
||||
content::BrowserContext* context = web_contents->GetBrowserContext();
|
||||
|
@ -57,7 +59,7 @@ index a73442a5476c..6cd7ae78b814 100644
|
|||
is_incognito_ = true;
|
||||
}
|
||||
}
|
||||
@@ -150,6 +161,7 @@ void SecurityStateTabHelper::DidFinishNavigation(
|
||||
@@ -175,6 +186,7 @@ void SecurityStateTabHelper::DidFinishNavigation(
|
||||
UMA_HISTOGRAM_BOOLEAN("interstitial.ssl.visited_site_after_warning", true);
|
||||
}
|
||||
|
||||
|
@ -65,7 +67,7 @@ index a73442a5476c..6cd7ae78b814 100644
|
|||
// Security indicator UI study (https://crbug.com/803501): Show a message in
|
||||
// the console to reduce developer confusion about the experimental UI
|
||||
// treatments for HTTPS pages with EV certificates.
|
||||
@@ -177,6 +189,7 @@ void SecurityStateTabHelper::DidFinishNavigation(
|
||||
@@ -202,6 +214,7 @@ void SecurityStateTabHelper::DidFinishNavigation(
|
||||
"Validation is still valid.");
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +75,7 @@ index a73442a5476c..6cd7ae78b814 100644
|
|||
}
|
||||
|
||||
void SecurityStateTabHelper::DidChangeVisibleSecurityState() {
|
||||
@@ -250,6 +263,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
|
||||
@@ -275,6 +288,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
|
||||
web_contents()->GetController().GetVisibleEntry();
|
||||
if (!entry)
|
||||
return security_state::MALICIOUS_CONTENT_STATUS_NONE;
|
||||
|
@ -81,7 +83,7 @@ index a73442a5476c..6cd7ae78b814 100644
|
|||
safe_browsing::SafeBrowsingService* sb_service =
|
||||
g_browser_process->safe_browsing_service();
|
||||
if (!sb_service)
|
||||
@@ -301,6 +315,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
|
||||
@@ -323,6 +337,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -89,3 +91,47 @@ index a73442a5476c..6cd7ae78b814 100644
|
|||
return security_state::MALICIOUS_CONTENT_STATUS_NONE;
|
||||
}
|
||||
|
||||
@@ -343,15 +358,19 @@ std::vector<std::string> SecurityStateTabHelper::GetSecureOriginsAndPatterns()
|
||||
const {
|
||||
const base::CommandLine& command_line =
|
||||
*base::CommandLine::ForCurrentProcess();
|
||||
+#if 0
|
||||
Profile* profile =
|
||||
Profile::FromBrowserContext(web_contents()->GetBrowserContext());
|
||||
PrefService* prefs = profile->GetPrefs();
|
||||
+#endif
|
||||
std::string origins_str = "";
|
||||
if (command_line.HasSwitch(switches::kUnsafelyTreatInsecureOriginAsSecure)) {
|
||||
origins_str = command_line.GetSwitchValueASCII(
|
||||
switches::kUnsafelyTreatInsecureOriginAsSecure);
|
||||
+#if 0
|
||||
} else if (prefs->HasPrefPath(prefs::kUnsafelyTreatInsecureOriginAsSecure)) {
|
||||
origins_str = prefs->GetString(prefs::kUnsafelyTreatInsecureOriginAsSecure);
|
||||
+#endif
|
||||
}
|
||||
return secure_origin_whitelist::ParseWhitelist(origins_str);
|
||||
}
|
||||
diff --git a/chrome/common/secure_origin_whitelist.cc b/chrome/common/secure_origin_whitelist.cc
|
||||
index db9bb54ddbc1..cc7a22bdb920 100644
|
||||
--- a/chrome/common/secure_origin_whitelist.cc
|
||||
+++ b/chrome/common/secure_origin_whitelist.cc
|
||||
@@ -13,7 +13,9 @@
|
||||
#include "chrome/common/chrome_switches.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "components/prefs/pref_registry_simple.h"
|
||||
+#if 0
|
||||
#include "extensions/common/constants.h"
|
||||
+#endif
|
||||
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
|
||||
#include "url/gurl.h"
|
||||
#include "url/origin.h"
|
||||
@@ -155,7 +157,9 @@ std::vector<std::string> GetWhitelist() {
|
||||
|
||||
std::set<std::string> GetSchemesBypassingSecureContextCheck() {
|
||||
std::set<std::string> schemes;
|
||||
+#if 0
|
||||
schemes.insert(extensions::kExtensionScheme);
|
||||
+#endif
|
||||
return schemes;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/services/device/wake_lock/power_save_blocker/BUILD.gn b/services/device/wake_lock/power_save_blocker/BUILD.gn
|
||||
index e04629ca1a93..299e6efd75f9 100644
|
||||
index dfce90f6b791..a2f7f776f4d8 100644
|
||||
--- a/services/device/wake_lock/power_save_blocker/BUILD.gn
|
||||
+++ b/services/device/wake_lock/power_save_blocker/BUILD.gn
|
||||
@@ -9,7 +9,7 @@ if (is_android) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/content/browser/loader/stream_resource_handler.h b/content/browser/loader/stream_resource_handler.h
|
||||
index 9f69994..ae8d1630 100644
|
||||
index cb8a2d58d6b8..dbfa64089325 100644
|
||||
--- a/content/browser/loader/stream_resource_handler.h
|
||||
+++ b/content/browser/loader/stream_resource_handler.h
|
||||
@@ -11,6 +11,7 @@
|
||||
|
|
|
@ -51,14 +51,14 @@ index 58f09950d844..53500a0853a6 100755
|
|||
class Error(Exception):
|
||||
pass
|
||||
diff --git a/build/linux/sysroot_scripts/sysroots.json b/build/linux/sysroot_scripts/sysroots.json
|
||||
index 48a1d36f0609..91ef1417a1bf 100644
|
||||
index e79b69b764b1..91ef1417a1bf 100644
|
||||
--- a/build/linux/sysroot_scripts/sysroots.json
|
||||
+++ b/build/linux/sysroot_scripts/sysroots.json
|
||||
@@ -1,38 +1,38 @@
|
||||
{
|
||||
- "sid_amd64": {
|
||||
- "Revision": "15b7efb900d75f7316c6e713e80f87b9904791b1",
|
||||
- "Sha1Sum": "85ac8d5e0f6cff99fc323fd3d29cb73e2aa970e2",
|
||||
- "Revision": "1015a998c2adf188813cca60b558b0ea1a0b6ced",
|
||||
- "Sha1Sum": "4e7db513b0faeea8fb410f70c9909e8736f5c0ab",
|
||||
- "SysrootDir": "debian_sid_amd64-sysroot",
|
||||
- "Tarball": "debian_sid_amd64_sysroot.tar.xz"
|
||||
+ "stretch_amd64": {
|
||||
|
@ -68,8 +68,8 @@ index 48a1d36f0609..91ef1417a1bf 100644
|
|||
+ "Tarball": "debian_stretch_amd64_sysroot.tgz"
|
||||
},
|
||||
- "sid_arm": {
|
||||
- "Revision": "15b7efb900d75f7316c6e713e80f87b9904791b1",
|
||||
- "Sha1Sum": "ed31924757f11885a21793dc4b928d07ab25740c",
|
||||
- "Revision": "1015a998c2adf188813cca60b558b0ea1a0b6ced",
|
||||
- "Sha1Sum": "b2165ab47ab9c4cc780db53ace1b08607d68ae31",
|
||||
- "SysrootDir": "debian_sid_arm-sysroot",
|
||||
- "Tarball": "debian_sid_arm_sysroot.tar.xz"
|
||||
+ "stretch_arm": {
|
||||
|
@ -79,8 +79,8 @@ index 48a1d36f0609..91ef1417a1bf 100644
|
|||
+ "Tarball": "debian_stretch_arm_sysroot.tgz"
|
||||
},
|
||||
- "sid_arm64": {
|
||||
- "Revision": "15b7efb900d75f7316c6e713e80f87b9904791b1",
|
||||
- "Sha1Sum": "b9447285e58c5260bd9fa2737d1f0d1f82156738",
|
||||
- "Revision": "1015a998c2adf188813cca60b558b0ea1a0b6ced",
|
||||
- "Sha1Sum": "37dfa5f22e2c0e847cee34f9848eb31230c33d35",
|
||||
- "SysrootDir": "debian_sid_arm64-sysroot",
|
||||
- "Tarball": "debian_sid_arm64_sysroot.tar.xz"
|
||||
+ "stretch_arm64": {
|
||||
|
@ -90,8 +90,8 @@ index 48a1d36f0609..91ef1417a1bf 100644
|
|||
+ "Tarball": "debian_stretch_arm64_sysroot.tgz"
|
||||
},
|
||||
- "sid_i386": {
|
||||
- "Revision": "15b7efb900d75f7316c6e713e80f87b9904791b1",
|
||||
- "Sha1Sum": "f09856d93f39e8df84ffd9c04881f44e6cbc0508",
|
||||
- "Revision": "1015a998c2adf188813cca60b558b0ea1a0b6ced",
|
||||
- "Sha1Sum": "b8639749e2b561a7462d7e7978ca74ee4044bdab",
|
||||
- "SysrootDir": "debian_sid_i386-sysroot",
|
||||
- "Tarball": "debian_sid_i386_sysroot.tar.xz"
|
||||
+ "stretch_i386": {
|
||||
|
@ -101,8 +101,8 @@ index 48a1d36f0609..91ef1417a1bf 100644
|
|||
+ "Tarball": "debian_stretch_i386_sysroot.tgz"
|
||||
},
|
||||
- "sid_mips": {
|
||||
- "Revision": "15b7efb900d75f7316c6e713e80f87b9904791b1",
|
||||
- "Sha1Sum": "90586b566b567b2bcf49e7fd112f0c8189bbd07b",
|
||||
- "Revision": "1015a998c2adf188813cca60b558b0ea1a0b6ced",
|
||||
- "Sha1Sum": "baaf37cdcbcf251fb9a4ccaf8b479722ae61fe49",
|
||||
- "SysrootDir": "debian_sid_mips-sysroot",
|
||||
- "Tarball": "debian_sid_mips_sysroot.tar.xz"
|
||||
+ "stretch_mips": {
|
||||
|
@ -112,8 +112,8 @@ index 48a1d36f0609..91ef1417a1bf 100644
|
|||
+ "Tarball": "debian_stretch_mips_sysroot.tgz"
|
||||
},
|
||||
- "sid_mips64el": {
|
||||
- "Revision": "15b7efb900d75f7316c6e713e80f87b9904791b1",
|
||||
- "Sha1Sum": "f90c3b81485ffebb283afddb1a72bc61e14c593d",
|
||||
- "Revision": "1015a998c2adf188813cca60b558b0ea1a0b6ced",
|
||||
- "Sha1Sum": "bbfe1a513b849921cfcf78865faec8fc03f93b3d",
|
||||
- "SysrootDir": "debian_sid_mips64el-sysroot",
|
||||
- "Tarball": "debian_sid_mips64el_sysroot.tar.xz"
|
||||
- }
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc
|
||||
index 50a109e..3ee9159 100644
|
||||
index ad0714a7f5ed..1406e1d53f2f 100644
|
||||
--- a/sandbox/linux/services/credentials.cc
|
||||
+++ b/sandbox/linux/services/credentials.cc
|
||||
@@ -358,8 +358,10 @@ pid_t Credentials::ForkAndDropCapabilitiesInChild() {
|
||||
@@ -348,8 +348,10 @@ pid_t Credentials::ForkAndDropCapabilitiesInChild() {
|
||||
return pid;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/ui/gl/gpu_switching_manager.cc b/ui/gl/gpu_switching_manager.cc
|
||||
index be7156465809..cee3b1af3dc5 100644
|
||||
index be7156465809..4529866b0864 100644
|
||||
--- a/ui/gl/gpu_switching_manager.cc
|
||||
+++ b/ui/gl/gpu_switching_manager.cc
|
||||
@@ -4,6 +4,12 @@
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 018534073da1..48f3d0e7343b 100644
|
||||
index 6ae9bf2f9c6a..6ed6ece96d0f 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -1759,6 +1759,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
@@ -1845,6 +1845,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
std::string unique_name;
|
||||
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
|
||||
|
||||
|
@ -15,7 +15,7 @@ index 018534073da1..48f3d0e7343b 100644
|
|||
WebContentsViewDelegate* delegate =
|
||||
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
|
||||
@@ -1774,6 +1780,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
@@ -1860,6 +1866,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
&render_view_host_delegate_view_);
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ index 018534073da1..48f3d0e7343b 100644
|
|||
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 699570cc1390..454830098cb9 100644
|
||||
index 699570cc1390..63e60667fa7d 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 {
|
||||
|
@ -58,7 +58,7 @@ index 699570cc1390..454830098cb9 100644
|
|||
}
|
||||
#endif // defined(USE_AURA)
|
||||
}
|
||||
@@ -146,11 +152,22 @@ RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForWidget(
|
||||
@@ -144,11 +150,22 @@ RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForWidget(
|
||||
render_widget_host->GetView());
|
||||
}
|
||||
|
||||
|
@ -86,10 +86,10 @@ index 699570cc1390..454830098cb9 100644
|
|||
|
||||
RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForPopupWidget(
|
||||
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
||||
index a13db5f4dd61..621124decfdc 100644
|
||||
index dee5814a247c..7690ce8d404b 100644
|
||||
--- a/content/public/browser/web_contents.h
|
||||
+++ b/content/public/browser/web_contents.h
|
||||
@@ -69,9 +69,12 @@ class BrowserPluginGuestDelegate;
|
||||
@@ -74,9 +74,12 @@ class BrowserPluginGuestDelegate;
|
||||
class InterstitialPage;
|
||||
class RenderFrameHost;
|
||||
class RenderViewHost;
|
||||
|
@ -101,10 +101,10 @@ index a13db5f4dd61..621124decfdc 100644
|
|||
+class WebContentsView;
|
||||
struct CustomContextMenuContext;
|
||||
struct DropData;
|
||||
struct Manifest;
|
||||
@@ -172,6 +175,10 @@ class WebContents : public PageNavigator,
|
||||
// navigation requires a dedicated or privileged process, such as a WebUI.
|
||||
bool initialize_renderer;
|
||||
struct MHTMLGenerationParams;
|
||||
@@ -213,6 +216,10 @@ class WebContents : public PageNavigator,
|
||||
kInitializeAndWarmupRendererProcess,
|
||||
} desired_renderer_state;
|
||||
|
||||
+ // Optionally specify the view and delegate view.
|
||||
+ content::WebContentsView* view = nullptr;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
|
||||
index 0affacaa0294..0c321d51364d 100644
|
||||
index 4205c92765af..c82360f146d1 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -1136,8 +1136,10 @@ RendererBlinkPlatformImpl::CreateOffscreenGraphicsContext3DProvider(
|
||||
@@ -1021,8 +1021,10 @@ RendererBlinkPlatformImpl::CreateOffscreenGraphicsContext3DProvider(
|
||||
attributes.sample_buffers = 0;
|
||||
attributes.bind_generates_resource = false;
|
||||
attributes.enable_raster_interface = web_attributes.enable_raster_interface;
|
||||
|
@ -15,8 +15,20 @@ index 0affacaa0294..0c321d51364d 100644
|
|||
|
||||
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 f3ec52975650..920d161a1b81 100644
|
||||
--- a/third_party/blink/public/platform/platform.h
|
||||
+++ b/third_party/blink/public/platform/platform.h
|
||||
@@ -493,6 +493,7 @@ class BLINK_PLATFORM_EXPORT Platform {
|
||||
kGLES3ContextType, // GLES 3.0 context
|
||||
};
|
||||
struct ContextAttributes {
|
||||
+ bool prefer_integrated_gpu = false;
|
||||
bool fail_if_major_performance_caveat = false;
|
||||
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 ca4543a10e69..a1f5e5c9f906 100644
|
||||
index 298e186289a0..5223ae30db6b 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 {
|
||||
|
@ -28,7 +40,7 @@ index ca4543a10e69..a1f5e5c9f906 100644
|
|||
|
||||
// This attribute is of type XRDevice, defined in modules/xr/XRDevice.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 7419bb20d316..5b04af00fab4 100644
|
||||
index 7b655dd12a77..8969eb7d98f3 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 {
|
||||
|
@ -44,7 +56,7 @@ index 7419bb20d316..5b04af00fab4 100644
|
|||
[PermissiveDictionaryConversion]
|
||||
dictionary CanvasContextCreationAttributesModule {
|
||||
// This is an experimental feature, but it is not hidden behind a flag in
|
||||
@@ -47,6 +47,7 @@ dictionary CanvasContextCreationAttributesModule {
|
||||
@@ -47,6 +53,7 @@ dictionary CanvasContextCreationAttributesModule {
|
||||
boolean antialias = true;
|
||||
boolean premultipliedAlpha = true;
|
||||
boolean preserveDrawingBuffer = false;
|
||||
|
@ -53,7 +65,7 @@ index 7419bb20d316..5b04af00fab4 100644
|
|||
[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 332fa9fb0547..e8fae4b01c39 100644
|
||||
index 7274af57b8ee..2a2737da1a56 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(
|
||||
|
@ -64,7 +76,7 @@ index 332fa9fb0547..e8fae4b01c39 100644
|
|||
result.setFailIfMajorPerformanceCaveat(
|
||||
attrs.fail_if_major_performance_caveat);
|
||||
result.setCompatibleXRDevice(
|
||||
@@ -30,6 +30,7 @@ Platform::ContextAttributes ToPlatformContextAttributes(
|
||||
@@ -30,6 +31,7 @@ Platform::ContextAttributes ToPlatformContextAttributes(
|
||||
unsigned web_gl_version,
|
||||
bool support_own_offscreen_surface) {
|
||||
Platform::ContextAttributes result;
|
||||
|
@ -73,7 +85,7 @@ index 332fa9fb0547..e8fae4b01c39 100644
|
|||
attrs.fail_if_major_performance_caveat;
|
||||
result.context_type = web_gl_version == 2 ? Platform::kWebGL2ContextType
|
||||
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 180673be9bd0..0af29cbc9402 100644
|
||||
index 38ca0f6b6a0c..90cfe8497daf 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 @@
|
||||
|
@ -89,7 +101,7 @@ index 180673be9bd0..0af29cbc9402 100644
|
|||
dictionary WebGLContextAttributes {
|
||||
boolean alpha = true;
|
||||
boolean depth = true;
|
||||
@@ -33,6 +33,7 @@ dictionary WebGLContextAttributes {
|
||||
@@ -33,6 +39,7 @@ dictionary WebGLContextAttributes {
|
||||
boolean antialias = true;
|
||||
boolean premultipliedAlpha = true;
|
||||
boolean preserveDrawingBuffer = false;
|
||||
|
@ -97,15 +109,6 @@ index 180673be9bd0..0af29cbc9402 100644
|
|||
boolean failIfMajorPerformanceCaveat = false;
|
||||
[OriginTrialEnabled=WebXR] XRDevice compatibleXRDevice = null;
|
||||
};
|
||||
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
|
||||
index d4948345246e..bc277ba6aa5f 100644
|
||||
--- a/third_party/blink/public/platform/platform.h
|
||||
+++ b/third_party/blink/public/platform/platform.h
|
||||
@@ -522,6 +522,7 @@ class BLINK_PLATFORM_EXPORT Platform {
|
||||
kGLES3ContextType, // GLES 3.0 context
|
||||
};
|
||||
struct ContextAttributes {
|
||||
+ bool prefer_integrated_gpu = false;
|
||||
bool fail_if_major_performance_caveat = false;
|
||||
ContextType context_type = kGLES2ContextType;
|
||||
// Offscreen contexts usually share a surface for the default frame buffer
|
||||
--
|
||||
2.17.0
|
||||
|
||||
|
|
|
@ -1,25 +1,23 @@
|
|||
diff --git a/content/browser/frame_host/render_frame_host_delegate.cc b/content/browser/frame_host/render_frame_host_delegate.cc
|
||||
index 4d0a8ea553c5..0fac0b22ff2f 100644
|
||||
index 390bcf09995e..f9090f8ea24a 100644
|
||||
--- a/content/browser/frame_host/render_frame_host_delegate.cc
|
||||
+++ b/content/browser/frame_host/render_frame_host_delegate.cc
|
||||
@@ -89,8 +89,10 @@ bool RenderFrameHostDelegate::ShouldRouteMessageEvent(
|
||||
@@ -99,7 +99,9 @@ RenderFrameHostDelegate::GetFocusedFrameIncludingInnerWebContents() {
|
||||
}
|
||||
|
||||
std::unique_ptr<WebUIImpl>
|
||||
-RenderFrameHostDelegate::CreateWebUIForRenderFrameHost(const GURL& url) {
|
||||
- return nullptr;
|
||||
+RenderFrameHostDelegate::CreateWebUIForRenderFrameHost(
|
||||
+ const GURL& url,
|
||||
+ const std::string& frame_name) {
|
||||
+ return nullptr;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool RenderFrameHostDelegate::ShouldAllowRunningInsecureContent(
|
||||
diff --git a/content/browser/frame_host/render_frame_host_delegate.h b/content/browser/frame_host/render_frame_host_delegate.h
|
||||
index 197b64b49fd6..2e94b03c4f44 100644
|
||||
index cd4a295dfa37..1057c6d33b9e 100644
|
||||
--- a/content/browser/frame_host/render_frame_host_delegate.h
|
||||
+++ b/content/browser/frame_host/render_frame_host_delegate.h
|
||||
@@ -234,7 +234,8 @@ class CONTENT_EXPORT RenderFrameHostDelegate {
|
||||
@@ -275,7 +275,8 @@ class CONTENT_EXPORT RenderFrameHostDelegate {
|
||||
// Creates a WebUI object for a frame navigating to |url|. If no WebUI
|
||||
// applies, returns null.
|
||||
virtual std::unique_ptr<WebUIImpl> CreateWebUIForRenderFrameHost(
|
||||
|
@ -30,18 +28,18 @@ index 197b64b49fd6..2e94b03c4f44 100644
|
|||
// Called by |frame| to notify that it has received an update on focused
|
||||
// element. |bounds_in_root_view| is the rectangle containing the element that
|
||||
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
|
||||
index 1f566ef1f437..bb2f59d62315 100644
|
||||
index 7a53675a2139..29bb8eaba5c1 100644
|
||||
--- a/content/browser/frame_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/frame_host/render_frame_host_impl.cc
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "base/process/kill.h"
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "base/task_scheduler/post_task.h"
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "base/time/time.h"
|
||||
+#include "base/unguessable_token.h"
|
||||
#include "build/build_config.h"
|
||||
#include "cc/base/switches.h"
|
||||
#include "content/browser/accessibility/browser_accessibility_manager.h"
|
||||
@@ -3468,8 +3514,23 @@ bool RenderFrameHostImpl::UpdatePendingWebUI(const GURL& dest_url,
|
||||
@@ -4198,8 +4199,23 @@ bool RenderFrameHostImpl::UpdatePendingWebUI(const GURL& dest_url,
|
||||
DCHECK(web_ui_);
|
||||
should_reuse_web_ui_ = true;
|
||||
} else {
|
||||
|
@ -67,13 +65,13 @@ index 1f566ef1f437..bb2f59d62315 100644
|
|||
pending_web_ui_type_ = new_web_ui_type;
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index f985ea2bceab..779cfd79312d 100644
|
||||
index 6ed6ece96d0f..11bf320311bb 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -768,6 +768,25 @@ RenderFrameHostManager* WebContentsImpl::GetRenderManagerForTesting() {
|
||||
@@ -752,6 +752,25 @@ RenderFrameHostManager* WebContentsImpl::GetRenderManagerForTesting() {
|
||||
return GetRenderManager();
|
||||
}
|
||||
|
||||
|
||||
+void SendMessageToFrameTreeWebUIs(RenderFrameHostImpl* parent_frame_host,
|
||||
+ const IPC::Message& message,
|
||||
+ int& dispatch_count) {
|
||||
|
@ -96,8 +94,8 @@ index f985ea2bceab..779cfd79312d 100644
|
|||
bool WebContentsImpl::OnMessageReceived(RenderViewHostImpl* render_view_host,
|
||||
const IPC::Message& message) {
|
||||
for (auto& observer : observers_) {
|
||||
@@ -809,9 +828,10 @@ bool WebContentsImpl::OnMessageReceived(RenderViewHostImpl* render_view_host,
|
||||
|
||||
@@ -787,9 +806,10 @@ bool WebContentsImpl::OnMessageReceived(RenderViewHostImpl* render_view_host,
|
||||
|
||||
bool WebContentsImpl::OnMessageReceived(RenderFrameHostImpl* render_frame_host,
|
||||
const IPC::Message& message) {
|
||||
- {
|
||||
|
@ -109,8 +107,8 @@ index f985ea2bceab..779cfd79312d 100644
|
|||
+ if (dispatch_count > 0)
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -5021,8 +5043,9 @@ NavigationControllerImpl& WebContentsImpl::GetControllerForRenderManager() {
|
||||
|
||||
@@ -5782,8 +5802,9 @@ NavigationControllerImpl& WebContentsImpl::GetControllerForRenderManager() {
|
||||
}
|
||||
|
||||
std::unique_ptr<WebUIImpl> WebContentsImpl::CreateWebUIForRenderFrameHost(
|
||||
|
@ -123,10 +121,10 @@ index f985ea2bceab..779cfd79312d 100644
|
|||
|
||||
NavigationEntry*
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
|
||||
index 84a01a83c72a..49d0a4b547c2 100644
|
||||
index cd1c992c7738..5d52d8cb0bc4 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -534,7 +534,8 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
@@ -543,7 +543,8 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
SiteInstance* source_site_instance) const override;
|
||||
void EnsureOpenerProxiesExist(RenderFrameHost* source_rfh) override;
|
||||
std::unique_ptr<WebUIImpl> CreateWebUIForRenderFrameHost(
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
|
||||
index 1bfef2c..0ba2260 100644
|
||||
index 984fa41d064c..28c018d9fbfc 100644
|
||||
--- a/content/browser/web_contents/web_contents_view_aura.cc
|
||||
+++ b/content/browser/web_contents/web_contents_view_aura.cc
|
||||
@@ -675,6 +675,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
|
||||
@@ -609,6 +609,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
|
||||
|
||||
bool WebContentsViewAura::IsValidDragTarget(
|
||||
RenderWidgetHostImpl* target_rwh) const {
|
||||
|
@ -11,10 +11,10 @@ index 1bfef2c..0ba2260 100644
|
|||
GetRenderViewHostID(web_contents_->GetRenderViewHost()) !=
|
||||
drag_start_view_id_;
|
||||
diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm
|
||||
index 37ed265..814a37d 100644
|
||||
index cec3bd8a97b8..7a2b4462bd44 100644
|
||||
--- a/content/browser/web_contents/web_drag_dest_mac.mm
|
||||
+++ b/content/browser/web_contents/web_drag_dest_mac.mm
|
||||
@@ -348,6 +348,7 @@ - (void)setDragStartTrackersForProcess:(int)processID {
|
||||
@@ -348,6 +348,7 @@ GetRenderWidgetHostAtPoint:(const NSPoint&)viewPoint
|
||||
}
|
||||
|
||||
- (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index b2d1e63..bc2cf9a 100644
|
||||
index 11bf320311bb..27f087d4f706 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4562,6 +4562,11 @@ void WebContentsImpl::NotifyViewSwapped(RenderViewHost* old_host,
|
||||
@@ -4725,6 +4725,11 @@ void WebContentsImpl::NotifyViewSwapped(RenderViewHost* old_host,
|
||||
for (auto& observer : observers_)
|
||||
observer.RenderViewHostChanged(old_host, new_host);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn
|
||||
index a526d47e7786..946df3cd513c 100644
|
||||
index 286c791613ba..55b5499a1cb2 100644
|
||||
--- a/build/toolchain/win/BUILD.gn
|
||||
+++ b/build/toolchain/win/BUILD.gn
|
||||
@@ -6,6 +6,7 @@ import("//build/config/clang/clang.gni")
|
||||
|
@ -24,17 +24,17 @@ index a526d47e7786..946df3cd513c 100644
|
|||
+ }
|
||||
}
|
||||
|
||||
if (disable_goma) {
|
||||
@@ -389,7 +396,7 @@ if (target_os == "win" &&
|
||||
msvc_toolchain("win_clang_" + target_cpu) {
|
||||
environment = "environment." + target_cpu
|
||||
# Copy the VS runtime DLL for the default toolchain to the root build directory
|
||||
@@ -381,7 +388,7 @@ if (win_build_host_cpu != "x64") {
|
||||
msvc_toolchain("win_clang_" + win_build_host_cpu) {
|
||||
environment = "environment." + win_build_host_cpu
|
||||
prefix = rebase_path("$clang_base_path/bin", root_build_dir)
|
||||
- cl = "${goma_prefix}$prefix/${clang_cl}"
|
||||
+ cl = "${clang_prefix}$prefix/${clang_cl}"
|
||||
sys_include_flags = "${target_cpu_toolchain_data.include_flags_imsvc}"
|
||||
sys_include_flags = "${build_cpu_toolchain_data.include_flags_imsvc}"
|
||||
|
||||
toolchain_args = {
|
||||
@@ -431,7 +438,7 @@ template("win_x64_toolchains") {
|
||||
@@ -422,7 +429,7 @@ template("win_x64_toolchains") {
|
||||
msvc_toolchain("win_clang_" + target_name) {
|
||||
environment = "environment.x64"
|
||||
prefix = rebase_path("$clang_base_path/bin", root_build_dir)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
|
||||
index 0e554ba8467a..8e56489a5152 100644
|
||||
index 6dd2589d653a..48bb1dbe9750 100644
|
||||
--- a/content/public/renderer/content_renderer_client.h
|
||||
+++ b/content/public/renderer/content_renderer_client.h
|
||||
@@ -351,6 +351,11 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -380,6 +380,11 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
virtual void DidInitializeWorkerContextOnWorkerThread(
|
||||
v8::Local<v8::Context> context) {}
|
||||
|
||||
|
@ -15,10 +15,10 @@ index 0e554ba8467a..8e56489a5152 100644
|
|||
// 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 0affacaa0294..eca456faa640 100644
|
||||
index c82360f146d1..e0a90a8a6881 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -1402,6 +1404,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
|
||||
@@ -1251,6 +1251,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
|
||||
WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
|
||||
}
|
||||
|
||||
|
@ -32,10 +32,10 @@ index 0affacaa0294..eca456faa640 100644
|
|||
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 e8a4578009d1..e9ba4e7f391f 100644
|
||||
index ecb5ce6d6aa0..dffe3bca1a34 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.h
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.h
|
||||
@@ -219,6 +219,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
@@ -204,6 +204,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
void DidStartWorkerThread() override;
|
||||
void WillStopWorkerThread() override;
|
||||
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
|
||||
|
@ -43,11 +43,23 @@ index e8a4578009d1..e9ba4e7f391f 100644
|
|||
|
||||
// Set the PlatformEventObserverBase in |platform_event_observers_| associated
|
||||
// with |type| to |observer|. If there was already an observer associated to
|
||||
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
|
||||
index 920d161a1b81..f97250ea984e 100644
|
||||
--- a/third_party/blink/public/platform/platform.h
|
||||
+++ b/third_party/blink/public/platform/platform.h
|
||||
@@ -616,6 +616,7 @@ class BLINK_PLATFORM_EXPORT Platform {
|
||||
virtual void DidStartWorkerThread() {}
|
||||
virtual void WillStopWorkerThread() {}
|
||||
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}
|
||||
+ virtual void WorkerContextWillDestroy(const v8::Local<v8::Context>& worker) {}
|
||||
virtual bool AllowScriptExtensionForServiceWorker(const WebURL& script_url) {
|
||||
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 a522ba4dbdf7..6991078b36f5 100644
|
||||
index 7cf818b56c13..7e6e1191c399 100644
|
||||
--- a/third_party/blink/renderer/core/workers/worker_thread.cc
|
||||
+++ b/third_party/blink/renderer/core/workers/worker_thread.cc
|
||||
@@ -481,6 +481,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
|
||||
@@ -517,6 +517,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
|
||||
SetExitCode(ExitCode::kGracefullyTerminated);
|
||||
}
|
||||
|
||||
|
@ -60,15 +72,6 @@ index a522ba4dbdf7..6991078b36f5 100644
|
|||
inspector_task_runner_->Dispose();
|
||||
GetWorkerReportingProxy().WillDestroyWorkerGlobalScope();
|
||||
probe::AllAsyncTasksCanceled(GlobalScope());
|
||||
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
|
||||
index 98ecb84..0779d4a 100644
|
||||
--- a/third_party/blink/public/platform/platform.h
|
||||
+++ b/third_party/blink/public/platform/platform.h
|
||||
@@ -596,6 +596,7 @@ class BLINK_PLATFORM_EXPORT Platform {
|
||||
virtual void DidStartWorkerThread() {}
|
||||
virtual void WillStopWorkerThread() {}
|
||||
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}
|
||||
+ virtual void WorkerContextWillDestroy(const v8::Local<v8::Context>& worker) {}
|
||||
virtual bool AllowScriptExtensionForServiceWorker(const WebURL& script_url) {
|
||||
return false;
|
||||
}
|
||||
--
|
||||
2.17.0
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index ff09111634..fa7712a3a3 100755
|
||||
index 494d33fc04..249f3700f3 100755
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -247,7 +247,7 @@ target(link_target_type, "ffmpeg_internal") {
|
||||
# On POSIX x86, sanitizers will fail to compiler the H264 CABAC code due to
|
||||
# insufficient registers unless we disable EBP usage. crbug.com/786760
|
||||
if (target_cpu == "x86") {
|
||||
- if (using_sanitizer) {
|
||||
+ if (using_sanitizer || is_electron_build) {
|
||||
defines += [ "HAVE_EBP_AVAILABLE=0" ]
|
||||
} else {
|
||||
defines += [ "HAVE_EBP_AVAILABLE=1" ]
|
||||
@@ -239,7 +239,7 @@ target(link_target_type, "ffmpeg_internal") {
|
||||
# Windows builds can't compile without EBP because we can't omit frame
|
||||
# pointers like we do on posix.
|
||||
if (target_cpu == "x86") {
|
||||
- if (using_sanitizer || is_win) {
|
||||
+ if (using_sanitizer || is_win || is_electron_build) {
|
||||
defines += [ "HAVE_EBP_AVAILABLE=0" ]
|
||||
} else {
|
||||
defines += [ "HAVE_EBP_AVAILABLE=1" ]
|
||||
|
|
|
@ -1,5 +1,29 @@
|
|||
repo: src/v8
|
||||
patches:
|
||||
-
|
||||
author: null
|
||||
file: node_v8_patches.patch
|
||||
description: |
|
||||
Patches that node applies to v8.
|
||||
Generated with
|
||||
|
||||
$ cd third_party/electron_node
|
||||
$ CURRENT_NODE_VERSION=vX.Y.Z
|
||||
# Find the last commit with the message "deps: update V8 to <some version>"
|
||||
# This commit corresponds to node resetting V8 to its pristine upstream
|
||||
# state at the stated version.
|
||||
$ LAST_V8_UPDATE="$(git log --grep='^deps: update V8' --format='%H' -1 deps/v8)"
|
||||
# This creates a patch file containing all changes in deps/v8 from
|
||||
# $LAST_V8_UPDATE up to the current node version, formatted in a way that
|
||||
# it will apply cleanly to the V8 repository (i.e. with `deps/v8`
|
||||
# stripped off the path and excluding the v8/gypfiles directory, which
|
||||
# isn't present in V8.
|
||||
$ git format-patch \
|
||||
--relative=deps/v8 \
|
||||
$LAST_V8_UPDATE..$CURRENT_NODE_VERSION \
|
||||
deps/v8 \
|
||||
':(exclude)deps/v8/gypfiles' \
|
||||
--stdout
|
||||
-
|
||||
author: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
file: add_realloc.patch
|
||||
|
@ -37,54 +61,6 @@ patches:
|
|||
file: disable-warning-win.patch
|
||||
description:
|
||||
Disable unit test windows build warning
|
||||
-
|
||||
author: Aleksei Kuzmin <alkuzmin@microsoft.com>
|
||||
file: backport_39d546a.patch
|
||||
description: Node 10.0.0 needs it.
|
||||
-
|
||||
author: Aleksei Kuzmin <alkuzmin@microsoft.com>
|
||||
file: backport_ff0a97933.patch
|
||||
description: Node 10.2.0 needs it.
|
||||
-
|
||||
author: Aleksei Kuzmin <alkuzmin@microsoft.com>
|
||||
file: backport_9fb02b526.patch
|
||||
description: Node 10.2.0 needs it.
|
||||
-
|
||||
author: Aleksei Kuzmin <alkuzmin@microsoft.com>
|
||||
file: backport_23652c5f.patch
|
||||
description: Node 10.2.0 needs it.
|
||||
-
|
||||
author: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
file: backport_91ddb65d.patch
|
||||
description: Node 10.6.0 needs it.
|
||||
-
|
||||
author: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
file: cherry-pick_6989b3f6d7.patch
|
||||
description: Node 10.6.0 needs it.
|
||||
-
|
||||
author: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
file: cherry-pick_a440efb27f.patch
|
||||
description: Node 10.6.0 needs it.
|
||||
-
|
||||
author: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
file: cherry-pick_5dd3395.patch
|
||||
description: Node 10.6.0 needs it.
|
||||
-
|
||||
author: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
file: backport_aa6ce3e.patch
|
||||
description: Node 10.6.0 needs it.
|
||||
-
|
||||
author: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
file: cherry-pick_b20faff.patch
|
||||
description: Node 10.6.0 needs it.
|
||||
-
|
||||
author: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
file: cherry-pick_acc336c.patch
|
||||
description: Node 10.6.0 needs it.
|
||||
-
|
||||
author: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
file: cherry-pick_70c4340.patch
|
||||
description: Node 10.6.0 needs it.
|
||||
-
|
||||
author: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
file: expose_mksnapshot.patch
|
||||
|
|
|
@ -1,161 +0,0 @@
|
|||
23652c5f4cd07dd6304f78b407541c6a02caf60e
|
||||
diff --git a/include/libplatform/v8-tracing.h b/include/libplatform/v8-tracing.h
|
||||
index 9dcf3d7bca..e430e7c350 100644
|
||||
--- a/include/libplatform/v8-tracing.h
|
||||
+++ b/include/libplatform/v8-tracing.h
|
||||
@@ -112,6 +112,8 @@ class V8_PLATFORM_EXPORT TraceWriter {
|
||||
virtual void Flush() = 0;
|
||||
|
||||
static TraceWriter* CreateJSONTraceWriter(std::ostream& stream);
|
||||
+ static TraceWriter* CreateJSONTraceWriter(std::ostream& stream,
|
||||
+ const std::string& tag);
|
||||
|
||||
private:
|
||||
// Disallow copy and assign
|
||||
diff --git a/src/libplatform/tracing/trace-writer.cc b/src/libplatform/tracing/trace-writer.cc
|
||||
index 36a8783499..7bfc766469 100644
|
||||
--- a/src/libplatform/tracing/trace-writer.cc
|
||||
+++ b/src/libplatform/tracing/trace-writer.cc
|
||||
@@ -119,8 +119,12 @@ void JSONTraceWriter::AppendArgValue(ConvertableToTraceFormat* value) {
|
||||
stream_ << arg_stringified;
|
||||
}
|
||||
|
||||
-JSONTraceWriter::JSONTraceWriter(std::ostream& stream) : stream_(stream) {
|
||||
- stream_ << "{\"traceEvents\":[";
|
||||
+JSONTraceWriter::JSONTraceWriter(std::ostream& stream)
|
||||
+ : JSONTraceWriter(stream, "traceEvents") {}
|
||||
+
|
||||
+JSONTraceWriter::JSONTraceWriter(std::ostream& stream, const std::string& tag)
|
||||
+ : stream_(stream) {
|
||||
+ stream_ << "{\"" << tag << "\":[";
|
||||
}
|
||||
|
||||
JSONTraceWriter::~JSONTraceWriter() { stream_ << "]}"; }
|
||||
@@ -171,6 +175,11 @@ TraceWriter* TraceWriter::CreateJSONTraceWriter(std::ostream& stream) {
|
||||
return new JSONTraceWriter(stream);
|
||||
}
|
||||
|
||||
+TraceWriter* TraceWriter::CreateJSONTraceWriter(std::ostream& stream,
|
||||
+ const std::string& tag) {
|
||||
+ return new JSONTraceWriter(stream, tag);
|
||||
+}
|
||||
+
|
||||
} // namespace tracing
|
||||
} // namespace platform
|
||||
} // namespace v8
|
||||
diff --git a/src/libplatform/tracing/trace-writer.h b/src/libplatform/tracing/trace-writer.h
|
||||
index 7e1bdc24d6..d811351389 100644
|
||||
--- a/src/libplatform/tracing/trace-writer.h
|
||||
+++ b/src/libplatform/tracing/trace-writer.h
|
||||
@@ -14,6 +14,7 @@ namespace tracing {
|
||||
class JSONTraceWriter : public TraceWriter {
|
||||
public:
|
||||
explicit JSONTraceWriter(std::ostream& stream);
|
||||
+ JSONTraceWriter(std::ostream& stream, const std::string& tag);
|
||||
~JSONTraceWriter();
|
||||
void AppendTraceEvent(TraceObject* trace_event) override;
|
||||
void Flush() override;
|
||||
diff --git a/test/cctest/libplatform/test-tracing.cc b/test/cctest/libplatform/test-tracing.cc
|
||||
index da202057de..b949785bcf 100644
|
||||
--- a/test/cctest/libplatform/test-tracing.cc
|
||||
+++ b/test/cctest/libplatform/test-tracing.cc
|
||||
@@ -128,44 +128,42 @@ TEST(TestTraceBufferRingBuffer) {
|
||||
delete ring_buffer;
|
||||
}
|
||||
|
||||
-TEST(TestJSONTraceWriter) {
|
||||
- std::ostringstream stream;
|
||||
- // Create a scope for the tracing controller to terminate the trace writer.
|
||||
- {
|
||||
- v8::Platform* old_platform = i::V8::GetCurrentPlatform();
|
||||
- std::unique_ptr<v8::Platform> default_platform(
|
||||
- v8::platform::NewDefaultPlatform());
|
||||
- i::V8::SetPlatformForTesting(default_platform.get());
|
||||
- auto tracing =
|
||||
- base::make_unique<v8::platform::tracing::TracingController>();
|
||||
- v8::platform::tracing::TracingController* tracing_controller =
|
||||
- tracing.get();
|
||||
- static_cast<v8::platform::DefaultPlatform*>(default_platform.get())
|
||||
- ->SetTracingController(std::move(tracing));
|
||||
- TraceWriter* writer = TraceWriter::CreateJSONTraceWriter(stream);
|
||||
+void PopulateJSONWriter(TraceWriter* writer) {
|
||||
+ v8::Platform* old_platform = i::V8::GetCurrentPlatform();
|
||||
+ std::unique_ptr<v8::Platform> default_platform(
|
||||
+ v8::platform::NewDefaultPlatform());
|
||||
+ i::V8::SetPlatformForTesting(default_platform.get());
|
||||
+ auto tracing = base::make_unique<v8::platform::tracing::TracingController>();
|
||||
+ v8::platform::tracing::TracingController* tracing_controller = tracing.get();
|
||||
+ static_cast<v8::platform::DefaultPlatform*>(default_platform.get())
|
||||
+ ->SetTracingController(std::move(tracing));
|
||||
|
||||
- TraceBuffer* ring_buffer =
|
||||
- TraceBuffer::CreateTraceBufferRingBuffer(1, writer);
|
||||
- tracing_controller->Initialize(ring_buffer);
|
||||
- TraceConfig* trace_config = new TraceConfig();
|
||||
- trace_config->AddIncludedCategory("v8-cat");
|
||||
- tracing_controller->StartTracing(trace_config);
|
||||
+ TraceBuffer* ring_buffer =
|
||||
+ TraceBuffer::CreateTraceBufferRingBuffer(1, writer);
|
||||
+ tracing_controller->Initialize(ring_buffer);
|
||||
+ TraceConfig* trace_config = new TraceConfig();
|
||||
+ trace_config->AddIncludedCategory("v8-cat");
|
||||
+ tracing_controller->StartTracing(trace_config);
|
||||
|
||||
- TraceObject trace_object;
|
||||
- trace_object.InitializeForTesting(
|
||||
- 'X', tracing_controller->GetCategoryGroupEnabled("v8-cat"), "Test0",
|
||||
- v8::internal::tracing::kGlobalScope, 42, 123, 0, nullptr, nullptr,
|
||||
- nullptr, nullptr, TRACE_EVENT_FLAG_HAS_ID, 11, 22, 100, 50, 33, 44);
|
||||
- writer->AppendTraceEvent(&trace_object);
|
||||
- trace_object.InitializeForTesting(
|
||||
- 'Y', tracing_controller->GetCategoryGroupEnabled("v8-cat"), "Test1",
|
||||
- v8::internal::tracing::kGlobalScope, 43, 456, 0, nullptr, nullptr,
|
||||
- nullptr, nullptr, 0, 55, 66, 110, 55, 77, 88);
|
||||
- writer->AppendTraceEvent(&trace_object);
|
||||
- tracing_controller->StopTracing();
|
||||
- i::V8::SetPlatformForTesting(old_platform);
|
||||
- }
|
||||
+ TraceObject trace_object;
|
||||
+ trace_object.InitializeForTesting(
|
||||
+ 'X', tracing_controller->GetCategoryGroupEnabled("v8-cat"), "Test0",
|
||||
+ v8::internal::tracing::kGlobalScope, 42, 123, 0, nullptr, nullptr,
|
||||
+ nullptr, nullptr, TRACE_EVENT_FLAG_HAS_ID, 11, 22, 100, 50, 33, 44);
|
||||
+ writer->AppendTraceEvent(&trace_object);
|
||||
+ trace_object.InitializeForTesting(
|
||||
+ 'Y', tracing_controller->GetCategoryGroupEnabled("v8-cat"), "Test1",
|
||||
+ v8::internal::tracing::kGlobalScope, 43, 456, 0, nullptr, nullptr,
|
||||
+ nullptr, nullptr, 0, 55, 66, 110, 55, 77, 88);
|
||||
+ writer->AppendTraceEvent(&trace_object);
|
||||
+ tracing_controller->StopTracing();
|
||||
+ i::V8::SetPlatformForTesting(old_platform);
|
||||
+}
|
||||
|
||||
+TEST(TestJSONTraceWriter) {
|
||||
+ std::ostringstream stream;
|
||||
+ TraceWriter* writer = TraceWriter::CreateJSONTraceWriter(stream);
|
||||
+ PopulateJSONWriter(writer);
|
||||
std::string trace_str = stream.str();
|
||||
std::string expected_trace_str =
|
||||
"{\"traceEvents\":[{\"pid\":11,\"tid\":22,\"ts\":100,\"tts\":50,"
|
||||
@@ -177,6 +175,21 @@ TEST(TestJSONTraceWriter) {
|
||||
CHECK_EQ(expected_trace_str, trace_str);
|
||||
}
|
||||
|
||||
+TEST(TestJSONTraceWriterWithCustomtag) {
|
||||
+ std::ostringstream stream;
|
||||
+ TraceWriter* writer = TraceWriter::CreateJSONTraceWriter(stream, "customTag");
|
||||
+ PopulateJSONWriter(writer);
|
||||
+ std::string trace_str = stream.str();
|
||||
+ std::string expected_trace_str =
|
||||
+ "{\"customTag\":[{\"pid\":11,\"tid\":22,\"ts\":100,\"tts\":50,"
|
||||
+ "\"ph\":\"X\",\"cat\":\"v8-cat\",\"name\":\"Test0\",\"dur\":33,"
|
||||
+ "\"tdur\":44,\"id\":\"0x2a\",\"args\":{}},{\"pid\":55,\"tid\":66,"
|
||||
+ "\"ts\":110,\"tts\":55,\"ph\":\"Y\",\"cat\":\"v8-cat\",\"name\":"
|
||||
+ "\"Test1\",\"dur\":77,\"tdur\":88,\"args\":{}}]}";
|
||||
+
|
||||
+ CHECK_EQ(expected_trace_str, trace_str);
|
||||
+}
|
||||
+
|
||||
TEST(TestTracingController) {
|
||||
v8::Platform* old_platform = i::V8::GetCurrentPlatform();
|
||||
std::unique_ptr<v8::Platform> default_platform(
|
File diff suppressed because it is too large
Load diff
|
@ -1,84 +0,0 @@
|
|||
39d546a24022b62b00aedf7b556ac6c9e2306aab
|
||||
diff --git a/AUTHORS b/AUTHORS
|
||||
index 3251716f2a..4b5163961d 100644
|
||||
--- a/AUTHORS
|
||||
+++ b/AUTHORS
|
||||
@@ -70,6 +70,7 @@ Felix Geisendörfer <haimuiba@gmail.com>
|
||||
Filipe David Manana <fdmanana@gmail.com>
|
||||
Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
|
||||
Geoffrey Garside <ggarside@gmail.com>
|
||||
+Gus Caplan <me@gus.host>
|
||||
Gwang Yoon Hwang <ryumiel@company100.net>
|
||||
Henrique Ferreiro <henrique.ferreiro@gmail.com>
|
||||
Hirofumi Mako <mkhrfm@gmail.com>
|
||||
diff --git a/include/v8.h b/include/v8.h
|
||||
index 573e80176d..aeeebba304 100644
|
||||
--- a/include/v8.h
|
||||
+++ b/include/v8.h
|
||||
@@ -2378,6 +2378,11 @@ class V8_EXPORT Value : public Data {
|
||||
|
||||
bool IsWebAssemblyCompiledModule() const;
|
||||
|
||||
+ /**
|
||||
+ * Returns true if the value is a Module Namespace Object.
|
||||
+ */
|
||||
+ bool IsModuleNamespaceObject() const;
|
||||
+
|
||||
V8_WARN_UNUSED_RESULT MaybeLocal<BigInt> ToBigInt(
|
||||
Local<Context> context) const;
|
||||
V8_WARN_UNUSED_RESULT MaybeLocal<Boolean> ToBoolean(
|
||||
diff --git a/src/api.cc b/src/api.cc
|
||||
index 8b177d041d..6dd669ee11 100644
|
||||
--- a/src/api.cc
|
||||
+++ b/src/api.cc
|
||||
@@ -3583,6 +3583,10 @@ bool Value::IsSetIterator() const {
|
||||
|
||||
bool Value::IsPromise() const { return Utils::OpenHandle(this)->IsJSPromise(); }
|
||||
|
||||
+bool Value::IsModuleNamespaceObject() const {
|
||||
+ return Utils::OpenHandle(this)->IsJSModuleNamespace();
|
||||
+}
|
||||
+
|
||||
MaybeLocal<String> Value::ToString(Local<Context> context) const {
|
||||
auto obj = Utils::OpenHandle(this);
|
||||
if (obj->IsString()) return ToApiHandle<String>(obj);
|
||||
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
||||
index 54afc61f4c..b7483a7c5e 100644
|
||||
--- a/test/cctest/test-api.cc
|
||||
+++ b/test/cctest/test-api.cc
|
||||
@@ -27239,6 +27239,35 @@ TEST(ImportMeta) {
|
||||
CHECK(result->StrictEquals(Local<v8::Value>::Cast(v8::Utils::ToLocal(meta))));
|
||||
}
|
||||
|
||||
+TEST(GetModuleNamespace) {
|
||||
+ LocalContext context;
|
||||
+ v8::Isolate* isolate = context->GetIsolate();
|
||||
+ v8::HandleScope scope(isolate);
|
||||
+
|
||||
+ Local<String> url = v8_str("www.google.com");
|
||||
+ Local<String> source_text = v8_str("export default 5; export const a = 10;");
|
||||
+ v8::ScriptOrigin origin(url, Local<v8::Integer>(), Local<v8::Integer>(),
|
||||
+ Local<v8::Boolean>(), Local<v8::Integer>(),
|
||||
+ Local<v8::Value>(), Local<v8::Boolean>(),
|
||||
+ Local<v8::Boolean>(), True(isolate));
|
||||
+ v8::ScriptCompiler::Source source(source_text, origin);
|
||||
+ Local<Module> module =
|
||||
+ v8::ScriptCompiler::CompileModule(isolate, &source).ToLocalChecked();
|
||||
+ module->InstantiateModule(context.local(), UnexpectedModuleResolveCallback)
|
||||
+ .ToChecked();
|
||||
+ module->Evaluate(context.local()).ToLocalChecked();
|
||||
+
|
||||
+ Local<Value> ns_val = module->GetModuleNamespace();
|
||||
+ CHECK(ns_val->IsModuleNamespaceObject());
|
||||
+ Local<Object> ns = ns_val.As<Object>();
|
||||
+ CHECK(ns->Get(context.local(), v8_str("default"))
|
||||
+ .ToLocalChecked()
|
||||
+ ->StrictEquals(v8::Number::New(isolate, 5)));
|
||||
+ CHECK(ns->Get(context.local(), v8_str("a"))
|
||||
+ .ToLocalChecked()
|
||||
+ ->StrictEquals(v8::Number::New(isolate, 10)));
|
||||
+}
|
||||
+
|
||||
TEST(GlobalTemplateWithDoubleProperty) {
|
||||
v8::Isolate* isolate = CcTest::isolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
|
@ -1,235 +0,0 @@
|
|||
From 5020630808043615f2f6fbbfba1ea73342bebd69 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Clifford <danno@chromium.org>
|
||||
Date: Wed, 28 Mar 2018 13:30:16 +0200
|
||||
Subject: [PATCH] Remove legacy C++ implementation of Array#slice
|
||||
|
||||
Change-Id: Ifdeda00ad55aa937a6a414e7e566e6640ccd83c0
|
||||
Reviewed-on: https://chromium-review.googlesource.com/980936
|
||||
Reviewed-by: Yang Guo <yangguo@chromium.org>
|
||||
Commit-Queue: Daniel Clifford <danno@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/master@{#52278}
|
||||
---
|
||||
src/bootstrapper.cc | 8 ++---
|
||||
src/builtins/builtins-array.cc | 69 -------------------------------------
|
||||
src/builtins/builtins-definitions.h | 1 -
|
||||
src/contexts.h | 1 -
|
||||
src/debug/debug-evaluate.cc | 1 -
|
||||
src/flag-definitions.h | 2 +-
|
||||
src/js/array.js | 43 +++--------------------
|
||||
7 files changed, 8 insertions(+), 117 deletions(-)
|
||||
|
||||
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
|
||||
index 95d98078f3..626251202d 100644
|
||||
--- a/src/bootstrapper.cc
|
||||
+++ b/src/bootstrapper.cc
|
||||
@@ -1658,12 +1658,8 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
|
||||
SimpleInstallFunction(proto, "shift", Builtins::kArrayPrototypeShift, 0,
|
||||
false);
|
||||
SimpleInstallFunction(proto, "unshift", Builtins::kArrayUnshift, 1, false);
|
||||
- if (FLAG_enable_experimental_builtins) {
|
||||
- SimpleInstallFunction(proto, "slice", Builtins::kArrayPrototypeSlice, 2,
|
||||
- false);
|
||||
- } else {
|
||||
- SimpleInstallFunction(proto, "slice", Builtins::kArraySlice, 2, false);
|
||||
- }
|
||||
+ SimpleInstallFunction(proto, "slice", Builtins::kArrayPrototypeSlice, 2,
|
||||
+ false);
|
||||
SimpleInstallFunction(proto, "splice", Builtins::kArraySplice, 2, false);
|
||||
SimpleInstallFunction(proto, "includes", Builtins::kArrayIncludes, 1,
|
||||
false);
|
||||
diff --git a/src/builtins/builtins-array.cc b/src/builtins/builtins-array.cc
|
||||
index f400e824f0..7e3f948cbe 100644
|
||||
--- a/src/builtins/builtins-array.cc
|
||||
+++ b/src/builtins/builtins-array.cc
|
||||
@@ -240,75 +240,6 @@ BUILTIN(ArrayUnshift) {
|
||||
return Smi::FromInt(new_length);
|
||||
}
|
||||
|
||||
-BUILTIN(ArraySlice) {
|
||||
- HandleScope scope(isolate);
|
||||
- Handle<Object> receiver = args.receiver();
|
||||
- int len = -1;
|
||||
- int relative_start = 0;
|
||||
- int relative_end = 0;
|
||||
-
|
||||
- if (receiver->IsJSArray()) {
|
||||
- DisallowHeapAllocation no_gc;
|
||||
- JSArray* array = JSArray::cast(*receiver);
|
||||
- if (V8_UNLIKELY(!array->HasFastElements() ||
|
||||
- !IsJSArrayFastElementMovingAllowed(isolate, array) ||
|
||||
- !isolate->IsSpeciesLookupChainIntact() ||
|
||||
- // If this is a subclass of Array, then call out to JS
|
||||
- !array->HasArrayPrototype(isolate))) {
|
||||
- AllowHeapAllocation allow_allocation;
|
||||
- return CallJsIntrinsic(isolate, isolate->array_slice(), args);
|
||||
- }
|
||||
- len = Smi::ToInt(array->length());
|
||||
- } else if (receiver->IsJSObject() &&
|
||||
- JSSloppyArgumentsObject::GetSloppyArgumentsLength(
|
||||
- isolate, Handle<JSObject>::cast(receiver), &len)) {
|
||||
- // Array.prototype.slice.call(arguments, ...) is quite a common idiom
|
||||
- // (notably more than 50% of invocations in Web apps).
|
||||
- // Treat it in C++ as well.
|
||||
- DCHECK(JSObject::cast(*receiver)->HasFastElements() ||
|
||||
- JSObject::cast(*receiver)->HasFastArgumentsElements());
|
||||
- } else {
|
||||
- AllowHeapAllocation allow_allocation;
|
||||
- return CallJsIntrinsic(isolate, isolate->array_slice(), args);
|
||||
- }
|
||||
- DCHECK_LE(0, len);
|
||||
- int argument_count = args.length() - 1;
|
||||
- // Note carefully chosen defaults---if argument is missing,
|
||||
- // it's undefined which gets converted to 0 for relative_start
|
||||
- // and to len for relative_end.
|
||||
- relative_start = 0;
|
||||
- relative_end = len;
|
||||
- if (argument_count > 0) {
|
||||
- DisallowHeapAllocation no_gc;
|
||||
- if (!ClampedToInteger(isolate, args[1], &relative_start)) {
|
||||
- AllowHeapAllocation allow_allocation;
|
||||
- return CallJsIntrinsic(isolate, isolate->array_slice(), args);
|
||||
- }
|
||||
- if (argument_count > 1) {
|
||||
- Object* end_arg = args[2];
|
||||
- // slice handles the end_arg specially
|
||||
- if (end_arg->IsUndefined(isolate)) {
|
||||
- relative_end = len;
|
||||
- } else if (!ClampedToInteger(isolate, end_arg, &relative_end)) {
|
||||
- AllowHeapAllocation allow_allocation;
|
||||
- return CallJsIntrinsic(isolate, isolate->array_slice(), args);
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- // ECMAScript 232, 3rd Edition, Section 15.4.4.10, step 6.
|
||||
- uint32_t actual_start = (relative_start < 0) ? Max(len + relative_start, 0)
|
||||
- : Min(relative_start, len);
|
||||
-
|
||||
- // ECMAScript 232, 3rd Edition, Section 15.4.4.10, step 8.
|
||||
- uint32_t actual_end =
|
||||
- (relative_end < 0) ? Max(len + relative_end, 0) : Min(relative_end, len);
|
||||
-
|
||||
- Handle<JSObject> object = Handle<JSObject>::cast(receiver);
|
||||
- ElementsAccessor* accessor = object->GetElementsAccessor();
|
||||
- return *accessor->Slice(object, actual_start, actual_end);
|
||||
-}
|
||||
-
|
||||
BUILTIN(ArraySplice) {
|
||||
HandleScope scope(isolate);
|
||||
Handle<Object> receiver = args.receiver();
|
||||
diff --git a/src/builtins/builtins-definitions.h b/src/builtins/builtins-definitions.h
|
||||
index f31cf707cb..5d2b160f78 100644
|
||||
--- a/src/builtins/builtins-definitions.h
|
||||
+++ b/src/builtins/builtins-definitions.h
|
||||
@@ -269,7 +269,6 @@ namespace internal {
|
||||
CPP(ArrayShift) \
|
||||
TFJ(ArrayPrototypeShift, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
||||
/* ES6 #sec-array.prototype.slice */ \
|
||||
- CPP(ArraySlice) \
|
||||
TFJ(ArrayPrototypeSlice, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
|
||||
/* ES6 #sec-array.prototype.splice */ \
|
||||
CPP(ArraySplice) \
|
||||
diff --git a/src/contexts.h b/src/contexts.h
|
||||
index 03b32ab586..bb55d91c9c 100644
|
||||
--- a/src/contexts.h
|
||||
+++ b/src/contexts.h
|
||||
@@ -69,7 +69,6 @@ enum ContextLookupFlags {
|
||||
V(ARRAY_PUSH_INDEX, JSFunction, array_push) \
|
||||
V(ARRAY_SHIFT_INDEX, JSFunction, array_shift) \
|
||||
V(ARRAY_SPLICE_INDEX, JSFunction, array_splice) \
|
||||
- V(ARRAY_SLICE_INDEX, JSFunction, array_slice) \
|
||||
V(ARRAY_UNSHIFT_INDEX, JSFunction, array_unshift) \
|
||||
V(ARRAY_ENTRIES_ITERATOR_INDEX, JSFunction, array_entries_iterator) \
|
||||
V(ARRAY_FOR_EACH_ITERATOR_INDEX, JSFunction, array_for_each_iterator) \
|
||||
diff --git a/src/debug/debug-evaluate.cc b/src/debug/debug-evaluate.cc
|
||||
index c937be4fe0..d9defc778c 100644
|
||||
--- a/src/debug/debug-evaluate.cc
|
||||
+++ b/src/debug/debug-evaluate.cc
|
||||
@@ -616,7 +616,6 @@ bool BuiltinHasNoSideEffect(Builtins::Name id) {
|
||||
case Builtins::kArrayEvery:
|
||||
case Builtins::kArraySome:
|
||||
case Builtins::kArrayConcat:
|
||||
- case Builtins::kArraySlice:
|
||||
case Builtins::kArrayFilter:
|
||||
case Builtins::kArrayMap:
|
||||
case Builtins::kArrayReduce:
|
||||
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
|
||||
index 21cd9b2d3c..a05571700f 100644
|
||||
--- a/src/flag-definitions.h
|
||||
+++ b/src/flag-definitions.h
|
||||
@@ -832,7 +832,7 @@ DEFINE_BOOL(expose_trigger_failure, false, "expose trigger-failure extension")
|
||||
DEFINE_INT(stack_trace_limit, 10, "number of stack frames to capture")
|
||||
DEFINE_BOOL(builtins_in_stack_traces, false,
|
||||
"show built-in functions in stack traces")
|
||||
-DEFINE_BOOL(enable_experimental_builtins, true,
|
||||
+DEFINE_BOOL(enable_experimental_builtins, false,
|
||||
"enable new csa-based experimental builtins")
|
||||
DEFINE_BOOL(disallow_code_generation_from_strings, false,
|
||||
"disallow eval and friends")
|
||||
diff --git a/src/js/array.js b/src/js/array.js
|
||||
index c293f8e8c8..5b393263da 100644
|
||||
--- a/src/js/array.js
|
||||
+++ b/src/js/array.js
|
||||
@@ -578,46 +578,14 @@ function ArrayUnshiftFallback(arg1) { // length == 1
|
||||
}
|
||||
|
||||
|
||||
+// Oh the humanity... don't remove the following function because js2c for some
|
||||
+// reason gets symbol minifiation wrong if it's not there. Instead of spending
|
||||
+// the time fixing js2c (which will go away when all of the internal .js runtime
|
||||
+// files are gone), just keep this work-around.
|
||||
function ArraySliceFallback(start, end) {
|
||||
- var array = TO_OBJECT(this);
|
||||
- var len = TO_LENGTH(array.length);
|
||||
- var start_i = TO_INTEGER(start);
|
||||
- var end_i = len;
|
||||
-
|
||||
- if (!IS_UNDEFINED(end)) end_i = TO_INTEGER(end);
|
||||
-
|
||||
- if (start_i < 0) {
|
||||
- start_i += len;
|
||||
- if (start_i < 0) start_i = 0;
|
||||
- } else {
|
||||
- if (start_i > len) start_i = len;
|
||||
- }
|
||||
-
|
||||
- if (end_i < 0) {
|
||||
- end_i += len;
|
||||
- if (end_i < 0) end_i = 0;
|
||||
- } else {
|
||||
- if (end_i > len) end_i = len;
|
||||
- }
|
||||
-
|
||||
- var result = ArraySpeciesCreate(array, MathMax(end_i - start_i, 0));
|
||||
-
|
||||
- if (end_i < start_i) return result;
|
||||
-
|
||||
- if (UseSparseVariant(array, len, IS_ARRAY(array), end_i - start_i)) {
|
||||
- %NormalizeElements(array);
|
||||
- if (IS_ARRAY(result)) %NormalizeElements(result);
|
||||
- SparseSlice(array, start_i, end_i - start_i, len, result);
|
||||
- } else {
|
||||
- SimpleSlice(array, start_i, end_i - start_i, len, result);
|
||||
- }
|
||||
-
|
||||
- result.length = end_i - start_i;
|
||||
-
|
||||
- return result;
|
||||
+ return null;
|
||||
}
|
||||
|
||||
-
|
||||
function ComputeSpliceStartIndex(start_i, len) {
|
||||
if (start_i < 0) {
|
||||
start_i += len;
|
||||
@@ -1229,7 +1197,6 @@ utils.Export(function(to) {
|
||||
"array_push", ArrayPushFallback,
|
||||
"array_shift", ArrayShiftFallback,
|
||||
"array_splice", ArraySpliceFallback,
|
||||
- "array_slice", ArraySliceFallback,
|
||||
"array_unshift", ArrayUnshiftFallback,
|
||||
]);
|
||||
|
||||
--
|
||||
2.11.0 (Apple Git-81)
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,114 +0,0 @@
|
|||
9fb02b526f1cd3b859a530a01adb08bc0d089f4f
|
||||
diff --git a/src/builtins/builtins-api.cc b/src/builtins/builtins-api.cc
|
||||
index 7e2d3e219e..c26c1a9fd1 100644
|
||||
--- a/src/builtins/builtins-api.cc
|
||||
+++ b/src/builtins/builtins-api.cc
|
||||
@@ -22,17 +22,21 @@ namespace {
|
||||
// Returns the holder JSObject if the function can legally be called with this
|
||||
// receiver. Returns nullptr if the call is illegal.
|
||||
// TODO(dcarney): CallOptimization duplicates this logic, merge.
|
||||
-JSObject* GetCompatibleReceiver(Isolate* isolate, FunctionTemplateInfo* info,
|
||||
- JSObject* receiver) {
|
||||
+JSReceiver* GetCompatibleReceiver(Isolate* isolate, FunctionTemplateInfo* info,
|
||||
+ JSReceiver* receiver) {
|
||||
Object* recv_type = info->signature();
|
||||
// No signature, return holder.
|
||||
if (!recv_type->IsFunctionTemplateInfo()) return receiver;
|
||||
+ // A Proxy cannot have been created from the signature template.
|
||||
+ if (!receiver->IsJSObject()) return nullptr;
|
||||
+
|
||||
+ JSObject* js_obj_receiver = JSObject::cast(receiver);
|
||||
FunctionTemplateInfo* signature = FunctionTemplateInfo::cast(recv_type);
|
||||
|
||||
// Check the receiver. Fast path for receivers with no hidden prototypes.
|
||||
- if (signature->IsTemplateFor(receiver)) return receiver;
|
||||
- if (!receiver->map()->has_hidden_prototype()) return nullptr;
|
||||
- for (PrototypeIterator iter(isolate, receiver, kStartAtPrototype,
|
||||
+ if (signature->IsTemplateFor(js_obj_receiver)) return receiver;
|
||||
+ if (!js_obj_receiver->map()->has_hidden_prototype()) return nullptr;
|
||||
+ for (PrototypeIterator iter(isolate, js_obj_receiver, kStartAtPrototype,
|
||||
PrototypeIterator::END_AT_NON_HIDDEN);
|
||||
!iter.IsAtEnd(); iter.Advance()) {
|
||||
JSObject* current = iter.GetCurrent<JSObject>();
|
||||
@@ -46,8 +50,8 @@ V8_WARN_UNUSED_RESULT MaybeHandle<Object> HandleApiCallHelper(
|
||||
Isolate* isolate, Handle<HeapObject> function,
|
||||
Handle<HeapObject> new_target, Handle<FunctionTemplateInfo> fun_data,
|
||||
Handle<Object> receiver, BuiltinArguments args) {
|
||||
- Handle<JSObject> js_receiver;
|
||||
- JSObject* raw_holder;
|
||||
+ Handle<JSReceiver> js_receiver;
|
||||
+ JSReceiver* raw_holder;
|
||||
if (is_construct) {
|
||||
DCHECK(args.receiver()->IsTheHole(isolate));
|
||||
if (fun_data->instance_template()->IsUndefined(isolate)) {
|
||||
@@ -69,21 +73,18 @@ V8_WARN_UNUSED_RESULT MaybeHandle<Object> HandleApiCallHelper(
|
||||
raw_holder = *js_receiver;
|
||||
} else {
|
||||
DCHECK(receiver->IsJSReceiver());
|
||||
-
|
||||
- if (!receiver->IsJSObject()) {
|
||||
- // This function cannot be called with the given receiver. Abort!
|
||||
- THROW_NEW_ERROR(
|
||||
- isolate, NewTypeError(MessageTemplate::kIllegalInvocation), Object);
|
||||
- }
|
||||
-
|
||||
- js_receiver = Handle<JSObject>::cast(receiver);
|
||||
+ js_receiver = Handle<JSReceiver>::cast(receiver);
|
||||
|
||||
if (!fun_data->accept_any_receiver() &&
|
||||
- js_receiver->IsAccessCheckNeeded() &&
|
||||
- !isolate->MayAccess(handle(isolate->context()), js_receiver)) {
|
||||
- isolate->ReportFailedAccessCheck(js_receiver);
|
||||
- RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object);
|
||||
- return isolate->factory()->undefined_value();
|
||||
+ js_receiver->IsAccessCheckNeeded()) {
|
||||
+ // Proxies never need access checks.
|
||||
+ DCHECK(js_receiver->IsJSObject());
|
||||
+ Handle<JSObject> js_obj_receiver = Handle<JSObject>::cast(js_receiver);
|
||||
+ if (!isolate->MayAccess(handle(isolate->context()), js_obj_receiver)) {
|
||||
+ isolate->ReportFailedAccessCheck(js_obj_receiver);
|
||||
+ RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object);
|
||||
+ return isolate->factory()->undefined_value();
|
||||
+ }
|
||||
}
|
||||
|
||||
raw_holder = GetCompatibleReceiver(isolate, *fun_data, *js_receiver);
|
||||
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
||||
index 7887cbfa75..0605f439e5 100644
|
||||
--- a/test/cctest/test-api.cc
|
||||
+++ b/test/cctest/test-api.cc
|
||||
@@ -1088,6 +1088,34 @@ THREADED_PROFILED_TEST(FunctionTemplate) {
|
||||
TestFunctionTemplateAccessor(construct_callback, Return239Callback);
|
||||
}
|
||||
|
||||
+static void FunctionCallbackForProxyTest(
|
||||
+ const v8::FunctionCallbackInfo<Value>& info) {
|
||||
+ info.GetReturnValue().Set(info.This());
|
||||
+}
|
||||
+
|
||||
+THREADED_TEST(FunctionTemplateWithProxy) {
|
||||
+ LocalContext env;
|
||||
+ v8::Isolate* isolate = env->GetIsolate();
|
||||
+ v8::HandleScope scope(isolate);
|
||||
+
|
||||
+ v8::Local<v8::FunctionTemplate> function_template =
|
||||
+ v8::FunctionTemplate::New(isolate, FunctionCallbackForProxyTest);
|
||||
+ v8::Local<v8::Function> function =
|
||||
+ function_template->GetFunction(env.local()).ToLocalChecked();
|
||||
+ CHECK((*env)->Global()->Set(env.local(), v8_str("f"), function).FromJust());
|
||||
+ v8::Local<v8::Value> proxy =
|
||||
+ CompileRun("var proxy = new Proxy({}, {}); proxy");
|
||||
+ CHECK(proxy->IsProxy());
|
||||
+
|
||||
+ v8::Local<v8::Value> result = CompileRun("f(proxy)");
|
||||
+ CHECK(result->Equals(env.local(), (*env)->Global()).FromJust());
|
||||
+
|
||||
+ result = CompileRun("f.call(proxy)");
|
||||
+ CHECK(result->Equals(env.local(), proxy).FromJust());
|
||||
+
|
||||
+ result = CompileRun("Reflect.apply(f, proxy, [1])");
|
||||
+ CHECK(result->Equals(env.local(), proxy).FromJust());
|
||||
+}
|
||||
|
||||
static void SimpleCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
||||
ApiTestFuzzer::Fuzz();
|
File diff suppressed because it is too large
Load diff
|
@ -1,284 +0,0 @@
|
|||
diff --git a/src/isolate.cc b/src/isolate.cc
|
||||
index 38506bfc25..37a5578763 100644
|
||||
--- a/src/isolate.cc
|
||||
+++ b/src/isolate.cc
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <fstream> // NOLINT(readability/streams)
|
||||
#include <sstream>
|
||||
+#include <unordered_map>
|
||||
|
||||
#include "src/api.h"
|
||||
#include "src/assembler-inl.h"
|
||||
@@ -136,8 +137,6 @@ void ThreadLocalTop::Free() {
|
||||
base::Thread::LocalStorageKey Isolate::isolate_key_;
|
||||
base::Thread::LocalStorageKey Isolate::thread_id_key_;
|
||||
base::Thread::LocalStorageKey Isolate::per_isolate_thread_data_key_;
|
||||
-base::LazyMutex Isolate::thread_data_table_mutex_ = LAZY_MUTEX_INITIALIZER;
|
||||
-Isolate::ThreadDataTable* Isolate::thread_data_table_ = nullptr;
|
||||
base::Atomic32 Isolate::isolate_counter_ = 0;
|
||||
#if DEBUG
|
||||
base::Atomic32 Isolate::isolate_key_created_ = 0;
|
||||
@@ -148,13 +147,13 @@ Isolate::PerIsolateThreadData*
|
||||
ThreadId thread_id = ThreadId::Current();
|
||||
PerIsolateThreadData* per_thread = nullptr;
|
||||
{
|
||||
- base::LockGuard<base::Mutex> lock_guard(thread_data_table_mutex_.Pointer());
|
||||
- per_thread = thread_data_table_->Lookup(this, thread_id);
|
||||
+ base::LockGuard<base::Mutex> lock_guard(&thread_data_table_mutex_);
|
||||
+ per_thread = thread_data_table_.Lookup(thread_id);
|
||||
if (per_thread == nullptr) {
|
||||
per_thread = new PerIsolateThreadData(this, thread_id);
|
||||
- thread_data_table_->Insert(per_thread);
|
||||
+ thread_data_table_.Insert(per_thread);
|
||||
}
|
||||
- DCHECK(thread_data_table_->Lookup(this, thread_id) == per_thread);
|
||||
+ DCHECK(thread_data_table_.Lookup(thread_id) == per_thread);
|
||||
}
|
||||
return per_thread;
|
||||
}
|
||||
@@ -165,12 +164,11 @@ void Isolate::DiscardPerThreadDataForThisThread() {
|
||||
if (thread_id_int) {
|
||||
ThreadId thread_id = ThreadId(thread_id_int);
|
||||
DCHECK(!thread_manager_->mutex_owner_.Equals(thread_id));
|
||||
- base::LockGuard<base::Mutex> lock_guard(thread_data_table_mutex_.Pointer());
|
||||
- PerIsolateThreadData* per_thread =
|
||||
- thread_data_table_->Lookup(this, thread_id);
|
||||
+ base::LockGuard<base::Mutex> lock_guard(&thread_data_table_mutex_);
|
||||
+ PerIsolateThreadData* per_thread = thread_data_table_.Lookup(thread_id);
|
||||
if (per_thread) {
|
||||
DCHECK(!per_thread->thread_state_);
|
||||
- thread_data_table_->Remove(per_thread);
|
||||
+ thread_data_table_.Remove(per_thread);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -186,23 +184,20 @@ Isolate::PerIsolateThreadData* Isolate::FindPerThreadDataForThread(
|
||||
ThreadId thread_id) {
|
||||
PerIsolateThreadData* per_thread = nullptr;
|
||||
{
|
||||
- base::LockGuard<base::Mutex> lock_guard(thread_data_table_mutex_.Pointer());
|
||||
- per_thread = thread_data_table_->Lookup(this, thread_id);
|
||||
+ base::LockGuard<base::Mutex> lock_guard(&thread_data_table_mutex_);
|
||||
+ per_thread = thread_data_table_.Lookup(thread_id);
|
||||
}
|
||||
return per_thread;
|
||||
}
|
||||
|
||||
|
||||
void Isolate::InitializeOncePerProcess() {
|
||||
- base::LockGuard<base::Mutex> lock_guard(thread_data_table_mutex_.Pointer());
|
||||
- CHECK_NULL(thread_data_table_);
|
||||
isolate_key_ = base::Thread::CreateThreadLocalKey();
|
||||
#if DEBUG
|
||||
base::Relaxed_Store(&isolate_key_created_, 1);
|
||||
#endif
|
||||
thread_id_key_ = base::Thread::CreateThreadLocalKey();
|
||||
per_isolate_thread_data_key_ = base::Thread::CreateThreadLocalKey();
|
||||
- thread_data_table_ = new Isolate::ThreadDataTable();
|
||||
}
|
||||
|
||||
Address Isolate::get_address_from_id(IsolateAddressId id) {
|
||||
@@ -2240,14 +2235,9 @@ char* Isolate::RestoreThread(char* from) {
|
||||
return from + sizeof(ThreadLocalTop);
|
||||
}
|
||||
|
||||
-Isolate::ThreadDataTable::ThreadDataTable() : list_(nullptr) {}
|
||||
+Isolate::ThreadDataTable::ThreadDataTable() : table_() {}
|
||||
|
||||
-Isolate::ThreadDataTable::~ThreadDataTable() {
|
||||
- // TODO(svenpanne) The assertion below would fire if an embedder does not
|
||||
- // cleanly dispose all Isolates before disposing v8, so we are conservative
|
||||
- // and leave it out for now.
|
||||
- // DCHECK_NULL(list_);
|
||||
-}
|
||||
+Isolate::ThreadDataTable::~ThreadDataTable() {}
|
||||
|
||||
void Isolate::ReleaseManagedObjects() {
|
||||
Isolate::ManagedObjectFinalizer* current =
|
||||
@@ -2294,40 +2284,30 @@ Isolate::PerIsolateThreadData::~PerIsolateThreadData() {
|
||||
#endif
|
||||
}
|
||||
|
||||
-
|
||||
-Isolate::PerIsolateThreadData*
|
||||
- Isolate::ThreadDataTable::Lookup(Isolate* isolate,
|
||||
- ThreadId thread_id) {
|
||||
- for (PerIsolateThreadData* data = list_; data != nullptr;
|
||||
- data = data->next_) {
|
||||
- if (data->Matches(isolate, thread_id)) return data;
|
||||
- }
|
||||
- return nullptr;
|
||||
+Isolate::PerIsolateThreadData* Isolate::ThreadDataTable::Lookup(
|
||||
+ ThreadId thread_id) {
|
||||
+ auto t = table_.find(thread_id);
|
||||
+ if (t == table_.end()) return nullptr;
|
||||
+ return t->second;
|
||||
}
|
||||
|
||||
|
||||
void Isolate::ThreadDataTable::Insert(Isolate::PerIsolateThreadData* data) {
|
||||
- if (list_ != nullptr) list_->prev_ = data;
|
||||
- data->next_ = list_;
|
||||
- list_ = data;
|
||||
+ bool inserted = table_.insert(std::make_pair(data->thread_id_, data)).second;
|
||||
+ CHECK(inserted);
|
||||
}
|
||||
|
||||
|
||||
void Isolate::ThreadDataTable::Remove(PerIsolateThreadData* data) {
|
||||
- if (list_ == data) list_ = data->next_;
|
||||
- if (data->next_ != nullptr) data->next_->prev_ = data->prev_;
|
||||
- if (data->prev_ != nullptr) data->prev_->next_ = data->next_;
|
||||
+ table_.erase(data->thread_id_);
|
||||
delete data;
|
||||
}
|
||||
|
||||
-
|
||||
-void Isolate::ThreadDataTable::RemoveAllThreads(Isolate* isolate) {
|
||||
- PerIsolateThreadData* data = list_;
|
||||
- while (data != nullptr) {
|
||||
- PerIsolateThreadData* next = data->next_;
|
||||
- if (data->isolate() == isolate) Remove(data);
|
||||
- data = next;
|
||||
+void Isolate::ThreadDataTable::RemoveAllThreads() {
|
||||
+ for (auto& x : table_) {
|
||||
+ delete x.second;
|
||||
}
|
||||
+ table_.clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -2502,10 +2482,6 @@ Isolate::Isolate(bool enable_serializer)
|
||||
cancelable_task_manager_(new CancelableTaskManager()),
|
||||
abort_on_uncaught_exception_callback_(nullptr),
|
||||
total_regexp_code_generated_(0) {
|
||||
- {
|
||||
- base::LockGuard<base::Mutex> lock_guard(thread_data_table_mutex_.Pointer());
|
||||
- CHECK(thread_data_table_);
|
||||
- }
|
||||
id_ = base::Relaxed_AtomicIncrement(&isolate_counter_, 1);
|
||||
TRACE_ISOLATE(constructor);
|
||||
|
||||
@@ -2563,8 +2539,8 @@ void Isolate::TearDown() {
|
||||
Deinit();
|
||||
|
||||
{
|
||||
- base::LockGuard<base::Mutex> lock_guard(thread_data_table_mutex_.Pointer());
|
||||
- thread_data_table_->RemoveAllThreads(this);
|
||||
+ base::LockGuard<base::Mutex> lock_guard(&thread_data_table_mutex_);
|
||||
+ thread_data_table_.RemoveAllThreads();
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
@@ -2578,12 +2554,6 @@ void Isolate::TearDown() {
|
||||
}
|
||||
|
||||
|
||||
-void Isolate::GlobalTearDown() {
|
||||
- delete thread_data_table_;
|
||||
- thread_data_table_ = nullptr;
|
||||
-}
|
||||
-
|
||||
-
|
||||
void Isolate::ClearSerializerData() {
|
||||
delete external_reference_table_;
|
||||
external_reference_table_ = nullptr;
|
||||
diff --git a/src/isolate.h b/src/isolate.h
|
||||
index 5538992af1..40135ef324 100644
|
||||
--- a/src/isolate.h
|
||||
+++ b/src/isolate.h
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <queue>
|
||||
+#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "include/v8.h"
|
||||
@@ -247,6 +248,8 @@ class ThreadId {
|
||||
return *this;
|
||||
}
|
||||
|
||||
+ bool operator==(const ThreadId& other) const { return Equals(other); }
|
||||
+
|
||||
// Returns ThreadId for current thread.
|
||||
static ThreadId Current() { return ThreadId(GetCurrentThreadId()); }
|
||||
|
||||
@@ -287,7 +290,6 @@ class ThreadId {
|
||||
friend class Isolate;
|
||||
};
|
||||
|
||||
-
|
||||
#define FIELD_ACCESSOR(type, name) \
|
||||
inline void set_##name(type v) { name##_ = v; } \
|
||||
inline type name() const { return name##_; }
|
||||
@@ -550,8 +552,6 @@ class Isolate {
|
||||
|
||||
void ReleaseManagedObjects();
|
||||
|
||||
- static void GlobalTearDown();
|
||||
-
|
||||
void ClearSerializerData();
|
||||
|
||||
// Find the PerThread for this particular (isolate, thread) combination
|
||||
@@ -1371,20 +1371,24 @@ class Isolate {
|
||||
void* embedder_data_[Internals::kNumIsolateDataSlots];
|
||||
Heap heap_;
|
||||
|
||||
- // The per-process lock should be acquired before the ThreadDataTable is
|
||||
- // modified.
|
||||
class ThreadDataTable {
|
||||
public:
|
||||
ThreadDataTable();
|
||||
~ThreadDataTable();
|
||||
|
||||
- PerIsolateThreadData* Lookup(Isolate* isolate, ThreadId thread_id);
|
||||
+ PerIsolateThreadData* Lookup(ThreadId thread_id);
|
||||
void Insert(PerIsolateThreadData* data);
|
||||
void Remove(PerIsolateThreadData* data);
|
||||
- void RemoveAllThreads(Isolate* isolate);
|
||||
+ void RemoveAllThreads();
|
||||
|
||||
private:
|
||||
- PerIsolateThreadData* list_;
|
||||
+ struct Hasher {
|
||||
+ std::size_t operator()(const ThreadId& t) const {
|
||||
+ return std::hash<int>()(t.ToInteger());
|
||||
+ }
|
||||
+ };
|
||||
+
|
||||
+ std::unordered_map<ThreadId, PerIsolateThreadData*, Hasher> table_;
|
||||
};
|
||||
|
||||
// These items form a stack synchronously with threads Enter'ing and Exit'ing
|
||||
@@ -1412,12 +1416,15 @@ class Isolate {
|
||||
DISALLOW_COPY_AND_ASSIGN(EntryStackItem);
|
||||
};
|
||||
|
||||
- static base::LazyMutex thread_data_table_mutex_;
|
||||
+ // TODO(kenton@cloudflare.com): This mutex can be removed if
|
||||
+ // thread_data_table_ is always accessed under the isolate lock. I do not
|
||||
+ // know if this is the case, so I'm preserving it for now.
|
||||
+ base::Mutex thread_data_table_mutex_;
|
||||
|
||||
static base::Thread::LocalStorageKey per_isolate_thread_data_key_;
|
||||
static base::Thread::LocalStorageKey isolate_key_;
|
||||
static base::Thread::LocalStorageKey thread_id_key_;
|
||||
- static ThreadDataTable* thread_data_table_;
|
||||
+ ThreadDataTable thread_data_table_;
|
||||
|
||||
// A global counter for all generated Isolates, might overflow.
|
||||
static base::Atomic32 isolate_counter_;
|
||||
diff --git a/src/v8.cc b/src/v8.cc
|
||||
index ab4918efec..d3b4c471a4 100644
|
||||
--- a/src/v8.cc
|
||||
+++ b/src/v8.cc
|
||||
@@ -49,7 +49,6 @@ void V8::TearDown() {
|
||||
Bootstrapper::TearDownExtensions();
|
||||
ElementsAccessor::TearDown();
|
||||
RegisteredExtension::UnregisterAll();
|
||||
- Isolate::GlobalTearDown();
|
||||
sampler::Sampler::TearDown();
|
||||
FlagList::ResetAllFlags(); // Frees memory held by string arguments.
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
b767cde1e7bb94b3fea13f2d7e10cd90e6813d6c
|
||||
diff --git a/src/runtime/runtime-intl.cc b/src/runtime/runtime-intl.cc
|
||||
index c359a1e5a1..198610a652 100644
|
||||
--- a/src/runtime/runtime-intl.cc
|
||||
+++ b/src/runtime/runtime-intl.cc
|
||||
@@ -620,8 +620,7 @@ RUNTIME_FUNCTION(Runtime_PluralRulesSelect) {
|
||||
icu::UnicodeString result = plural_rules->select(rounded);
|
||||
return *isolate->factory()
|
||||
->NewStringFromTwoByte(Vector<const uint16_t>(
|
||||
- reinterpret_cast<const uint16_t*>(
|
||||
- icu::toUCharPtr(result.getBuffer())),
|
||||
+ reinterpret_cast<const uint16_t*>(result.getBuffer()),
|
||||
result.length()))
|
||||
.ToHandleChecked();
|
||||
}
|
|
@ -1,88 +0,0 @@
|
|||
diff --git a/include/v8.h b/include/v8.h
|
||||
index 573e80176d..bb77987f14 100644
|
||||
--- a/include/v8.h
|
||||
+++ b/include/v8.h
|
||||
@@ -3544,6 +3549,17 @@ class V8_EXPORT Object : public Value {
|
||||
*/
|
||||
Isolate* GetIsolate();
|
||||
|
||||
+ /**
|
||||
+ * If this object is a Set, Map, WeakSet or WeakMap, this returns a
|
||||
+ * representation of the elements of this object as an array.
|
||||
+ * If this object is a SetIterator or MapIterator, this returns all
|
||||
+ * elements of the underlying collection, starting at the iterator's current
|
||||
+ * position.
|
||||
+ * For other types, this will return an empty MaybeLocal<Array> (without
|
||||
+ * scheduling an exception).
|
||||
+ */
|
||||
+ MaybeLocal<Array> PreviewEntries(bool* is_key_value);
|
||||
+
|
||||
static Local<Object> New(Isolate* isolate);
|
||||
|
||||
V8_INLINE static Object* Cast(Value* obj);
|
||||
diff --git a/src/api.cc b/src/api.cc
|
||||
index e65f114edb..4302b6c604 100644
|
||||
--- a/src/api.cc
|
||||
+++ b/src/api.cc
|
||||
@@ -9543,21 +9543,20 @@ int debug::EstimatedValueSize(Isolate* v8_isolate, v8::Local<v8::Value> value) {
|
||||
return i::Handle<i::HeapObject>::cast(object)->Size();
|
||||
}
|
||||
|
||||
-v8::MaybeLocal<v8::Array> debug::EntriesPreview(Isolate* v8_isolate,
|
||||
- v8::Local<v8::Value> value,
|
||||
- bool* is_key_value) {
|
||||
- i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
|
||||
- ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
|
||||
- if (value->IsMap()) {
|
||||
+v8::MaybeLocal<v8::Array> v8::Object::PreviewEntries(bool* is_key_value) {
|
||||
+ if (IsMap()) {
|
||||
*is_key_value = true;
|
||||
- return value.As<Map>()->AsArray();
|
||||
+ return Map::Cast(this)->AsArray();
|
||||
}
|
||||
- if (value->IsSet()) {
|
||||
+ if (IsSet()) {
|
||||
*is_key_value = false;
|
||||
- return value.As<Set>()->AsArray();
|
||||
+ return Set::Cast(this)->AsArray();
|
||||
}
|
||||
|
||||
- i::Handle<i::Object> object = Utils::OpenHandle(*value);
|
||||
+ i::Handle<i::JSReceiver> object = Utils::OpenHandle(this);
|
||||
+ i::Isolate* isolate = object->GetIsolate();
|
||||
+ Isolate* v8_isolate = reinterpret_cast<Isolate*>(isolate);
|
||||
+ ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
|
||||
if (object->IsJSWeakCollection()) {
|
||||
*is_key_value = object->IsJSWeakMap();
|
||||
return Utils::ToLocal(i::JSWeakCollection::GetEntries(
|
||||
diff --git a/src/debug/debug-interface.h b/src/debug/debug-interface.h
|
||||
index 01124bf7fc..2210b4e87f 100644
|
||||
--- a/src/debug/debug-interface.h
|
||||
+++ b/src/debug/debug-interface.h
|
||||
@@ -212,10 +212,6 @@ void ResetBlackboxedStateCache(Isolate* isolate,
|
||||
|
||||
int EstimatedValueSize(Isolate* isolate, v8::Local<v8::Value> value);
|
||||
|
||||
-v8::MaybeLocal<v8::Array> EntriesPreview(Isolate* isolate,
|
||||
- v8::Local<v8::Value> value,
|
||||
- bool* is_key_value);
|
||||
-
|
||||
enum Builtin {
|
||||
kObjectKeys,
|
||||
kObjectGetPrototypeOf,
|
||||
diff --git a/src/inspector/v8-debugger.cc b/src/inspector/v8-debugger.cc
|
||||
index 5dee98853b..28212a1993 100644
|
||||
--- a/src/inspector/v8-debugger.cc
|
||||
+++ b/src/inspector/v8-debugger.cc
|
||||
@@ -29,8 +29,10 @@ v8::MaybeLocal<v8::Array> collectionsEntries(v8::Local<v8::Context> context,
|
||||
v8::Isolate* isolate = context->GetIsolate();
|
||||
v8::Local<v8::Array> entries;
|
||||
bool isKeyValue = false;
|
||||
- if (!v8::debug::EntriesPreview(isolate, value, &isKeyValue).ToLocal(&entries))
|
||||
+ if (!value->IsObject() ||
|
||||
+ !value.As<v8::Object>()->PreviewEntries(&isKeyValue).ToLocal(&entries)) {
|
||||
return v8::MaybeLocal<v8::Array>();
|
||||
+ }
|
||||
|
||||
v8::Local<v8::Array> wrappedEntries = v8::Array::New(isolate);
|
||||
CHECK(!isKeyValue || wrappedEntries->Length() % 2 == 0);
|
|
@ -1,17 +1,17 @@
|
|||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index 4b48f7d687..30e9ec34cf 100644
|
||||
index 456a318c1c..283bce15f0 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -192,7 +192,7 @@ config("internal_config") {
|
||||
|
||||
include_dirs = [ "." ]
|
||||
@@ -195,7 +195,7 @@ config("internal_config") {
|
||||
"$target_gen_dir",
|
||||
]
|
||||
|
||||
- if (is_component_build) {
|
||||
+ if (is_component_build || is_electron_build) {
|
||||
defines = [ "BUILDING_V8_SHARED" ]
|
||||
}
|
||||
}
|
||||
@@ -2912,6 +2912,8 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
|
||||
@@ -2674,6 +2674,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
|
||||
|
||||
configs = [ ":internal_config" ]
|
||||
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
diff --git a/src/log.cc b/src/log.cc
|
||||
index 903cc8e2e6..ce917b0be1 100644
|
||||
--- a/src/log.cc
|
||||
+++ b/src/log.cc
|
||||
@@ -327,6 +327,7 @@ void PerfBasicLogger::LogRecordedBuffer(AbstractCode* code, SharedFunctionInfo*,
|
||||
const char* name, int length) {
|
||||
if (FLAG_perf_basic_prof_only_functions &&
|
||||
(code->kind() != AbstractCode::INTERPRETED_FUNCTION &&
|
||||
+ code->kind() != AbstractCode::BUILTIN &&
|
||||
code->kind() != AbstractCode::OPTIMIZED_FUNCTION)) {
|
||||
return;
|
||||
}
|
|
@ -1,300 +0,0 @@
|
|||
diff --git a/src/js/intl.js b/src/js/intl.js
|
||||
index 53fbe1f947..3c7112716c 100644
|
||||
--- a/src/js/intl.js
|
||||
+++ b/src/js/intl.js
|
||||
@@ -152,18 +152,11 @@ var AVAILABLE_LOCALES = {
|
||||
*/
|
||||
var DEFAULT_ICU_LOCALE = UNDEFINED;
|
||||
|
||||
-function GetDefaultICULocaleJS(service) {
|
||||
+function GetDefaultICULocaleJS() {
|
||||
if (IS_UNDEFINED(DEFAULT_ICU_LOCALE)) {
|
||||
DEFAULT_ICU_LOCALE = %GetDefaultICULocale();
|
||||
}
|
||||
- // Check that this is a valid default for this service,
|
||||
- // otherwise fall back to "und"
|
||||
- // TODO(littledan,jshin): AvailableLocalesOf sometimes excludes locales
|
||||
- // which don't require tailoring, but work fine with root data. Look into
|
||||
- // exposing this fact in ICU or the way Chrome bundles data.
|
||||
- return (IS_UNDEFINED(service) ||
|
||||
- HAS_OWN_PROPERTY(getAvailableLocalesOf(service), DEFAULT_ICU_LOCALE))
|
||||
- ? DEFAULT_ICU_LOCALE : "und";
|
||||
+ return DEFAULT_ICU_LOCALE;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -434,6 +427,48 @@ function resolveLocale(service, requestedLocales, options) {
|
||||
}
|
||||
|
||||
|
||||
+/**
|
||||
+ * Look up the longest non-empty prefix of |locale| that is an element of
|
||||
+ * |availableLocales|. Returns undefined when the |locale| is completely
|
||||
+ * unsupported by |availableLocales|.
|
||||
+ */
|
||||
+function bestAvailableLocale(availableLocales, locale) {
|
||||
+ do {
|
||||
+ if (!IS_UNDEFINED(availableLocales[locale])) {
|
||||
+ return locale;
|
||||
+ }
|
||||
+ // Truncate locale if possible.
|
||||
+ var pos = %StringLastIndexOf(locale, '-');
|
||||
+ if (pos === -1) {
|
||||
+ break;
|
||||
+ }
|
||||
+ locale = %_Call(StringSubstring, locale, 0, pos);
|
||||
+ } while (true);
|
||||
+
|
||||
+ return UNDEFINED;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/**
|
||||
+ * Try to match any mutation of |requestedLocale| against |availableLocales|.
|
||||
+ */
|
||||
+function attemptSingleLookup(availableLocales, requestedLocale) {
|
||||
+ // Remove all extensions.
|
||||
+ var noExtensionsLocale = %RegExpInternalReplace(
|
||||
+ GetAnyExtensionRE(), requestedLocale, '');
|
||||
+ var availableLocale = bestAvailableLocale(
|
||||
+ availableLocales, requestedLocale);
|
||||
+ if (!IS_UNDEFINED(availableLocale)) {
|
||||
+ // Return the resolved locale and extension.
|
||||
+ var extensionMatch = %regexp_internal_match(
|
||||
+ GetUnicodeExtensionRE(), requestedLocale);
|
||||
+ var extension = IS_NULL(extensionMatch) ? '' : extensionMatch[0];
|
||||
+ return {locale: availableLocale, extension: extension};
|
||||
+ }
|
||||
+ return UNDEFINED;
|
||||
+}
|
||||
+
|
||||
+
|
||||
/**
|
||||
* Returns best matched supported locale and extension info using basic
|
||||
* lookup algorithm.
|
||||
@@ -446,31 +481,25 @@ function lookupMatcher(service, requestedLocales) {
|
||||
var availableLocales = getAvailableLocalesOf(service);
|
||||
|
||||
for (var i = 0; i < requestedLocales.length; ++i) {
|
||||
- // Remove all extensions.
|
||||
- var locale = %RegExpInternalReplace(
|
||||
- GetAnyExtensionRE(), requestedLocales[i], '');
|
||||
- do {
|
||||
- if (!IS_UNDEFINED(availableLocales[locale])) {
|
||||
- // Return the resolved locale and extension.
|
||||
- var extensionMatch = %regexp_internal_match(
|
||||
- GetUnicodeExtensionRE(), requestedLocales[i]);
|
||||
- var extension = IS_NULL(extensionMatch) ? '' : extensionMatch[0];
|
||||
- return {locale: locale, extension: extension, position: i};
|
||||
- }
|
||||
- // Truncate locale if possible.
|
||||
- var pos = %StringLastIndexOf(locale, '-');
|
||||
- if (pos === -1) {
|
||||
- break;
|
||||
- }
|
||||
- locale = %_Call(StringSubstring, locale, 0, pos);
|
||||
- } while (true);
|
||||
+ var result = attemptSingleLookup(availableLocales, requestedLocales[i]);
|
||||
+ if (!IS_UNDEFINED(result)) {
|
||||
+ return result;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ var defLocale = GetDefaultICULocaleJS();
|
||||
+
|
||||
+ // While ECMA-402 returns defLocale directly, we have to check if it is
|
||||
+ // supported, as such support is not guaranteed.
|
||||
+ var result = attemptSingleLookup(availableLocales, defLocale);
|
||||
+ if (!IS_UNDEFINED(result)) {
|
||||
+ return result;
|
||||
}
|
||||
|
||||
// Didn't find a match, return default.
|
||||
return {
|
||||
- locale: GetDefaultICULocaleJS(service),
|
||||
- extension: '',
|
||||
- position: -1
|
||||
+ locale: 'und',
|
||||
+ extension: ''
|
||||
};
|
||||
}
|
||||
|
||||
diff --git a/test/intl/assert.js b/test/intl/assert.js
|
||||
index d8cc85849f..c11e7c0bbf 100644
|
||||
--- a/test/intl/assert.js
|
||||
+++ b/test/intl/assert.js
|
||||
@@ -132,6 +132,16 @@ function assertFalse(value, user_message = '') {
|
||||
}
|
||||
|
||||
|
||||
+/**
|
||||
+ * Throws if value is null.
|
||||
+ */
|
||||
+function assertNotNull(value, user_message = '') {
|
||||
+ if (value === null) {
|
||||
+ fail("not null", value, user_message);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
/**
|
||||
* Runs code() and asserts that it throws the specified exception.
|
||||
*/
|
||||
@@ -189,3 +199,34 @@ function assertInstanceof(obj, type) {
|
||||
(actualTypeName ? ' but of < ' + actualTypeName + '>' : ''));
|
||||
}
|
||||
}
|
||||
+
|
||||
+
|
||||
+/**
|
||||
+ * Split a BCP 47 language tag into locale and extension.
|
||||
+ */
|
||||
+function splitLanguageTag(tag) {
|
||||
+ var extRe = /(-[0-9A-Za-z](-[0-9A-Za-z]{2,8})+)+$/;
|
||||
+ var match = %regexp_internal_match(extRe, tag);
|
||||
+ if (match) {
|
||||
+ return { locale: tag.slice(0, match.index), extension: match[0] };
|
||||
+ }
|
||||
+
|
||||
+ return { locale: tag, extension: '' };
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/**
|
||||
+ * Throw if |parent| is not a more general language tag of |child|, nor |child|
|
||||
+ * itself, per BCP 47 rules.
|
||||
+ */
|
||||
+function assertLanguageTag(child, parent) {
|
||||
+ var childSplit = splitLanguageTag(child);
|
||||
+ var parentSplit = splitLanguageTag(parent);
|
||||
+
|
||||
+ // Do not compare extensions at this moment, as %GetDefaultICULocale()
|
||||
+ // doesn't always output something we support.
|
||||
+ if (childSplit.locale !== parentSplit.locale &&
|
||||
+ !childSplit.locale.startsWith(parentSplit.locale + '-')) {
|
||||
+ fail(child, parent, 'language tag comparison');
|
||||
+ }
|
||||
+}
|
||||
diff --git a/test/intl/break-iterator/default-locale.js b/test/intl/break-iterator/default-locale.js
|
||||
index d8d5aeadb2..e1a42a100a 100644
|
||||
--- a/test/intl/break-iterator/default-locale.js
|
||||
+++ b/test/intl/break-iterator/default-locale.js
|
||||
@@ -37,8 +37,8 @@ assertFalse(options.locale === 'und');
|
||||
assertFalse(options.locale === '');
|
||||
assertFalse(options.locale === undefined);
|
||||
|
||||
-// Then check for equality.
|
||||
-assertEquals(options.locale, %GetDefaultICULocale());
|
||||
+// Then check for legitimacy.
|
||||
+assertLanguageTag(%GetDefaultICULocale(), options.locale);
|
||||
|
||||
var iteratorNone = new Intl.v8BreakIterator();
|
||||
assertEquals(options.locale, iteratorNone.resolvedOptions().locale);
|
||||
diff --git a/test/intl/break-iterator/wellformed-unsupported-locale.js b/test/intl/break-iterator/wellformed-unsupported-locale.js
|
||||
index 5ac8fbcd41..ffa44aef08 100644
|
||||
--- a/test/intl/break-iterator/wellformed-unsupported-locale.js
|
||||
+++ b/test/intl/break-iterator/wellformed-unsupported-locale.js
|
||||
@@ -29,4 +29,4 @@
|
||||
|
||||
var iterator = Intl.v8BreakIterator(['xx']);
|
||||
|
||||
-assertEquals(iterator.resolvedOptions().locale, %GetDefaultICULocale());
|
||||
+assertLanguageTag(%GetDefaultICULocale(), iterator.resolvedOptions().locale);
|
||||
diff --git a/test/intl/collator/default-locale.js b/test/intl/collator/default-locale.js
|
||||
index db9b1e7330..5fc6ff4665 100644
|
||||
--- a/test/intl/collator/default-locale.js
|
||||
+++ b/test/intl/collator/default-locale.js
|
||||
@@ -37,8 +37,8 @@ assertFalse(options.locale === 'und');
|
||||
assertFalse(options.locale === '');
|
||||
assertFalse(options.locale === undefined);
|
||||
|
||||
-// Then check for equality.
|
||||
-assertEquals(options.locale, %GetDefaultICULocale());
|
||||
+// Then check for legitimacy.
|
||||
+assertLanguageTag(%GetDefaultICULocale(), options.locale);
|
||||
|
||||
var collatorNone = new Intl.Collator();
|
||||
assertEquals(options.locale, collatorNone.resolvedOptions().locale);
|
||||
@@ -48,5 +48,8 @@ var collatorBraket = new Intl.Collator({});
|
||||
assertEquals(options.locale, collatorBraket.resolvedOptions().locale);
|
||||
|
||||
var collatorWithOptions = new Intl.Collator(undefined, {usage: 'search'});
|
||||
-assertEquals(%GetDefaultICULocale() + '-u-co-search',
|
||||
- collatorWithOptions.resolvedOptions().locale);
|
||||
+assertLanguageTag(%GetDefaultICULocale(),
|
||||
+ collatorWithOptions.resolvedOptions().locale);
|
||||
+assertNotNull(
|
||||
+ %regexp_internal_match(/-u(-[a-zA-Z]+-[a-zA-Z]+)*-co-search/,
|
||||
+ collatorWithOptions.resolvedOptions().locale));
|
||||
diff --git a/test/intl/collator/wellformed-unsupported-locale.js b/test/intl/collator/wellformed-unsupported-locale.js
|
||||
index 3963d47a61..ad89e3e220 100644
|
||||
--- a/test/intl/collator/wellformed-unsupported-locale.js
|
||||
+++ b/test/intl/collator/wellformed-unsupported-locale.js
|
||||
@@ -29,4 +29,4 @@
|
||||
|
||||
var collator = Intl.Collator(['xx']);
|
||||
|
||||
-assertEquals(collator.resolvedOptions().locale, %GetDefaultICULocale());
|
||||
+assertLanguageTag(%GetDefaultICULocale(), collator.resolvedOptions().locale);
|
||||
diff --git a/test/intl/date-format/default-locale.js b/test/intl/date-format/default-locale.js
|
||||
index 8e9b7fcec3..2d79e895b5 100644
|
||||
--- a/test/intl/date-format/default-locale.js
|
||||
+++ b/test/intl/date-format/default-locale.js
|
||||
@@ -37,8 +37,8 @@ assertFalse(options.locale === 'und');
|
||||
assertFalse(options.locale === '');
|
||||
assertFalse(options.locale === undefined);
|
||||
|
||||
-// Then check for equality.
|
||||
-assertEquals(options.locale, %GetDefaultICULocale());
|
||||
+// Then check for legitimacy.
|
||||
+assertLanguageTag(%GetDefaultICULocale(), options.locale);
|
||||
|
||||
var dtfNone = new Intl.DateTimeFormat();
|
||||
assertEquals(options.locale, dtfNone.resolvedOptions().locale);
|
||||
diff --git a/test/intl/date-format/wellformed-unsupported-locale.js b/test/intl/date-format/wellformed-unsupported-locale.js
|
||||
index 6f063abbd1..b812164832 100644
|
||||
--- a/test/intl/date-format/wellformed-unsupported-locale.js
|
||||
+++ b/test/intl/date-format/wellformed-unsupported-locale.js
|
||||
@@ -29,4 +29,4 @@
|
||||
|
||||
var dtf = Intl.DateTimeFormat(['xx']);
|
||||
|
||||
-assertEquals(dtf.resolvedOptions().locale, %GetDefaultICULocale());
|
||||
+assertLanguageTag(%GetDefaultICULocale(), dtf.resolvedOptions().locale);
|
||||
diff --git a/test/intl/number-format/default-locale.js b/test/intl/number-format/default-locale.js
|
||||
index cd67ba724f..a24aec2333 100644
|
||||
--- a/test/intl/number-format/default-locale.js
|
||||
+++ b/test/intl/number-format/default-locale.js
|
||||
@@ -37,8 +37,8 @@ assertFalse(options.locale === 'und');
|
||||
assertFalse(options.locale === '');
|
||||
assertFalse(options.locale === undefined);
|
||||
|
||||
-// Then check for equality.
|
||||
-assertEquals(options.locale, %GetDefaultICULocale());
|
||||
+// Then check for legitimacy.
|
||||
+assertLanguageTag(%GetDefaultICULocale(), options.locale);
|
||||
|
||||
var nfNone = new Intl.NumberFormat();
|
||||
assertEquals(options.locale, nfNone.resolvedOptions().locale);
|
||||
diff --git a/test/intl/number-format/wellformed-unsupported-locale.js b/test/intl/number-format/wellformed-unsupported-locale.js
|
||||
index 195eba4c19..c51753928e 100644
|
||||
--- a/test/intl/number-format/wellformed-unsupported-locale.js
|
||||
+++ b/test/intl/number-format/wellformed-unsupported-locale.js
|
||||
@@ -29,4 +29,4 @@
|
||||
|
||||
var nf = Intl.NumberFormat(['xx']);
|
||||
|
||||
-assertEquals(nf.resolvedOptions().locale, %GetDefaultICULocale());
|
||||
+assertLanguageTag(%GetDefaultICULocale(), nf.resolvedOptions().locale);
|
||||
diff --git a/test/mjsunit/regress/regress-6288.js b/test/mjsunit/regress/regress-6288.js
|
||||
index 337af54c1a..5f550c31c8 100644
|
||||
--- a/test/mjsunit/regress/regress-6288.js
|
||||
+++ b/test/mjsunit/regress/regress-6288.js
|
||||
@@ -8,6 +8,6 @@
|
||||
// DateTimeFormat but not Collation
|
||||
|
||||
if (this.Intl) {
|
||||
- assertEquals('und', Intl.Collator().resolvedOptions().locale);
|
||||
+ assertEquals('pt', Intl.Collator().resolvedOptions().locale);
|
||||
assertEquals('pt-BR', Intl.DateTimeFormat().resolvedOptions().locale);
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
diff --git a/src/api.cc b/src/api.cc
|
||||
index b46d376837..a97b38d00a 100644
|
||||
--- a/src/api.cc
|
||||
+++ b/src/api.cc
|
||||
@@ -10217,6 +10217,10 @@ const char* CodeEvent::GetCodeEventTypeName(CodeEventType code_event_type) {
|
||||
CODE_EVENTS_LIST(V)
|
||||
#undef V
|
||||
}
|
||||
+ // The execution should never pass here
|
||||
+ UNREACHABLE();
|
||||
+ // NOTE(mmarchini): Workaround to fix a compiler failure on GCC 4.9
|
||||
+ return "Unknown";
|
||||
}
|
||||
|
||||
CodeEventHandler::CodeEventHandler(Isolate* isolate) {
|
||||
diff --git a/src/log.cc b/src/log.cc
|
||||
index d1673715e5..f70acbd54d 100644
|
||||
--- a/src/log.cc
|
||||
+++ b/src/log.cc
|
||||
@@ -59,6 +59,10 @@ static v8::CodeEventType GetCodeEventTypeForTag(
|
||||
TAGS_LIST(V)
|
||||
#undef V
|
||||
}
|
||||
+ // The execution should never pass here
|
||||
+ UNREACHABLE();
|
||||
+ // NOTE(mmarchini): Workaround to fix a compiler failure on GCC 4.9
|
||||
+ return v8::CodeEventType::kUnknownType;
|
||||
}
|
||||
#define CALL_CODE_EVENT_HANDLER(Call) \
|
||||
if (listener_) { \
|
|
@ -1,225 +0,0 @@
|
|||
diff --git a/include/v8.h b/include/v8.h
|
||||
index 29566f4303..07a500f7ff 100644
|
||||
--- a/include/v8.h
|
||||
+++ b/include/v8.h
|
||||
@@ -1578,6 +1578,9 @@ class V8_EXPORT ScriptCompiler {
|
||||
* This will return nullptr if the script cannot be serialized. The
|
||||
* CachedData returned by this function should be owned by the caller.
|
||||
*/
|
||||
+ static CachedData* CreateCodeCache(Local<UnboundScript> unbound_script);
|
||||
+
|
||||
+ // Deprecated.
|
||||
static CachedData* CreateCodeCache(Local<UnboundScript> unbound_script,
|
||||
Local<String> source);
|
||||
|
||||
@@ -1587,6 +1590,9 @@ class V8_EXPORT ScriptCompiler {
|
||||
* This will return nullptr if the script cannot be serialized. The
|
||||
* CachedData returned by this function should be owned by the caller.
|
||||
*/
|
||||
+ static CachedData* CreateCodeCacheForFunction(Local<Function> function);
|
||||
+
|
||||
+ // Deprecated.
|
||||
static CachedData* CreateCodeCacheForFunction(Local<Function> function,
|
||||
Local<String> source);
|
||||
|
||||
diff --git a/src/api.cc b/src/api.cc
|
||||
index 27e7598bfa..61b1be1401 100644
|
||||
--- a/src/api.cc
|
||||
+++ b/src/api.cc
|
||||
@@ -2628,21 +2628,29 @@ uint32_t ScriptCompiler::CachedDataVersionTag() {
|
||||
|
||||
ScriptCompiler::CachedData* ScriptCompiler::CreateCodeCache(
|
||||
Local<UnboundScript> unbound_script, Local<String> source) {
|
||||
+ return CreateCodeCache(unbound_script);
|
||||
+}
|
||||
+
|
||||
+ScriptCompiler::CachedData* ScriptCompiler::CreateCodeCache(
|
||||
+ Local<UnboundScript> unbound_script) {
|
||||
i::Handle<i::SharedFunctionInfo> shared =
|
||||
i::Handle<i::SharedFunctionInfo>::cast(
|
||||
Utils::OpenHandle(*unbound_script));
|
||||
- i::Handle<i::String> source_str = Utils::OpenHandle(*source);
|
||||
DCHECK(shared->is_toplevel());
|
||||
- return i::CodeSerializer::Serialize(shared, source_str);
|
||||
+ return i::CodeSerializer::Serialize(shared);
|
||||
}
|
||||
|
||||
ScriptCompiler::CachedData* ScriptCompiler::CreateCodeCacheForFunction(
|
||||
Local<Function> function, Local<String> source) {
|
||||
+ return CreateCodeCacheForFunction(function);
|
||||
+}
|
||||
+
|
||||
+ScriptCompiler::CachedData* ScriptCompiler::CreateCodeCacheForFunction(
|
||||
+ Local<Function> function) {
|
||||
i::Handle<i::SharedFunctionInfo> shared(
|
||||
i::Handle<i::JSFunction>::cast(Utils::OpenHandle(*function))->shared());
|
||||
- i::Handle<i::String> source_str = Utils::OpenHandle(*source);
|
||||
CHECK(shared->is_wrapped());
|
||||
- return i::CodeSerializer::Serialize(shared, source_str);
|
||||
+ return i::CodeSerializer::Serialize(shared);
|
||||
}
|
||||
|
||||
MaybeLocal<Script> Script::Compile(Local<Context> context, Local<String> source,
|
||||
diff --git a/src/d8.cc b/src/d8.cc
|
||||
index b338dfbb2d..e6ba022795 100644
|
||||
--- a/src/d8.cc
|
||||
+++ b/src/d8.cc
|
||||
@@ -636,7 +636,7 @@ bool Shell::ExecuteString(Isolate* isolate, Local<String> source,
|
||||
ShellOptions::CodeCacheOptions::kProduceCache) {
|
||||
// Serialize and store it in memory for the next execution.
|
||||
ScriptCompiler::CachedData* cached_data =
|
||||
- ScriptCompiler::CreateCodeCache(script->GetUnboundScript(), source);
|
||||
+ ScriptCompiler::CreateCodeCache(script->GetUnboundScript());
|
||||
StoreInCodeCache(isolate, source, cached_data);
|
||||
delete cached_data;
|
||||
}
|
||||
@@ -645,7 +645,7 @@ bool Shell::ExecuteString(Isolate* isolate, Local<String> source,
|
||||
ShellOptions::CodeCacheOptions::kProduceCacheAfterExecute) {
|
||||
// Serialize and store it in memory for the next execution.
|
||||
ScriptCompiler::CachedData* cached_data =
|
||||
- ScriptCompiler::CreateCodeCache(script->GetUnboundScript(), source);
|
||||
+ ScriptCompiler::CreateCodeCache(script->GetUnboundScript());
|
||||
StoreInCodeCache(isolate, source, cached_data);
|
||||
delete cached_data;
|
||||
}
|
||||
diff --git a/src/snapshot/code-serializer.cc b/src/snapshot/code-serializer.cc
|
||||
index 2697e9dce4..823d8dc9af 100644
|
||||
--- a/src/snapshot/code-serializer.cc
|
||||
+++ b/src/snapshot/code-serializer.cc
|
||||
@@ -32,7 +32,7 @@ ScriptData::ScriptData(const byte* data, int length)
|
||||
|
||||
// static
|
||||
ScriptCompiler::CachedData* CodeSerializer::Serialize(
|
||||
- Handle<SharedFunctionInfo> info, Handle<String> source) {
|
||||
+ Handle<SharedFunctionInfo> info) {
|
||||
Isolate* isolate = info->GetIsolate();
|
||||
TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.Execute");
|
||||
HistogramTimerScope histogram_timer(isolate->counters()->compile_serialize());
|
||||
@@ -45,8 +45,7 @@ ScriptCompiler::CachedData* CodeSerializer::Serialize(
|
||||
Handle<Script> script(Script::cast(info->script()), isolate);
|
||||
if (FLAG_trace_serializer) {
|
||||
PrintF("[Serializing from");
|
||||
- Object* script = info->script();
|
||||
- Script::cast(script)->name()->ShortPrint();
|
||||
+ script->name()->ShortPrint();
|
||||
PrintF("]\n");
|
||||
}
|
||||
// TODO(7110): Enable serialization of Asm modules once the AsmWasmData is
|
||||
@@ -55,10 +54,11 @@ ScriptCompiler::CachedData* CodeSerializer::Serialize(
|
||||
if (isolate->debug()->is_loaded()) return nullptr;
|
||||
|
||||
// Serialize code object.
|
||||
+ Handle<String> source(String::cast(script->source()), isolate);
|
||||
CodeSerializer cs(isolate, SerializedCodeData::SourceHash(source));
|
||||
DisallowHeapAllocation no_gc;
|
||||
cs.reference_map()->AddAttachedReference(*source);
|
||||
- ScriptData* script_data = cs.Serialize(info);
|
||||
+ ScriptData* script_data = cs.SerializeSharedFunctionInfo(info);
|
||||
|
||||
if (FLAG_profile_deserialization) {
|
||||
double ms = timer.Elapsed().InMillisecondsF();
|
||||
@@ -75,11 +75,12 @@ ScriptCompiler::CachedData* CodeSerializer::Serialize(
|
||||
return result;
|
||||
}
|
||||
|
||||
-ScriptData* CodeSerializer::Serialize(Handle<HeapObject> obj) {
|
||||
+ScriptData* CodeSerializer::SerializeSharedFunctionInfo(
|
||||
+ Handle<SharedFunctionInfo> info) {
|
||||
DisallowHeapAllocation no_gc;
|
||||
|
||||
VisitRootPointer(Root::kHandleScope, nullptr,
|
||||
- Handle<Object>::cast(obj).location());
|
||||
+ Handle<Object>::cast(info).location());
|
||||
SerializeDeferredObjects();
|
||||
Pad();
|
||||
|
||||
diff --git a/src/snapshot/code-serializer.h b/src/snapshot/code-serializer.h
|
||||
index 8e97f47f2f..f6b51bf9b1 100644
|
||||
--- a/src/snapshot/code-serializer.h
|
||||
+++ b/src/snapshot/code-serializer.h
|
||||
@@ -45,10 +45,9 @@ class ScriptData {
|
||||
|
||||
class CodeSerializer : public Serializer<> {
|
||||
public:
|
||||
- static ScriptCompiler::CachedData* Serialize(Handle<SharedFunctionInfo> info,
|
||||
- Handle<String> source);
|
||||
+ static ScriptCompiler::CachedData* Serialize(Handle<SharedFunctionInfo> info);
|
||||
|
||||
- ScriptData* Serialize(Handle<HeapObject> obj);
|
||||
+ ScriptData* SerializeSharedFunctionInfo(Handle<SharedFunctionInfo> info);
|
||||
|
||||
V8_WARN_UNUSED_RESULT static MaybeHandle<SharedFunctionInfo> Deserialize(
|
||||
Isolate* isolate, ScriptData* cached_data, Handle<String> source);
|
||||
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
||||
index f242262cf0..fbcc12190e 100644
|
||||
--- a/test/cctest/test-api.cc
|
||||
+++ b/test/cctest/test-api.cc
|
||||
@@ -25428,8 +25428,7 @@ TEST(CodeCache) {
|
||||
v8::ScriptCompiler::kNoCompileOptions;
|
||||
v8::Local<v8::Script> script =
|
||||
v8::ScriptCompiler::Compile(context, &source, option).ToLocalChecked();
|
||||
- cache = v8::ScriptCompiler::CreateCodeCache(script->GetUnboundScript(),
|
||||
- source_string);
|
||||
+ cache = v8::ScriptCompiler::CreateCodeCache(script->GetUnboundScript());
|
||||
}
|
||||
isolate1->Dispose();
|
||||
|
||||
diff --git a/test/cctest/test-serialize.cc b/test/cctest/test-serialize.cc
|
||||
index 370791f6c2..817561c68a 100644
|
||||
--- a/test/cctest/test-serialize.cc
|
||||
+++ b/test/cctest/test-serialize.cc
|
||||
@@ -1240,8 +1240,7 @@ static Handle<SharedFunctionInfo> CompileScriptAndProduceCache(
|
||||
NOT_NATIVES_CODE)
|
||||
.ToHandleChecked();
|
||||
std::unique_ptr<ScriptCompiler::CachedData> cached_data(
|
||||
- ScriptCompiler::CreateCodeCache(ToApiHandle<UnboundScript>(sfi),
|
||||
- Utils::ToLocal(source)));
|
||||
+ ScriptCompiler::CreateCodeCache(ToApiHandle<UnboundScript>(sfi)));
|
||||
uint8_t* buffer = NewArray<uint8_t>(cached_data->length);
|
||||
MemCopy(buffer, cached_data->data, cached_data->length);
|
||||
*script_data = new i::ScriptData(buffer, cached_data->length);
|
||||
@@ -1895,7 +1894,7 @@ v8::ScriptCompiler::CachedData* CompileRunAndProduceCache(
|
||||
.ToLocalChecked();
|
||||
|
||||
if (cacheType != CodeCacheType::kAfterExecute) {
|
||||
- cache = ScriptCompiler::CreateCodeCache(script, source_str);
|
||||
+ cache = ScriptCompiler::CreateCodeCache(script);
|
||||
}
|
||||
|
||||
v8::Local<v8::Value> result = script->BindToCurrentContext()
|
||||
@@ -1907,7 +1906,7 @@ v8::ScriptCompiler::CachedData* CompileRunAndProduceCache(
|
||||
.FromJust());
|
||||
|
||||
if (cacheType == CodeCacheType::kAfterExecute) {
|
||||
- cache = ScriptCompiler::CreateCodeCache(script, source_str);
|
||||
+ cache = ScriptCompiler::CreateCodeCache(script);
|
||||
}
|
||||
CHECK(cache);
|
||||
}
|
||||
@@ -2153,7 +2152,7 @@ TEST(CodeSerializerWithHarmonyScoping) {
|
||||
v8::ScriptCompiler::CompileUnboundScript(
|
||||
isolate1, &source, v8::ScriptCompiler::kNoCompileOptions)
|
||||
.ToLocalChecked();
|
||||
- cache = v8::ScriptCompiler::CreateCodeCache(script, source_str);
|
||||
+ cache = v8::ScriptCompiler::CreateCodeCache(script);
|
||||
CHECK(cache);
|
||||
|
||||
v8::Local<v8::Value> result = script->BindToCurrentContext()
|
||||
@@ -2218,7 +2217,7 @@ TEST(Regress503552) {
|
||||
heap::SimulateIncrementalMarking(isolate->heap());
|
||||
|
||||
v8::ScriptCompiler::CachedData* cache_data =
|
||||
- CodeSerializer::Serialize(shared, source);
|
||||
+ CodeSerializer::Serialize(shared);
|
||||
delete cache_data;
|
||||
}
|
||||
|
||||
@@ -3447,7 +3446,7 @@ TEST(CachedCompileFunctionInContext) {
|
||||
env.local(), &script_source, 1, &arg_str, 0, nullptr,
|
||||
v8::ScriptCompiler::kEagerCompile)
|
||||
.ToLocalChecked();
|
||||
- cache = v8::ScriptCompiler::CreateCodeCacheForFunction(fun, source);
|
||||
+ cache = v8::ScriptCompiler::CreateCodeCacheForFunction(fun);
|
||||
}
|
||||
|
||||
{
|
|
@ -1,153 +0,0 @@
|
|||
diff --git a/src/log.cc b/src/log.cc
|
||||
index e50b00a320..832ef7519d 100644
|
||||
--- a/src/log.cc
|
||||
+++ b/src/log.cc
|
||||
@@ -2023,7 +2023,7 @@ void ExistingCodeLogger::LogCodeObject(Object* object) {
|
||||
break;
|
||||
case AbstractCode::BUILTIN:
|
||||
if (Code::cast(object)->is_interpreter_trampoline_builtin() &&
|
||||
- Code::cast(object) ==
|
||||
+ Code::cast(object) !=
|
||||
*BUILTIN_CODE(isolate_, InterpreterEntryTrampoline)) {
|
||||
return;
|
||||
}
|
||||
diff --git a/test/cctest/test-log.cc b/test/cctest/test-log.cc
|
||||
index c7864034c9..767541d4a3 100644
|
||||
--- a/test/cctest/test-log.cc
|
||||
+++ b/test/cctest/test-log.cc
|
||||
@@ -36,6 +36,9 @@
|
||||
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
+// The C++ style guide recommends using <re2> instead of <regex>. However, the
|
||||
+// former isn't available in V8.
|
||||
+#include <regex> // NOLINT(build/c++11)
|
||||
#include "src/api.h"
|
||||
#include "src/log-utils.h"
|
||||
#include "src/log.h"
|
||||
@@ -257,30 +260,41 @@ class TestCodeEventHandler : public v8::CodeEventHandler {
|
||||
explicit TestCodeEventHandler(v8::Isolate* isolate)
|
||||
: v8::CodeEventHandler(isolate) {}
|
||||
|
||||
- const char* FindLine(const char* prefix, const char* suffix = nullptr,
|
||||
- const char* start = nullptr) {
|
||||
- if (!log_.length()) return NULL;
|
||||
- const char* c_log = log_.c_str();
|
||||
- if (start == nullptr) start = c_log;
|
||||
- const char* end = c_log + log_.length();
|
||||
- return FindLogLine(start, end, prefix, suffix);
|
||||
+ size_t CountLines(std::string prefix, std::string suffix = std::string()) {
|
||||
+ if (!log_.length()) return 0;
|
||||
+
|
||||
+ std::regex expression("(^|\\n)" + prefix + ".*" + suffix + "(?=\\n|$)");
|
||||
+
|
||||
+ size_t match_count(std::distance(
|
||||
+ std::sregex_iterator(log_.begin(), log_.end(), expression),
|
||||
+ std::sregex_iterator()));
|
||||
+
|
||||
+ return match_count;
|
||||
}
|
||||
|
||||
void Handle(v8::CodeEvent* code_event) override {
|
||||
- const char* code_type =
|
||||
- v8::CodeEvent::GetCodeEventTypeName(code_event->GetCodeType());
|
||||
- char function_name[1000];
|
||||
- strncpy(function_name, code_type, 1000);
|
||||
- function_name[strlen(code_type)] = ' ';
|
||||
- code_event->GetFunctionName()->WriteUtf8(
|
||||
- function_name + strlen(code_type) + 1, 1000);
|
||||
- function_name[strlen(function_name) + 1] = '\0';
|
||||
- function_name[strlen(function_name)] = '\n';
|
||||
-
|
||||
- log_ += std::string(function_name);
|
||||
+ std::string log_line = "";
|
||||
+ log_line += v8::CodeEvent::GetCodeEventTypeName(code_event->GetCodeType());
|
||||
+ log_line += " ";
|
||||
+ log_line += FormatName(code_event);
|
||||
+ log_line += "\n";
|
||||
+ log_ += log_line;
|
||||
}
|
||||
|
||||
private:
|
||||
+ std::string FormatName(v8::CodeEvent* code_event) {
|
||||
+ std::string name = std::string(code_event->GetComment());
|
||||
+ if (name.empty()) {
|
||||
+ v8::Local<v8::String> functionName = code_event->GetFunctionName();
|
||||
+ std::string buffer(functionName->Utf8Length() + 1, 0);
|
||||
+ functionName->WriteUtf8(&buffer[0], functionName->Utf8Length() + 1);
|
||||
+ // Sanitize name, removing unwanted \0 resulted from WriteUtf8
|
||||
+ name = std::string(buffer.c_str());
|
||||
+ }
|
||||
+
|
||||
+ return name;
|
||||
+ }
|
||||
+
|
||||
std::string log_;
|
||||
};
|
||||
|
||||
@@ -854,21 +868,24 @@ TEST(ExternalCodeEventListener) {
|
||||
"testCodeEventListenerBeforeStart('1', 1);";
|
||||
CompileRun(source_text_before_start);
|
||||
|
||||
- CHECK_NULL(code_event_handler.FindLine("LazyCompile",
|
||||
- "testCodeEventListenerBeforeStart"));
|
||||
+ CHECK_EQ(code_event_handler.CountLines("LazyCompile",
|
||||
+ "testCodeEventListenerBeforeStart"),
|
||||
+ 0);
|
||||
|
||||
code_event_handler.Enable();
|
||||
|
||||
- CHECK_NOT_NULL(code_event_handler.FindLine(
|
||||
- "LazyCompile", "testCodeEventListenerBeforeStart"));
|
||||
+ CHECK_GE(code_event_handler.CountLines("LazyCompile",
|
||||
+ "testCodeEventListenerBeforeStart"),
|
||||
+ 1);
|
||||
|
||||
const char* source_text_after_start =
|
||||
"function testCodeEventListenerAfterStart(a,b) { return a + b };"
|
||||
"testCodeEventListenerAfterStart('1', 1);";
|
||||
CompileRun(source_text_after_start);
|
||||
|
||||
- CHECK_NOT_NULL(code_event_handler.FindLine(
|
||||
- "LazyCompile", "testCodeEventListenerAfterStart"));
|
||||
+ CHECK_GE(code_event_handler.CountLines("LazyCompile",
|
||||
+ "testCodeEventListenerAfterStart"),
|
||||
+ 1);
|
||||
|
||||
context->Exit();
|
||||
}
|
||||
@@ -897,21 +914,28 @@ TEST(ExternalCodeEventListenerWithInterpretedFramesNativeStack) {
|
||||
"testCodeEventListenerBeforeStart('1', 1);";
|
||||
CompileRun(source_text_before_start);
|
||||
|
||||
- CHECK_NULL(code_event_handler.FindLine("InterpretedFunction",
|
||||
- "testCodeEventListenerBeforeStart"));
|
||||
+ CHECK_EQ(code_event_handler.CountLines("InterpretedFunction",
|
||||
+ "testCodeEventListenerBeforeStart"),
|
||||
+ 0);
|
||||
|
||||
code_event_handler.Enable();
|
||||
|
||||
- CHECK_NOT_NULL(code_event_handler.FindLine(
|
||||
- "InterpretedFunction", "testCodeEventListenerBeforeStart"));
|
||||
+ CHECK_GE(code_event_handler.CountLines("InterpretedFunction",
|
||||
+ "testCodeEventListenerBeforeStart"),
|
||||
+ 1);
|
||||
|
||||
const char* source_text_after_start =
|
||||
"function testCodeEventListenerAfterStart(a,b) { return a + b };"
|
||||
"testCodeEventListenerAfterStart('1', 1);";
|
||||
CompileRun(source_text_after_start);
|
||||
|
||||
- CHECK_NOT_NULL(code_event_handler.FindLine(
|
||||
- "InterpretedFunction", "testCodeEventListenerAfterStart"));
|
||||
+ CHECK_GE(code_event_handler.CountLines("InterpretedFunction",
|
||||
+ "testCodeEventListenerAfterStart"),
|
||||
+ 1);
|
||||
+
|
||||
+ CHECK_EQ(
|
||||
+ code_event_handler.CountLines("Builtin", "InterpreterEntryTrampoline"),
|
||||
+ 1);
|
||||
|
||||
context->Exit();
|
||||
}
|
|
@ -1,183 +0,0 @@
|
|||
diff --git a/src/log.cc b/src/log.cc
|
||||
index 563fe3c5f0..edd883976d 100644
|
||||
--- a/src/log.cc
|
||||
+++ b/src/log.cc
|
||||
@@ -2011,10 +2011,10 @@ FILE* Logger::TearDown() {
|
||||
}
|
||||
|
||||
void ExistingCodeLogger::LogCodeObject(Object* object) {
|
||||
- AbstractCode* code_object = AbstractCode::cast(object);
|
||||
+ AbstractCode* abstract_code = AbstractCode::cast(object);
|
||||
CodeEventListener::LogEventsAndTags tag = CodeEventListener::STUB_TAG;
|
||||
const char* description = "Unknown code from before profiling";
|
||||
- switch (code_object->kind()) {
|
||||
+ switch (abstract_code->kind()) {
|
||||
case AbstractCode::INTERPRETED_FUNCTION:
|
||||
case AbstractCode::OPTIMIZED_FUNCTION:
|
||||
return; // We log this later using LogCompiledFunctions.
|
||||
@@ -2022,7 +2022,7 @@ void ExistingCodeLogger::LogCodeObject(Object* object) {
|
||||
return; // We log it later by walking the dispatch table.
|
||||
case AbstractCode::STUB:
|
||||
description =
|
||||
- CodeStub::MajorName(CodeStub::GetMajorKey(code_object->GetCode()));
|
||||
+ CodeStub::MajorName(CodeStub::GetMajorKey(abstract_code->GetCode()));
|
||||
if (description == nullptr) description = "A stub from before profiling";
|
||||
tag = CodeEventListener::STUB_TAG;
|
||||
break;
|
||||
@@ -2031,8 +2031,13 @@ void ExistingCodeLogger::LogCodeObject(Object* object) {
|
||||
tag = CodeEventListener::REG_EXP_TAG;
|
||||
break;
|
||||
case AbstractCode::BUILTIN:
|
||||
+ if (Code::cast(object)->is_interpreter_trampoline_builtin() &&
|
||||
+ Code::cast(object) ==
|
||||
+ *BUILTIN_CODE(isolate_, InterpreterEntryTrampoline)) {
|
||||
+ return;
|
||||
+ }
|
||||
description =
|
||||
- isolate_->builtins()->name(code_object->GetCode()->builtin_index());
|
||||
+ isolate_->builtins()->name(abstract_code->GetCode()->builtin_index());
|
||||
tag = CodeEventListener::BUILTIN_TAG;
|
||||
break;
|
||||
case AbstractCode::WASM_FUNCTION:
|
||||
@@ -2058,7 +2063,7 @@ void ExistingCodeLogger::LogCodeObject(Object* object) {
|
||||
case AbstractCode::NUMBER_OF_KINDS:
|
||||
UNIMPLEMENTED();
|
||||
}
|
||||
- CALL_CODE_EVENT_HANDLER(CodeCreateEvent(tag, code_object, description))
|
||||
+ CALL_CODE_EVENT_HANDLER(CodeCreateEvent(tag, abstract_code, description))
|
||||
}
|
||||
|
||||
void ExistingCodeLogger::LogCodeObjects() {
|
||||
@@ -2084,6 +2089,12 @@ void ExistingCodeLogger::LogCompiledFunctions() {
|
||||
// During iteration, there can be heap allocation due to
|
||||
// GetScriptLineNumber call.
|
||||
for (int i = 0; i < compiled_funcs_count; ++i) {
|
||||
+ if (sfis[i]->function_data()->IsInterpreterData()) {
|
||||
+ LogExistingFunction(sfis[i],
|
||||
+ Handle<AbstractCode>(AbstractCode::cast(
|
||||
+ sfis[i]->InterpreterTrampoline())),
|
||||
+ CodeEventListener::INTERPRETED_FUNCTION_TAG);
|
||||
+ }
|
||||
if (code_objects[i].is_identical_to(BUILTIN_CODE(isolate_, CompileLazy)))
|
||||
continue;
|
||||
LogExistingFunction(sfis[i], code_objects[i]);
|
||||
@@ -2128,8 +2139,9 @@ void ExistingCodeLogger::LogBytecodeHandlers() {
|
||||
}
|
||||
}
|
||||
|
||||
-void ExistingCodeLogger::LogExistingFunction(Handle<SharedFunctionInfo> shared,
|
||||
- Handle<AbstractCode> code) {
|
||||
+void ExistingCodeLogger::LogExistingFunction(
|
||||
+ Handle<SharedFunctionInfo> shared, Handle<AbstractCode> code,
|
||||
+ CodeEventListener::LogEventsAndTags tag) {
|
||||
if (shared->script()->IsScript()) {
|
||||
Handle<Script> script(Script::cast(shared->script()));
|
||||
int line_num = Script::GetLineNumber(script, shared->StartPosition()) + 1;
|
||||
@@ -2139,9 +2151,8 @@ void ExistingCodeLogger::LogExistingFunction(Handle<SharedFunctionInfo> shared,
|
||||
Handle<String> script_name(String::cast(script->name()));
|
||||
if (line_num > 0) {
|
||||
CALL_CODE_EVENT_HANDLER(
|
||||
- CodeCreateEvent(Logger::ToNativeByScript(
|
||||
- CodeEventListener::LAZY_COMPILE_TAG, *script),
|
||||
- *code, *shared, *script_name, line_num, column_num))
|
||||
+ CodeCreateEvent(Logger::ToNativeByScript(tag, *script), *code,
|
||||
+ *shared, *script_name, line_num, column_num))
|
||||
} else {
|
||||
// Can't distinguish eval and script here, so always use Script.
|
||||
CALL_CODE_EVENT_HANDLER(CodeCreateEvent(
|
||||
@@ -2149,11 +2160,9 @@ void ExistingCodeLogger::LogExistingFunction(Handle<SharedFunctionInfo> shared,
|
||||
*code, *shared, *script_name))
|
||||
}
|
||||
} else {
|
||||
- CALL_CODE_EVENT_HANDLER(
|
||||
- CodeCreateEvent(Logger::ToNativeByScript(
|
||||
- CodeEventListener::LAZY_COMPILE_TAG, *script),
|
||||
- *code, *shared, isolate_->heap()->empty_string(),
|
||||
- line_num, column_num))
|
||||
+ CALL_CODE_EVENT_HANDLER(CodeCreateEvent(
|
||||
+ Logger::ToNativeByScript(tag, *script), *code, *shared,
|
||||
+ isolate_->heap()->empty_string(), line_num, column_num))
|
||||
}
|
||||
} else if (shared->IsApiFunction()) {
|
||||
// API function.
|
||||
@@ -2169,9 +2178,8 @@ void ExistingCodeLogger::LogExistingFunction(Handle<SharedFunctionInfo> shared,
|
||||
CALL_CODE_EVENT_HANDLER(CallbackEvent(shared->DebugName(), entry_point))
|
||||
}
|
||||
} else {
|
||||
- CALL_CODE_EVENT_HANDLER(CodeCreateEvent(CodeEventListener::LAZY_COMPILE_TAG,
|
||||
- *code, *shared,
|
||||
- isolate_->heap()->empty_string()))
|
||||
+ CALL_CODE_EVENT_HANDLER(
|
||||
+ CodeCreateEvent(tag, *code, *shared, isolate_->heap()->empty_string()))
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/log.h b/src/log.h
|
||||
index 738aef4d73..ad254097e6 100644
|
||||
--- a/src/log.h
|
||||
+++ b/src/log.h
|
||||
@@ -109,7 +109,9 @@ class ExistingCodeLogger {
|
||||
|
||||
void LogCompiledFunctions();
|
||||
void LogExistingFunction(Handle<SharedFunctionInfo> shared,
|
||||
- Handle<AbstractCode> code);
|
||||
+ Handle<AbstractCode> code,
|
||||
+ CodeEventListener::LogEventsAndTags tag =
|
||||
+ CodeEventListener::LAZY_COMPILE_TAG);
|
||||
void LogCodeObject(Object* object);
|
||||
void LogBytecodeHandler(interpreter::Bytecode bytecode,
|
||||
interpreter::OperandScale operand_scale, Code* code);
|
||||
diff --git a/test/cctest/test-log.cc b/test/cctest/test-log.cc
|
||||
index 97071a63f5..c7864034c9 100644
|
||||
--- a/test/cctest/test-log.cc
|
||||
+++ b/test/cctest/test-log.cc
|
||||
@@ -875,6 +875,49 @@ TEST(ExternalCodeEventListener) {
|
||||
isolate->Dispose();
|
||||
}
|
||||
|
||||
+TEST(ExternalCodeEventListenerWithInterpretedFramesNativeStack) {
|
||||
+ i::FLAG_log = false;
|
||||
+ i::FLAG_prof = false;
|
||||
+ i::FLAG_interpreted_frames_native_stack = true;
|
||||
+
|
||||
+ v8::Isolate::CreateParams create_params;
|
||||
+ create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
|
||||
+ v8::Isolate* isolate = v8::Isolate::New(create_params);
|
||||
+
|
||||
+ {
|
||||
+ v8::HandleScope scope(isolate);
|
||||
+ v8::Isolate::Scope isolate_scope(isolate);
|
||||
+ v8::Local<v8::Context> context = v8::Context::New(isolate);
|
||||
+ context->Enter();
|
||||
+
|
||||
+ TestCodeEventHandler code_event_handler(isolate);
|
||||
+
|
||||
+ const char* source_text_before_start =
|
||||
+ "function testCodeEventListenerBeforeStart(a,b) { return a + b };"
|
||||
+ "testCodeEventListenerBeforeStart('1', 1);";
|
||||
+ CompileRun(source_text_before_start);
|
||||
+
|
||||
+ CHECK_NULL(code_event_handler.FindLine("InterpretedFunction",
|
||||
+ "testCodeEventListenerBeforeStart"));
|
||||
+
|
||||
+ code_event_handler.Enable();
|
||||
+
|
||||
+ CHECK_NOT_NULL(code_event_handler.FindLine(
|
||||
+ "InterpretedFunction", "testCodeEventListenerBeforeStart"));
|
||||
+
|
||||
+ const char* source_text_after_start =
|
||||
+ "function testCodeEventListenerAfterStart(a,b) { return a + b };"
|
||||
+ "testCodeEventListenerAfterStart('1', 1);";
|
||||
+ CompileRun(source_text_after_start);
|
||||
+
|
||||
+ CHECK_NOT_NULL(code_event_handler.FindLine(
|
||||
+ "InterpretedFunction", "testCodeEventListenerAfterStart"));
|
||||
+
|
||||
+ context->Exit();
|
||||
+ }
|
||||
+ isolate->Dispose();
|
||||
+}
|
||||
+
|
||||
TEST(TraceMaps) {
|
||||
SETUP_FLAGS();
|
||||
i::FLAG_trace_maps = true;
|
6741
patches/common/v8/node_v8_patches.patch
Normal file
6741
patches/common/v8/node_v8_patches.patch
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue