Skip to content
Permalink
Browse files

chore: bump chromium to 7dff37844cb3 (master) (#18059)

  • Loading branch information...
electron-bot authored and nornagon committed May 1, 2019
1 parent 0035854 commit 2616911f7ae7f4ee4672664c3c468e05503409dd
Showing with 1,636 additions and 294 deletions.
  1. +7 −1 BUILD.gn
  2. +1 −1 DEPS
  3. +3 −3 atom/browser/api/atom_api_app.cc
  4. +10 −4 atom/browser/api/atom_api_auto_updater.cc
  5. +8 −6 atom/browser/api/atom_api_web_contents.cc
  6. +1 −1 atom/browser/api/atom_api_web_contents.h
  7. +4 −1 atom/browser/api/event.cc
  8. +7 −2 atom/browser/api/event_emitter.h
  9. +2 −2 atom/browser/browser_win.cc
  10. +1 −1 atom/browser/io_thread.cc
  11. +1 −1 atom/browser/net/atom_cert_verifier.cc
  12. +1 −1 atom/browser/notifications/win/notification_presenter_win.cc
  13. +1 −0 atom/browser/osr/osr_host_display_client.cc
  14. +1 −1 atom/browser/osr/osr_host_display_client.h
  15. +1 −2 atom/browser/osr/osr_render_widget_host_view.cc
  16. +1 −1 atom/browser/osr/osr_render_widget_host_view.h
  17. +5 −2 atom/browser/ui/inspectable_web_contents_impl.cc
  18. +2 −1 atom/browser/ui/inspectable_web_contents_impl.h
  19. +5 −4 atom/browser/ui/views/autofill_popup_view.cc
  20. +4 −3 atom/browser/ui/views/menu_delegate.cc
  21. +2 −2 atom/browser/ui/views/root_view.cc
  22. +6 −2 atom/common/api/atom_api_v8_util.cc
  23. +2 −1 atom/common/native_mate_converters/callback.cc
  24. +2 −1 atom/common/native_mate_converters/net_converter.cc
  25. +6 −4 atom/common/native_mate_converters/v8_value_converter.cc
  26. +1 −1 atom/common/platform_util_win.cc
  27. +1 −1 atom/renderer/atom_sandboxed_renderer_client.cc
  28. +1 −1 atom/renderer/electron_api_service_impl.cc
  29. +21 −8 native_mate/native_mate/converter.h
  30. +6 −5 native_mate/native_mate/dictionary.h
  31. +1 −1 patches/common/chromium/add_realloc.patch
  32. +1 −1 patches/common/chromium/allow_webview_file_url.patch
  33. +2 −2 patches/common/chromium/blink-worker-enable-csp-in-file-scheme.patch
  34. +2 −2 patches/common/chromium/blink_initialization_order.patch
  35. +1 −1 patches/common/chromium/blink_local_frame.patch
  36. +4 −4 patches/common/chromium/blink_world_context.patch
  37. +10 −10 patches/common/chromium/can_create_window.patch
  38. +2 −2 patches/common/chromium/content_allow_embedder_to_prevent_locking_scheme_registry.patch
  39. +2 −2 patches/common/chromium/content_browser_main_loop.patch
  40. +3 −3 patches/common/chromium/cross_site_document_resource_handler.patch
  41. +1 −1 patches/common/chromium/disable-redraw-lock.patch
  42. +18 −18 patches/common/chromium/disable_color_correct_rendering.patch
  43. +5 −5 patches/common/chromium/disable_detach_webview_frame.patch
  44. +3 −3 patches/common/chromium/disable_hidden.patch
  45. +1 −1 patches/common/chromium/disable_network_services_by_default.patch
  46. +2 −2 patches/common/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch
  47. +2 −2 patches/common/chromium/exclude-a-few-test-files-from-build.patch
  48. +2 −2 patches/common/chromium/fix_disable_usage_of_setapplicationisdaemon_and.patch
  49. +7 −7 patches/common/chromium/frame_host_manager.patch
  50. +2 −2 patches/common/chromium/gritsettings_resource_ids.patch
  51. +18 −18 patches/common/chromium/mas_no_private_api.patch
  52. +3 −3 patches/common/chromium/notification_provenance.patch
  53. +1 −1 patches/common/chromium/pepper_flash.patch
  54. +1 −1 patches/common/chromium/render_widget_host_view_base.patch
  55. +1 −1 patches/common/chromium/render_widget_host_view_mac.patch
  56. +3 −3 patches/common/chromium/resource_file_conflict.patch
  57. +2 −7 patches/common/chromium/revert_roll_clang_356356_357569.patch
  58. +1 −1 patches/common/chromium/scroll_bounce_flag.patch
  59. +1 −1 patches/common/chromium/support_mixed_sandbox_with_zygote.patch
  60. +1 −1 patches/common/chromium/unsandboxed_ppapi_processes_skip_zygote.patch
  61. +13 −13 patches/common/chromium/viz_osr.patch
  62. +3 −3 patches/common/chromium/web_contents.patch
  63. +2 −2 patches/common/chromium/webview_cross_drag.patch
  64. +8 −8 patches/common/chromium/worker_context_will_destroy.patch
  65. +3 −1 patches/common/v8/.patches
  66. +3 −3 patches/common/v8/add_realloc.patch
  67. +3 −3 patches/common/v8/build_gn.patch
  68. +4 −4 patches/common/v8/dcheck.patch
  69. +27 −29 patches/common/v8/deps_provide_more_v8_backwards_compatibility.patch
  70. +2 −2 patches/common/v8/export_symbols_needed_for_windows_build.patch
  71. +2 −2 patches/common/v8/expose_mksnapshot.patch
  72. +13 −13 patches/common/v8/fixme_revert_heap_api_remove_deprecated_apis.patch
  73. +142 −0 patches/common/v8/revert_api_remove_deprecated_conversion_functions.patch
  74. +21 −21 patches/common/v8/revert_cctest_add_v8_export_private_to_arm_arm64_ports.patch
  75. +1,159 −0 patches/common/v8/revert_reland_api_heap_remove_deprecated_persistent_apis.patch
  76. +10 −17 patches/common/v8/{woa_symbol_workaround.patch → workaround_an_undefined_symbol_error.patch}
  77. +4 −1 spec-main/api-app-spec.ts
@@ -1069,6 +1069,7 @@ template("dist_zip") {
"deps",
"data_deps",
"data",
"testonly",
])
write_runtime_deps = _runtime_deps_file
}
@@ -1078,7 +1079,11 @@ template("dist_zip") {
deps = [
":$_runtime_deps_target",
]
forward_variables_from(invoker, [ "outputs" ])
forward_variables_from(invoker,
[
"outputs",
"testonly",
])
args = rebase_path(outputs + [ _runtime_deps_file ], root_build_dir) + [
target_cpu,
target_os,
@@ -1146,6 +1151,7 @@ dist_zip("electron_ffmpeg_zip") {
}

dist_zip("electron_chromedriver_zip") {
testonly = true
data_deps = [
"//chrome/test/chromedriver",
":licenses",
2 DEPS
@@ -10,7 +10,7 @@ gclient_gn_args = [

vars = {
'chromium_version':
'1e9f9a24aa12bea9cf194a82a7e249bd1242ec4f',
'7dff37844cb359ec96a63c4526574ec71138c2ec',
'node_version':
'696d8fb66d6f65fc82869d390e0d2078970b1eb4',

@@ -530,9 +530,9 @@ int ImportIntoCertStore(CertificateManagerModel* model,
}
#endif

void OnIconDataAvailable(util::Promise promise, gfx::Image* icon) {
if (icon && !icon->IsEmpty()) {
promise.Resolve(*icon);
void OnIconDataAvailable(util::Promise promise, gfx::Image icon) {
if (!icon.IsEmpty()) {
promise.Resolve(icon);
} else {
promise.RejectWithErrorMessage("Failed to get file icon.");
}
@@ -64,11 +64,17 @@ void AutoUpdater::OnError(const std::string& message,
auto errorObject =
error->ToObject(isolate()->GetCurrentContext()).ToLocalChecked();

auto context = isolate()->GetCurrentContext();

// add two new params for better error handling
errorObject->Set(mate::StringToV8(isolate(), "code"),
v8::Integer::New(isolate(), code));
errorObject->Set(mate::StringToV8(isolate(), "domain"),
mate::StringToV8(isolate(), domain));
errorObject
->Set(context, mate::StringToV8(isolate(), "code"),
v8::Integer::New(isolate(), code))
.Check();
errorObject
->Set(context, mate::StringToV8(isolate(), "domain"),
mate::StringToV8(isolate(), domain))
.Check();

mate::EmitEvent(isolate(), GetWrapper(), "error", errorObject, message);
}
@@ -491,12 +491,14 @@ void WebContents::DestroyWebContents(bool async) {
ResetManagedWebContents(async);
}

bool WebContents::DidAddMessageToConsole(content::WebContents* source,
int32_t level,
const base::string16& message,
int32_t line_no,
const base::string16& source_id) {
return Emit("console-message", level, message, line_no, source_id);
bool WebContents::DidAddMessageToConsole(
content::WebContents* source,
blink::mojom::ConsoleMessageLevel level,
const base::string16& message,
int32_t line_no,
const base::string16& source_id) {
return Emit("console-message", static_cast<int32_t>(level), message, line_no,
source_id);
}

void WebContents::OnCreateWindow(
@@ -336,7 +336,7 @@ class WebContents : public mate::TrackableObject<WebContents>,

// content::WebContentsDelegate:
bool DidAddMessageToConsole(content::WebContents* source,
int32_t level,
blink::mojom::ConsoleMessageLevel level,
const base::string16& message,
int32_t line_no,
const base::string16& source_id) override;
@@ -52,7 +52,10 @@ void Event::FrameDeleted(content::RenderFrameHost* rfh) {
}

void Event::PreventDefault(v8::Isolate* isolate) {
GetWrapper()->Set(StringToV8(isolate, "defaultPrevented"), v8::True(isolate));
GetWrapper()
->Set(isolate->GetCurrentContext(),
StringToV8(isolate, "defaultPrevented"), v8::True(isolate))
.Check();
}

bool Event::SendReply(const base::ListValue& result) {
@@ -108,8 +108,13 @@ class EventEmitter : public Wrappable<T> {
v8::HandleScope handle_scope(isolate());
EmitEvent(isolate(), GetWrapper(), name, event,
std::forward<Args>(args)...);
return event->Get(StringToV8(isolate(), "defaultPrevented"))
->BooleanValue(isolate());
auto context = isolate()->GetCurrentContext();
v8::Local<v8::Value> defaultPrevented;
if (event->Get(context, StringToV8(isolate(), "defaultPrevented"))
.ToLocal(&defaultPrevented)) {
return defaultPrevented->BooleanValue(isolate());
}
return false;
}

DISALLOW_COPY_AND_ASSIGN(EventEmitter);
@@ -96,7 +96,7 @@ void Browser::Focus() {
}

void Browser::AddRecentDocument(const base::FilePath& path) {
if (base::win::GetVersion() < base::win::VERSION_WIN7)
if (base::win::GetVersion() < base::win::Version::WIN7)
return;

CComPtr<IShellItem> item;
@@ -346,7 +346,7 @@ std::string Browser::GetExecutableFileProductName() const {

bool Browser::IsEmojiPanelSupported() {
// emoji picker is supported on Windows 10's Spring 2018 update & above.
return base::win::GetVersion() >= base::win::Version::VERSION_WIN10_RS4;
return base::win::GetVersion() >= base::win::Version::WIN10_RS4;
}

void Browser::ShowEmojiPanel() {
@@ -45,7 +45,7 @@ void IOThread::Init() {

auto cert_verifier = std::make_unique<net::CachingCertVerifier>(
std::make_unique<net::MultiThreadedCertVerifier>(
net::CertVerifyProc::CreateDefault()));
net::CertVerifyProc::CreateDefault(nullptr)));
builder->SetCertVerifier(std::move(cert_verifier));

// Create the network service, so that shared host resolver
@@ -152,7 +152,7 @@ class CertVerifierRequest : public AtomCertVerifier::Request {
};

AtomCertVerifier::AtomCertVerifier(RequireCTDelegate* ct_delegate)
: default_cert_verifier_(net::CertVerifier::CreateDefault()),
: default_cert_verifier_(net::CertVerifier::CreateDefault(nullptr)),
ct_delegate_(ct_delegate) {}

AtomCertVerifier::~AtomCertVerifier() {}
@@ -47,7 +47,7 @@ bool SaveIconToPath(const SkBitmap& bitmap, const base::FilePath& path) {
// static
NotificationPresenter* NotificationPresenter::Create() {
auto version = base::win::GetVersion();
if (version < base::win::VERSION_WIN8)
if (version < base::win::Version::WIN8)
return new NotificationPresenterWin7;
if (!WindowsToastNotification::Initialize())
return nullptr;
@@ -6,6 +6,7 @@

#include <utility>

#include "base/memory/shared_memory.h"
#include "components/viz/common/resources/resource_format.h"
#include "components/viz/common/resources/resource_sizes.h"
#include "mojo/public/cpp/system/platform_handle.h"
@@ -8,7 +8,7 @@
#include <memory>

#include "base/callback.h"
#include "base/memory/shared_memory.h"
#include "base/memory/shared_memory_mapping.h"
#include "components/viz/host/host_display_client.h"
#include "services/viz/privileged/interfaces/compositing/layered_window_updater.mojom.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -531,8 +531,7 @@ void OffScreenRenderWidgetHostView::TextInputStateChanged(

void OffScreenRenderWidgetHostView::ImeCancelComposition() {}

void OffScreenRenderWidgetHostView::RenderProcessGone(base::TerminationStatus,
int) {
void OffScreenRenderWidgetHostView::RenderProcessGone() {
Destroy();
}

@@ -131,7 +131,7 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
void SetIsLoading(bool is_loading) override;
void TextInputStateChanged(const content::TextInputState& params) override;
void ImeCancelComposition(void) override;
void RenderProcessGone(base::TerminationStatus, int) override;
void RenderProcessGone() override;
void Destroy(void) override;
void SetTooltipText(const base::string16&) override;
content::CursorManager* GetCursorManager() override;
@@ -41,6 +41,7 @@
#include "net/http/http_response_headers.h"
#include "services/network/public/cpp/simple_url_loader.h"
#include "services/network/public/cpp/simple_url_loader_stream_consumer.h"
#include "third_party/blink/public/common/logging/logging_utils.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"

@@ -779,11 +780,13 @@ void InspectableWebContentsImpl::WebContentsDestroyed() {

bool InspectableWebContentsImpl::DidAddMessageToConsole(
content::WebContents* source,
int32_t level,
blink::mojom::ConsoleMessageLevel level,
const base::string16& message,
int32_t line_no,
const base::string16& source_id) {
logging::LogMessage("CONSOLE", line_no, level).stream()
logging::LogMessage("CONSOLE", line_no,
blink::ConsoleMessageLevelToLogSeverity(level))
.stream()
<< "\"" << message << "\", source: " << source_id << " (" << line_no
<< ")";
return true;
@@ -145,6 +145,7 @@ class InspectableWebContentsImpl
void SetOpenNewWindowForPopups(bool value) override {}
void RecordPerformanceHistogram(const std::string& name,
double duration) override {}
void RecordUserMetricsAction(const std::string& name) override {}

// content::DevToolsFrontendHostDelegate:
void HandleMessageFromDevToolsFrontend(const std::string& message);
@@ -167,7 +168,7 @@ class InspectableWebContentsImpl

// content::WebContentsDelegate:
bool DidAddMessageToConsole(content::WebContents* source,
int32_t level,
blink::mojom::ConsoleMessageLevel level,
const base::string16& message,
int32_t line_no,
const base::string16& source_id) override;
@@ -150,10 +150,10 @@ void AutofillPopupView::OnSelectedRowChanged(

if (current_row_selection) {
int selected = current_row_selection.value_or(-1);
if (selected == -1 || selected >= child_count())
if (selected == -1 || static_cast<size_t>(selected) >= children().size())
return;
child_at(selected)->NotifyAccessibilityEvent(ax::mojom::Event::kSelection,
true);
children().at(selected)->NotifyAccessibilityEvent(
ax::mojom::Event::kSelection, true);
}
}

@@ -232,7 +232,8 @@ void AutofillPopupView::DoUpdateBoundsAndRedrawPopup() {
}

void AutofillPopupView::OnPaint(gfx::Canvas* canvas) {
if (!popup_ || popup_->GetLineCount() != child_count())
if (!popup_ ||
static_cast<size_t>(popup_->GetLineCount()) != children().size())
return;
gfx::Canvas* draw_canvas = canvas;
SkBitmap bitmap;
@@ -43,9 +43,10 @@ void MenuDelegate::RunMenu(AtomMenuModel* model,
menu_runner_.reset(new views::MenuRunner(
item,
views::MenuRunner::CONTEXT_MENU | views::MenuRunner::HAS_MNEMONICS));
menu_runner_->RunMenuAt(button->GetWidget()->GetTopLevelWidget(),
static_cast<views::MenuButton*>(button), bounds,
views::MenuAnchorPosition::kTopRight, source_type);
menu_runner_->RunMenuAt(
button->GetWidget()->GetTopLevelWidget(),
static_cast<views::MenuButton*>(button)->button_controller(), bounds,
views::MenuAnchorPosition::kTopRight, source_type);
}

void MenuDelegate::ExecuteCommand(int id) {
@@ -92,10 +92,10 @@ void RootView::SetMenuBarVisibility(bool visible) {

menu_bar_visible_ = visible;
if (visible) {
DCHECK_EQ(child_count(), 1);
DCHECK_EQ(children().size(), 1ul);
AddChildView(menu_bar_.get());
} else {
DCHECK_EQ(child_count(), 2);
DCHECK_EQ(children().size(), 2ul);
RemoveChildView(menu_bar_.get());
}

@@ -41,8 +41,12 @@ struct Converter<std::pair<Type1, Type2>> {
v8::Local<v8::Array> array(v8::Local<v8::Array>::Cast(val));
if (array->Length() != 2)
return false;
return Converter<Type1>::FromV8(isolate, array->Get(0), &out->first) &&
Converter<Type2>::FromV8(isolate, array->Get(1), &out->second);

auto context = isolate->GetCurrentContext();
return Converter<Type1>::FromV8(
isolate, array->Get(context, 0).ToLocalChecked(), &out->first) &&
Converter<Type2>::FromV8(
isolate, array->Get(context, 1).ToLocalChecked(), &out->second);
}
};

@@ -147,7 +147,8 @@ v8::Local<v8::Value> BindFunctionWith(v8::Isolate* isolate,
v8::Local<v8::Function> func,
v8::Local<v8::Value> arg1,
v8::Local<v8::Value> arg2) {
v8::MaybeLocal<v8::Value> bind = func->Get(mate::StringToV8(isolate, "bind"));
v8::MaybeLocal<v8::Value> bind =
func->Get(context, mate::StringToV8(isolate, "bind"));
CHECK(!bind.IsEmpty());
v8::Local<v8::Function> bind_func =
v8::Local<v8::Function>::Cast(bind.ToLocalChecked());
@@ -211,7 +211,8 @@ bool Converter<net::HttpResponseHeaders*>::FromV8(
if (localVal->IsArray()) {
auto values = v8::Local<v8::Array>::Cast(localVal);
for (uint32_t j = 0; j < values->Length(); j++) {
if (!addHeaderFromValue(key, values->Get(j))) {
if (!addHeaderFromValue(key,
values->Get(context, j).ToLocalChecked())) {
return false;
}
}
@@ -204,6 +204,7 @@ v8::Local<v8::Value> V8ValueConverter::ToV8Array(
v8::Isolate* isolate,
const base::ListValue* val) const {
v8::Local<v8::Array> result(v8::Array::New(isolate, val->GetSize()));
auto context = isolate->GetCurrentContext();

for (size_t i = 0; i < val->GetSize(); ++i) {
const base::Value* child = nullptr;
@@ -212,7 +213,7 @@ v8::Local<v8::Value> V8ValueConverter::ToV8Array(
v8::Local<v8::Value> child_v8 = ToV8ValueImpl(isolate, child);

v8::TryCatch try_catch(isolate);
result->Set(static_cast<uint32_t>(i), child_v8);
result->Set(context, static_cast<uint32_t>(i), child_v8).Check();
if (try_catch.HasCaught())
LOG(ERROR) << "Setter for index " << i << " threw an exception.";
}
@@ -330,9 +331,10 @@ std::unique_ptr<base::Value> V8ValueConverter::FromV8ValueImpl(
if (val->IsDate()) {
v8::Date* date = v8::Date::Cast(*val);
v8::Local<v8::Value> toISOString =
date->Get(v8::String::NewFromUtf8(isolate, "toISOString",
v8::NewStringType::kNormal)
.ToLocalChecked());
date->Get(context, v8::String::NewFromUtf8(isolate, "toISOString",
v8::NewStringType::kNormal)
.ToLocalChecked())
.ToLocalChecked();
if (toISOString->IsFunction()) {
v8::MaybeLocal<v8::Value> result =
toISOString.As<v8::Function>()->Call(context, val, 0, nullptr);
@@ -341,7 +341,7 @@ bool MoveItemToTrash(const base::FilePath& path) {
// Elevation prompt enabled for UAC protected files. This overrides the
// SILENT, NO_UI and NOERRORUI flags.

if (base::win::GetVersion() >= base::win::VERSION_WIN8) {
if (base::win::GetVersion() >= base::win::Version::WIN8) {
// Windows 8 introduces the flag RECYCLEONDELETE and deprecates the
// ALLOWUNDO in favor of ADDUNDORECORD.
if (FAILED(pfo->SetOperationFlags(
@@ -110,7 +110,7 @@ void InvokeHiddenCallback(v8::Handle<v8::Context> context,
auto callback_key = mate::ConvertToV8(isolate, callback_name)
->ToString(context)
.ToLocalChecked();
auto callback_value = binding->Get(callback_key);
auto callback_value = binding->Get(context, callback_key).ToLocalChecked();
DCHECK(callback_value->IsFunction()); // set by sandboxed_renderer/init.js
auto callback = v8::Handle<v8::Function>::Cast(callback_value);
ignore_result(callback->Call(context, binding, 0, nullptr));
@@ -60,7 +60,7 @@ void InvokeIpcCallback(v8::Local<v8::Context> context,
auto callback_key = mate::ConvertToV8(isolate, callback_name)
->ToString(context)
.ToLocalChecked();
auto callback_value = ipcNative->Get(callback_key);
auto callback_value = ipcNative->Get(context, callback_key).ToLocalChecked();
DCHECK(callback_value->IsFunction()); // set by init.ts
auto callback = v8::Local<v8::Function>::Cast(callback_value);
ignore_result(callback->Call(context, ipcNative, args.size(), args.data()));
Oops, something went wrong.

0 comments on commit 2616911

Please sign in to comment.
You can’t perform that action at this time.