Compare commits

...

23 Commits

Author SHA1 Message Date
Electron Bot
7186c62a27 Bump v6.0.0-beta.1 2019-04-30 14:46:01 -07:00
Electron Bot
bf88a13f1e Revert "Bump v6.0.0-beta.1"
This reverts commit 6e9c540baf.
2019-04-30 13:16:51 -07:00
Electron Bot
6e9c540baf Bump v6.0.0-beta.1 2019-04-30 13:11:22 -07:00
Electron Bot
24b14d55ef Revert "Bump v6.0.0-beta.1"
This reverts commit 3b8eb6c061.
2019-04-30 13:09:29 -07:00
Electron Bot
3b8eb6c061 Bump v6.0.0-beta.1 2019-04-30 13:04:14 -07:00
Electron Bot
f9b7f6389e Revert "Bump v6.0.0-beta.1"
This reverts commit 8f30faacf8.
2019-04-30 13:02:36 -07:00
Electron Bot
8f30faacf8 Bump v6.0.0-beta.1 2019-04-30 12:59:08 -07:00
trop[bot]
f631890237 chore: disable Vulkan validation layers (#18062) 2019-04-30 12:49:43 -07:00
trop[bot]
8982889a8d build: fix issues for stable release we fixed in 5-0-x (#18068)
* build: fix release notes generation

* build: fix bump-version script for stable releases
2019-04-30 12:49:25 -07:00
trop[bot]
cd3539aaf8 refactor: rewire the desktop capturer API to remove race conditions (#18042)
We now create a new instance of atom::api::DesktopCapturer for every
request instead of weirdly re-using the same instance and queuing
requests.  This means there is now a 1:1 relationship between request
and DesktopCapturer so there isn't a race condition between the observer
for one request calling back before the observer of another.  This is an
issue ever since the backing APIs moved to worker threads.

This also does a few things to ensure memory management
* Only ever listen to one event per-request, after that we wipe the emit
function to ignore all future events
* Ensures we clean up the window_capturer_, screen_capturer_ and
captured_sources_ in native land once the request is over.

This _in theory_ fixes a flake we've been seeing on CI where we try to
resolve the promise for a request that no longerr exists.
2019-04-30 07:07:56 -07:00
Samuel Attard
275e277721 feat: upgrade to Node 12 (#17838) (#18044)
* fix: add boringssl backport to support node upgrade

* fix: Update node_includes.h, add DCHECK macros

* fix: Update node Debug Options parser usage

* fix: Fix asar setup

* fix: using v8Util in isolated context

* fix: make "process" available in preload scripts

* fix: use proper options parser and remove setting of _breakFirstLine

_breakFirstLine was being set on the process, but that has changed in node 12 and so is no longer needed. Node will handle it properly when --inspect-brk is provided

* chore: update node dep sha

* fix: process.binding => _linkedBinding in sandboxed isolated preload

* fix: make original-fs work with streams

* build: override node module version

* fix: use _linkedBinding in content_script/init.js

* chore: update node ref in DEPS

* build: node_module_version should be 73
2019-04-29 15:52:31 -07:00
trop[bot]
283b1241d5 docs: Correct doc for registerFileProtocol (#18050)
In the registerFileProtocol docs the "headers" argument of the callback was described as being a list.
In fact is has to be an Object mapping header-entries to values. This can be seen in Line 326 of `/spec/api-protocol-spec.js` [fe618631f1/spec/api-protocol-spec.js (L326)].
2019-04-29 15:30:34 -07:00
trop[bot]
7bdea26085 docs: update nodeIntegration section for new defaults (#18047)
* docs: update nodeIntegration section for new defaults

* docs: update docs/tutorial/first-app.md

* Update docs/tutorial/security.md

Co-Authored-By: miniak <milan.burda@gmail.com>
2019-04-29 15:18:23 -07:00
Samuel Attard
f1fa589779 chore: upgrade chromium to 76 (#17921) 2019-04-29 12:48:28 -07:00
trop[bot]
7226ad1eba fix: crash when failed to get devices in desktopCapturer (#17973)
* fix: crash when failed to get devices in desktopCapturer

* return after emit
2019-04-26 08:05:12 -07:00
trop[bot]
d92743f0f3 docs: remove outdated refs to protocol.registerStandardSchemes (#17977) 2019-04-26 08:05:03 -07:00
trop[bot]
2c309efef4 docs: add azure vm spinup tutorial (#17975) 2019-04-25 15:49:21 -07:00
trop[bot]
0b418315a3 docs: clean up the native module tutorial (#17951) 2019-04-24 11:25:34 -07:00
trop[bot]
2f474867c7 fix: permission handler regression in default app (#17950) 2019-04-24 11:25:17 -07:00
trop[bot]
0b5acd9569 refactor: add missing constants for options (#17919) 2019-04-24 10:16:53 -07:00
Jeremy Apthorp
3419c3c730 chore: bump chromium to 75.0.3770.3 (#17883) 2019-04-23 14:29:16 -07:00
trop[bot]
754200f1b1 fix: crash when run from SMB network share (#17909) 2019-04-23 09:03:51 -07:00
Samuel Attard
37f4bd4dd0 build: reset version to 6.0.0-beta.0 in prep for 6.0.0-beta.1 2019-04-19 15:35:46 -07:00
159 changed files with 1644 additions and 789 deletions

View File

@@ -547,6 +547,7 @@ static_library("electron_lib") {
deps += [
"//third_party/crashpad/crashpad/client",
"//ui/accelerated_widget_mac",
"//ui/views_bridge_mac",
]
sources += [
"atom/browser/ui/views/autofill_popup_view.cc",

4
DEPS
View File

@@ -10,9 +10,9 @@ gclient_gn_args = [
vars = {
'chromium_version':
'75.0.3740.3',
'76.0.3774.1',
'node_version':
'2dc0f8811b2b295c08d797b8a11b030234c98502',
'696d8fb66d6f65fc82869d390e0d2078970b1eb4',
'boto_version': 'f7574aa6cc2c819430c1f05e9a1a1a666ef8169b',
'pyyaml_version': '3.12',

View File

@@ -1 +1 @@
6.0.0-nightly.20190404
6.0.0-beta.1

View File

@@ -25,11 +25,12 @@
version: 1.0.{build}
build_cloud: libcc-20
image: libcc-20-vs2017-15.7.4
image: libcc-20-vs2017-15.9
environment:
GIT_CACHE_PATH: C:\Users\electron\libcc_cache
DISABLE_CRASH_REPORTER_TESTS: true
ELECTRON_OUT_DIR: Default
ELECTRON_ENABLE_STACK_DUMPING: 1
build_script:
- ps: >-
if(($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME -split "/")[0] -eq ($env:APPVEYOR_REPO_NAME -split "/")[0]) {
@@ -38,7 +39,7 @@ build_script:
- echo "Building $env:GN_CONFIG build"
- git config --global core.longpaths true
- cd ..
- md src
- ps: if (Test-Path src\electron) { Remove-Item src\electron -Recurse }
- ps: Move-Item $env:APPVEYOR_BUILD_FOLDER -Destination src\electron
- ps: $env:CHROMIUM_BUILDTOOLS_PATH="$pwd\src\buildtools"
- ps: $env:SCCACHE_PATH="$pwd\src\electron\external_binaries\sccache.exe"
@@ -52,7 +53,7 @@ build_script:
--unmanaged
%GCLIENT_EXTRA_ARGS%
"https://github.com/electron/electron"
- gclient sync --with_branch_heads --with_tags
- gclient sync --with_branch_heads --with_tags --reset
- cd src
- ps: $env:BUILD_CONFIG_PATH="//electron/build/args/%GN_CONFIG%.gn"
- gn gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") %GN_EXTRA_ARGS%"

View File

@@ -18,7 +18,7 @@
#include "atom/common/node_includes.h"
#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/task/task_scheduler/task_scheduler.h"
#include "base/task/thread_pool/thread_pool.h"
#include "base/threading/thread_task_runner_handle.h"
#include "gin/array_buffer.h"
#include "gin/public/isolate_holder.h"
@@ -48,7 +48,7 @@ int NodeMain(int argc, char* argv[]) {
gin::V8Initializer::LoadV8Natives();
// V8 requires a task scheduler apparently
base::TaskScheduler::CreateAndStartWithDefaultParams("Electron");
base::ThreadPool::CreateAndStartWithDefaultParams("Electron");
// Initialize gin::IsolateHolder.
JavascriptEnvironment gin_env(loop);
@@ -112,10 +112,10 @@ int NodeMain(int argc, char* argv[]) {
// According to "src/gin/shell/gin_main.cc":
//
// gin::IsolateHolder waits for tasks running in TaskScheduler in its
// destructor and thus must be destroyed before TaskScheduler starts skipping
// gin::IsolateHolder waits for tasks running in ThreadPool in its
// destructor and thus must be destroyed before ThreadPool starts skipping
// CONTINUE_ON_SHUTDOWN tasks.
base::TaskScheduler::GetInstance()->Shutdown();
base::ThreadPool::GetInstance()->Shutdown();
v8::V8::Dispose();

View File

@@ -529,9 +529,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.");
}
@@ -672,7 +672,7 @@ void App::OnLogin(scoped_refptr<LoginHandler> login_handler,
if (web_contents) {
prevent_default = Emit(
"login", WebContents::FromOrCreate(isolate(), web_contents),
request_details, login_handler->auth_info(),
request_details, *login_handler->auth_info(),
base::Bind(&PassLoginInformation, base::RetainedRef(login_handler)));
}
@@ -1056,7 +1056,7 @@ Browser::LoginItemSettings App::GetLoginItemSettings(mate::Arguments* args) {
#if defined(USE_NSS_CERTS)
void App::ImportCertificate(const base::DictionaryValue& options,
const net::CompletionCallback& callback) {
net::CompletionRepeatingCallback callback) {
auto browser_context = AtomBrowserContext::From("", false);
if (!certificate_manager_model_) {
auto copy = base::DictionaryValue::From(
@@ -1069,17 +1069,17 @@ void App::ImportCertificate(const base::DictionaryValue& options,
}
int rv = ImportIntoCertStore(certificate_manager_model_.get(), options);
callback.Run(rv);
std::move(callback).Run(rv);
}
void App::OnCertificateManagerModelCreated(
std::unique_ptr<base::DictionaryValue> options,
const net::CompletionCallback& callback,
net::CompletionOnceCallback callback,
std::unique_ptr<CertificateManagerModel> model) {
certificate_manager_model_ = std::move(model);
int rv =
ImportIntoCertStore(certificate_manager_model_.get(), *(options.get()));
callback.Run(rv);
std::move(callback).Run(rv);
}
#endif

View File

@@ -27,7 +27,8 @@
#include "content/public/browser/render_process_host.h"
#include "native_mate/dictionary.h"
#include "native_mate/handle.h"
#include "net/base/completion_callback.h"
#include "net/base/completion_once_callback.h"
#include "net/base/completion_repeating_callback.h"
#include "net/ssl/client_cert_identity.h"
#if defined(USE_NSS_CERTS)
@@ -78,7 +79,7 @@ class App : public AtomBrowserClient::Delegate,
#if defined(USE_NSS_CERTS)
void OnCertificateManagerModelCreated(
std::unique_ptr<base::DictionaryValue> options,
const net::CompletionCallback& callback,
net::CompletionOnceCallback callback,
std::unique_ptr<CertificateManagerModel> model);
#endif
@@ -199,7 +200,7 @@ class App : public AtomBrowserClient::Delegate,
Browser::LoginItemSettings GetLoginItemSettings(mate::Arguments* args);
#if defined(USE_NSS_CERTS)
void ImportCertificate(const base::DictionaryValue& options,
const net::CompletionCallback& callback);
net::CompletionRepeatingCallback callback);
#endif
v8::Local<v8::Promise> GetFileIcon(const base::FilePath& path,
mate::Arguments* args);

View File

@@ -283,7 +283,7 @@ void SetCookieOnIO(scoped_refptr<net::URLRequestContextGetter> getter,
net::CanonicalCookie::CreateSanitizedCookie(
url, name, value, domain, path, creation_time, expiration_time,
last_access_time, secure, http_only,
net::CookieSameSite::DEFAULT_MODE, net::COOKIE_PRIORITY_DEFAULT));
net::CookieSameSite::NO_RESTRICTION, net::COOKIE_PRIORITY_DEFAULT));
auto completion_callback = base::BindOnce(OnSetCookie, std::move(promise));
if (!canonical_cookie || !canonical_cookie->IsCanonical()) {
std::move(completion_callback)

View File

@@ -165,8 +165,12 @@ void DesktopCapturer::UpdateSourcesList(DesktopMediaList* list) {
std::vector<std::string> device_names;
// Crucially, this list of device names will be in the same order as
// |media_list_sources|.
webrtc::DxgiDuplicatorController::Instance()->GetDeviceNames(
&device_names);
if (!webrtc::DxgiDuplicatorController::Instance()->GetDeviceNames(
&device_names)) {
Emit("error", "Failed to get sources.");
return;
}
int device_name_index = 0;
for (auto& source : screen_sources) {
const auto& device_name = device_names[device_name_index++];
@@ -176,13 +180,13 @@ void DesktopCapturer::UpdateSourcesList(DesktopMediaList* list) {
const int64_t device_id =
display::win::DisplayInfo::DeviceIdFromDeviceName(
wide_device_name.c_str());
source.display_id = base::Int64ToString(device_id);
source.display_id = base::NumberToString(device_id);
}
}
#elif defined(OS_MACOSX)
// On Mac, the IDs across the APIs match.
for (auto& source : screen_sources) {
source.display_id = base::Int64ToString(source.media_list_source.id.id);
source.display_id = base::NumberToString(source.media_list_source.id.id);
}
#endif // defined(OS_WIN)
// TODO(ajmacd): Add Linux support. The IDs across APIs differ but Chrome
@@ -222,7 +226,7 @@ void Initialize(v8::Local<v8::Object> exports,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("desktopCapturer", atom::api::DesktopCapturer::Create(isolate));
dict.SetMethod("createDesktopCapturer", &atom::api::DesktopCapturer::Create);
}
} // namespace

View File

@@ -52,7 +52,7 @@ void MenuViews::PopupAt(TopLevelWindow* window,
std::make_unique<MenuRunner>(model(), flags, close_callback);
menu_runners_[window_id]->RunMenuAt(
native_window->widget(), NULL, gfx::Rect(location, gfx::Size()),
views::MENU_ANCHOR_TOPLEFT, ui::MENU_SOURCE_MOUSE);
views::MenuAnchorPosition::kTopLeft, ui::MENU_SOURCE_MOUSE);
}
void MenuViews::ClosePopupAt(int32_t window_id) {

View File

@@ -48,6 +48,7 @@
#include "content/public/browser/storage_partition.h"
#include "native_mate/dictionary.h"
#include "native_mate/object_template_builder.h"
#include "net/base/completion_repeating_callback.h"
#include "net/base/load_flags.h"
#include "net/disk_cache/disk_cache.h"
#include "net/dns/host_cache.h" // nogncheck
@@ -268,7 +269,7 @@ void DoCacheActionInIO(
// Call GetBackend and make the backend's ptr accessable in OnGetBackend.
using BackendPtr = disk_cache::Backend*;
auto** backend_ptr = new BackendPtr(nullptr);
net::CompletionCallback on_get_backend =
net::CompletionRepeatingCallback on_get_backend =
base::Bind(&OnGetBackend, base::Owned(backend_ptr), action,
util::CopyablePromise(promise));
int rv = http_cache->GetBackend(backend_ptr, on_get_backend);
@@ -365,8 +366,9 @@ void DestroyGlobalHandle(v8::Isolate* isolate,
v8::HandleScope handle_scope(isolate);
if (!global_handle.IsEmpty()) {
v8::Local<v8::Value> local_handle = global_handle.Get(isolate);
if (local_handle->IsObject()) {
v8::Local<v8::Object> object = local_handle->ToObject(isolate);
v8::Local<v8::Object> object;
if (local_handle->IsObject() &&
local_handle->ToObject(isolate->GetCurrentContext()).ToLocal(&object)) {
void* ptr = object->GetAlignedPointerFromInternalField(0);
if (!ptr)
return;

View File

@@ -15,7 +15,6 @@
#include "base/values.h"
#include "content/public/browser/download_manager.h"
#include "native_mate/handle.h"
#include "net/base/completion_callback.h"
class GURL;

View File

@@ -648,10 +648,11 @@ void TopLevelWindow::SetFocusable(bool focusable) {
}
void TopLevelWindow::SetMenu(v8::Isolate* isolate, v8::Local<v8::Value> value) {
auto context = isolate->GetCurrentContext();
mate::Handle<Menu> menu;
if (value->IsObject() &&
gin::V8ToString(
isolate, value->ToObject(isolate)->GetConstructorName()) == "Menu" &&
v8::Local<v8::Object> object;
if (value->IsObject() && value->ToObject(context).ToLocal(&object) &&
gin::V8ToString(isolate, object->GetConstructorName()) == "Menu" &&
mate::ConvertFromV8(isolate, value, &menu) && !menu.IsEmpty()) {
menu_.Reset(isolate, menu.ToV8());
window_->SetMenu(menu->model());

View File

@@ -354,7 +354,7 @@ void URLRequest::OnReceivedRedirect(
}
void URLRequest::OnAuthenticationRequired(
scoped_refptr<const net::AuthChallengeInfo> auth_info) {
const net::AuthChallengeInfo& auth_info) {
if (request_state_.Canceled() || request_state_.Closed()) {
return;
}
@@ -364,7 +364,7 @@ void URLRequest::OnAuthenticationRequired(
return;
}
Emit("login", auth_info.get(),
Emit("login", auth_info,
base::Bind(&AtomURLRequest::PassLoginInformation, atom_request_));
}

View File

@@ -105,8 +105,7 @@ class URLRequest : public mate::EventEmitter<URLRequest> {
const std::string& method,
const GURL& url,
scoped_refptr<net::HttpResponseHeaders> response_headers);
void OnAuthenticationRequired(
scoped_refptr<const net::AuthChallengeInfo> auth_info);
void OnAuthenticationRequired(const net::AuthChallengeInfo& auth_info);
void OnResponseStarted(
scoped_refptr<net::HttpResponseHeaders> response_headers);
void OnResponseData(scoped_refptr<const net::IOBufferWithSize> data);

View File

@@ -86,6 +86,7 @@
#include "net/url_request/url_request_context.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
#include "third_party/blink/public/mojom/frame/find_in_page.mojom.h"
#include "third_party/blink/public/platform/web_cursor_info.h"
#include "third_party/blink/public/platform/web_input_event.h"
#include "ui/display/screen.h"
#include "ui/events/base_event_utils.h"
@@ -807,20 +808,20 @@ void WebContents::PluginCrashed(const base::FilePath& plugin_path,
}
void WebContents::MediaStartedPlaying(const MediaPlayerInfo& video_type,
const MediaPlayerId& id) {
const content::MediaPlayerId& id) {
Emit("media-started-playing");
}
void WebContents::MediaStoppedPlaying(
const MediaPlayerInfo& video_type,
const MediaPlayerId& id,
const content::MediaPlayerId& id,
content::WebContentsObserver::MediaStoppedReason reason) {
Emit("media-paused");
}
void WebContents::DidChangeThemeColor(SkColor theme_color) {
if (theme_color != SK_ColorTRANSPARENT) {
Emit("did-change-theme-color", atom::ToRGBHex(theme_color));
void WebContents::DidChangeThemeColor(base::Optional<SkColor> theme_color) {
if (theme_color) {
Emit("did-change-theme-color", atom::ToRGBHex(theme_color.value()));
} else {
Emit("did-change-theme-color", nullptr);
}
@@ -1192,7 +1193,7 @@ void WebContents::SetBackgroundThrottling(bool allowed) {
return;
}
const auto* render_view_host = contents->GetRenderViewHost();
auto* render_view_host = contents->GetRenderViewHost();
if (!render_view_host) {
return;
}
@@ -1915,10 +1916,9 @@ v8::Local<v8::Promise> WebContents::CapturePage(mate::Arguments* args) {
}
void WebContents::OnCursorChange(const content::WebCursor& cursor) {
content::CursorInfo info;
cursor.GetCursorInfo(&info);
const content::CursorInfo& info = cursor.info();
if (cursor.IsCustom()) {
if (info.type == blink::WebCursorInfo::kTypeCustom) {
Emit("cursor-changed", CursorTypeToString(info),
gfx::Image::CreateFrom1xBitmap(info.custom_image),
info.image_scale_factor,

View File

@@ -445,12 +445,12 @@ class WebContents : public mate::TrackableObject<WebContents>,
void PluginCrashed(const base::FilePath& plugin_path,
base::ProcessId plugin_pid) override;
void MediaStartedPlaying(const MediaPlayerInfo& video_type,
const MediaPlayerId& id) override;
const content::MediaPlayerId& id) override;
void MediaStoppedPlaying(
const MediaPlayerInfo& video_type,
const MediaPlayerId& id,
const content::MediaPlayerId& id,
content::WebContentsObserver::MediaStoppedReason reason) override;
void DidChangeThemeColor(SkColor theme_color) override;
void DidChangeThemeColor(base::Optional<SkColor> theme_color) override;
void OnInterfaceRequestFromFrame(
content::RenderFrameHost* render_frame_host,
const std::string& interface_name,

View File

@@ -534,7 +534,7 @@ std::string AtomBrowserClient::GetGeolocationApiKey() {
return api_key;
}
content::QuotaPermissionContext*
scoped_refptr<content::QuotaPermissionContext>
AtomBrowserClient::CreateQuotaPermissionContext() {
return new AtomQuotaPermissionContext;
}
@@ -867,7 +867,8 @@ NotificationPresenter* AtomBrowserClient::GetNotificationPresenter() {
}
content::PlatformNotificationService*
AtomBrowserClient::GetPlatformNotificationService() {
AtomBrowserClient::GetPlatformNotificationService(
content::BrowserContext* browser_context) {
if (!notification_service_) {
notification_service_.reset(new PlatformNotificationService(this));
}

View File

@@ -90,7 +90,8 @@ class AtomBrowserClient : public content::ContentBrowserClient,
base::CommandLine* command_line) override;
void DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) override;
std::string GetGeolocationApiKey() override;
content::QuotaPermissionContext* CreateQuotaPermissionContext() override;
scoped_refptr<content::QuotaPermissionContext> CreateQuotaPermissionContext()
override;
content::GeneratedCodeCacheSettings GetGeneratedCodeCacheSettings(
content::BrowserContext* context) override;
void AllowCertificateError(
@@ -144,8 +145,8 @@ class AtomBrowserClient : public content::ContentBrowserClient,
net::NetLog* GetNetLog() override;
content::MediaObserver* GetMediaObserver() override;
content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() override;
content::PlatformNotificationService* GetPlatformNotificationService()
override;
content::PlatformNotificationService* GetPlatformNotificationService(
content::BrowserContext* browser_context) override;
content::BrowserMainParts* CreateBrowserMainParts(
const content::MainFunctionParams&) override;
base::FilePath GetDefaultDownloadDirectory() override;

View File

@@ -76,7 +76,7 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/l10n_util_win.h"
#include "ui/display/win/dpi.h"
#include "ui/gfx/platform_font_win.h"
#include "ui/gfx/system_fonts_win.h"
#include "ui/strings/grit/app_locale_settings.h"
#endif
@@ -102,7 +102,7 @@ void Erase(T* container, typename T::iterator iter) {
#if defined(OS_WIN)
// gfx::Font callbacks
void AdjustUIFont(gfx::PlatformFontWin::FontAdjustment* font_adjustment) {
void AdjustUIFont(gfx::win::FontAdjustment* font_adjustment) {
l10n_util::NeedOverrideDefaultUIFont(&font_adjustment->font_family_override,
&font_adjustment->font_scale);
font_adjustment->font_scale *= display::win::GetAccessibilityFontScale();
@@ -380,8 +380,8 @@ void AtomBrowserMainParts::ToolkitInitialized() {
#endif
#if defined(OS_WIN)
gfx::PlatformFontWin::SetAdjustFontCallback(&AdjustUIFont);
gfx::PlatformFontWin::SetGetMinimumFontSizeCallback(&GetMinimumFontSize);
gfx::win::SetAdjustFontCallback(&AdjustUIFont);
gfx::win::SetGetMinimumFontSizeCallback(&GetMinimumFontSize);
wchar_t module_name[MAX_PATH] = {0};
if (GetModuleFileName(NULL, module_name, MAX_PATH))

View File

@@ -41,8 +41,26 @@ void AtomBrowserMainParts::InitializeMainNib() {
auto application = [principalClass sharedApplication];
NSString* mainNibName = [infoDictionary objectForKey:@"NSMainNibFile"];
auto mainNib = [[NSNib alloc] initWithNibNamed:mainNibName
bundle:base::mac::FrameworkBundle()];
NSNib* mainNib;
@try {
mainNib = [[NSNib alloc] initWithNibNamed:mainNibName
bundle:base::mac::FrameworkBundle()];
// Handle failure of initWithNibNamed on SMB shares
// TODO(codebytere): Remove when
// https://bugs.chromium.org/p/chromium/issues/detail?id=932935 is fixed
} @catch (NSException* exception) {
NSString* nibPath =
[NSString stringWithFormat:@"Resources/%@.nib", mainNibName];
nibPath = [base::mac::FrameworkBundle().bundlePath
stringByAppendingPathComponent:nibPath];
NSData* data = [NSData dataWithContentsOfFile:nibPath];
mainNib = [[NSNib alloc] initWithNibData:data
bundle:base::mac::FrameworkBundle()];
}
[mainNib instantiateWithOwner:application topLevelObjects:nil];
[mainNib release];
}

View File

@@ -131,7 +131,7 @@ bool Browser::IsDefaultProtocolClient(const std::string& protocol,
void Browser::SetAppUserModelID(const base::string16& name) {}
bool Browser::SetBadgeCount(int count) {
DockSetBadgeText(count != 0 ? base::IntToString(count) : "");
DockSetBadgeText(count != 0 ? base::NumberToString(count) : "");
badge_count_ = count;
return true;
}

View File

@@ -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() {

View File

@@ -352,9 +352,8 @@ blink::WebSecurityStyle CommonWebContentsDelegate::GetSecurityStyle(
SecurityStateTabHelper* helper =
SecurityStateTabHelper::FromWebContents(web_contents);
DCHECK(helper);
security_state::SecurityInfo security_info;
helper->GetSecurityInfo(&security_info);
return security_state::GetSecurityStyle(security_info,
return security_state::GetSecurityStyle(helper->GetSecurityLevel(),
*helper->GetVisibleSecurityState(),
security_style_explanations);
}

View File

@@ -70,5 +70,5 @@ void IOThread::CleanUp() {
system_request_context_->proxy_resolution_service()->OnShutdown();
if (net_log_)
net_log_->ShutDownBeforeTaskScheduler();
net_log_->ShutDownBeforeThreadPool();
}

View File

@@ -10,7 +10,7 @@
#include "atom/common/node_includes.h"
#include "base/command_line.h"
#include "base/message_loop/message_loop.h"
#include "base/task/task_scheduler/initialization_util.h"
#include "base/task/thread_pool/initialization_util.h"
#include "base/threading/thread_task_runner_handle.h"
#include "content/public/common/content_switches.h"
#include "gin/array_buffer.h"

View File

@@ -26,7 +26,7 @@ LoginHandler::LoginHandler(net::URLRequest* request,
net::AuthCredentials* credentials,
content::ResourceRequestInfo* resource_request_info)
: credentials_(credentials),
auth_info_(&auth_info),
auth_info_(std::make_unique<net::AuthChallengeInfo>(auth_info)),
auth_callback_(std::move(callback)),
weak_factory_(this) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);

View File

@@ -5,6 +5,8 @@
#ifndef ATOM_BROWSER_LOGIN_HANDLER_H_
#define ATOM_BROWSER_LOGIN_HANDLER_H_
#include <memory>
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
@@ -57,7 +59,7 @@ class LoginHandler : public base::RefCountedThreadSafe<LoginHandler> {
net::AuthCredentials* credentials_;
// Who/where/what asked for the authentication.
scoped_refptr<const net::AuthChallengeInfo> auth_info_;
std::unique_ptr<const net::AuthChallengeInfo> auth_info_;
// WebContents associated with the login request.
content::ResourceRequestInfo::WebContentsGetter web_contents_getter_;

View File

@@ -29,19 +29,19 @@ namespace atom {
const char* ResourceTypeToString(content::ResourceType type) {
switch (type) {
case content::RESOURCE_TYPE_MAIN_FRAME:
case content::ResourceType::kMainFrame:
return "mainFrame";
case content::RESOURCE_TYPE_SUB_FRAME:
case content::ResourceType::kSubFrame:
return "subFrame";
case content::RESOURCE_TYPE_STYLESHEET:
case content::ResourceType::kStylesheet:
return "stylesheet";
case content::RESOURCE_TYPE_SCRIPT:
case content::ResourceType::kScript:
return "script";
case content::RESOURCE_TYPE_IMAGE:
case content::ResourceType::kImage:
return "image";
case content::RESOURCE_TYPE_OBJECT:
case content::ResourceType::kObject:
return "object";
case content::RESOURCE_TYPE_XHR:
case content::ResourceType::kXhr:
return "xhr";
default:
return "other";

View File

@@ -347,13 +347,13 @@ void AtomURLRequest::OnReceivedRedirect(net::URLRequest* request,
}
void AtomURLRequest::OnAuthRequired(net::URLRequest* request,
net::AuthChallengeInfo* auth_info) {
const net::AuthChallengeInfo& auth_info) {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
base::PostTaskWithTraits(
FROM_HERE, {content::BrowserThread::UI},
base::BindOnce(&AtomURLRequest::InformDelegateAuthenticationRequired,
this, scoped_refptr<net::AuthChallengeInfo>(auth_info)));
this, auth_info));
}
void AtomURLRequest::OnResponseStarted(net::URLRequest* request,
@@ -468,7 +468,7 @@ void AtomURLRequest::InformDelegateReceivedRedirect(
}
void AtomURLRequest::InformDelegateAuthenticationRequired(
scoped_refptr<net::AuthChallengeInfo> auth_info) const {
const net::AuthChallengeInfo& auth_info) const {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (delegate_)
delegate_->OnAuthenticationRequired(auth_info);

View File

@@ -53,7 +53,7 @@ class AtomURLRequest : public base::RefCountedThreadSafe<AtomURLRequest>,
const net::RedirectInfo& info,
bool* defer_redirect) override;
void OnAuthRequired(net::URLRequest* request,
net::AuthChallengeInfo* auth_info) override;
const net::AuthChallengeInfo& auth_info) override;
void OnResponseStarted(net::URLRequest* request, int net_error) override;
void OnReadCompleted(net::URLRequest* request, int bytes_read) override;
@@ -93,7 +93,7 @@ class AtomURLRequest : public base::RefCountedThreadSafe<AtomURLRequest>,
const GURL& url,
scoped_refptr<net::HttpResponseHeaders> response_headers) const;
void InformDelegateAuthenticationRequired(
scoped_refptr<net::AuthChallengeInfo> auth_info) const;
const net::AuthChallengeInfo& auth_info) const;
void InformDelegateResponseStarted(
scoped_refptr<net::HttpResponseHeaders>) const;
void InformDelegateResponseData(

View File

@@ -122,7 +122,7 @@ void URLRequestBufferJob::Kill() {
void URLRequestBufferJob::GetResponseInfo(net::HttpResponseInfo* info) {
std::string status("HTTP/1.1 ");
status.append(base::IntToString(status_code_));
status.append(base::NumberToString(status_code_));
status.append(" ");
status.append(net::GetHttpReasonPhrase(status_code_));
status.append("\0\0", 2);

View File

@@ -296,7 +296,7 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
const auto& custom_standard_schemes = atom::api::GetStandardSchemes();
cookie_schemes.insert(cookie_schemes.end(), custom_standard_schemes.begin(),
custom_standard_schemes.end());
cookie_monster->SetCookieableSchemes(cookie_schemes);
cookie_monster->SetCookieableSchemes(cookie_schemes, base::NullCallback());
// Setup handlers for custom job factory.
top_job_factory_.reset(new AtomURLRequestJobFactory);

View File

@@ -48,7 +48,7 @@ void BeforeStartInUI(base::WeakPtr<URLRequestStreamJob> job,
status_code = 200;
}
std::string status("HTTP/1.1 ");
status.append(base::IntToString(status_code));
status.append(base::NumberToString(status_code));
status.append(" ");
status.append(
net::GetHttpReasonPhrase(static_cast<net::HttpStatusCode>(status_code)));

View File

@@ -37,13 +37,13 @@ void NodeDebugger::Start() {
}
node::DebugOptions options;
node::options_parser::DebugOptionsParser options_parser;
std::vector<std::string> exec_args;
std::vector<std::string> v8_args;
std::vector<std::string> errors;
node::options_parser::DebugOptionsParser::instance.Parse(
&args, &exec_args, &v8_args, &options,
node::options_parser::kDisallowedInEnvironment, &errors);
options_parser.Parse(&args, &exec_args, &v8_args, &options,
node::options_parser::kDisallowedInEnvironment, &errors);
if (!errors.empty()) {
// TODO(jeremy): what's the appropriate behaviour here?
@@ -51,13 +51,6 @@ void NodeDebugger::Start() {
<< base::JoinString(errors, " ");
}
// Set process._debugWaitConnect if --inspect-brk was specified to stop
// the debugger on the first line
if (options.wait_for_connect()) {
mate::Dictionary process(env_->isolate(), env_->process_object());
process.Set("_breakFirstLine", true);
}
const char* path = "";
if (inspector->Start(path, options,
std::make_shared<node::HostPort>(options.host_port),

View File

@@ -79,7 +79,6 @@ PlatformNotificationService::~PlatformNotificationService() {}
void PlatformNotificationService::DisplayNotification(
content::RenderProcessHost* render_process_host,
content::BrowserContext* browser_context,
const std::string& notification_id,
const GURL& origin,
const blink::PlatformNotificationData& notification_data,
@@ -100,7 +99,6 @@ void PlatformNotificationService::DisplayNotification(
}
void PlatformNotificationService::DisplayPersistentNotification(
content::BrowserContext* browser_context,
const std::string& notification_id,
const GURL& service_worker_scope,
const GURL& origin,
@@ -108,11 +106,9 @@ void PlatformNotificationService::DisplayPersistentNotification(
const blink::NotificationResources& notification_resources) {}
void PlatformNotificationService::ClosePersistentNotification(
content::BrowserContext* browser_context,
const std::string& notification_id) {}
void PlatformNotificationService::CloseNotification(
content::BrowserContext* browser_context,
const std::string& notification_id) {
auto* presenter = browser_client_->GetNotificationPresenter();
if (!presenter)
@@ -121,25 +117,19 @@ void PlatformNotificationService::CloseNotification(
}
void PlatformNotificationService::GetDisplayedNotifications(
content::BrowserContext* browser_context,
DisplayedNotificationsCallback callback) {}
int64_t PlatformNotificationService::ReadNextPersistentNotificationId(
content::BrowserContext* browser_context) {
int64_t PlatformNotificationService::ReadNextPersistentNotificationId() {
// Electron doesn't support persistent notifications.
return 0;
}
void PlatformNotificationService::RecordNotificationUkmEvent(
content::BrowserContext* browser_context,
const content::NotificationDatabaseData& data) {}
void PlatformNotificationService::ScheduleTrigger(
content::BrowserContext* browser_context,
base::Time timestamp) {}
void PlatformNotificationService::ScheduleTrigger(base::Time timestamp) {}
base::Time PlatformNotificationService::ReadNextTriggerTimestamp(
content::BrowserContext* browser_context) {
base::Time PlatformNotificationService::ReadNextTriggerTimestamp() {
return base::Time::Max();
}

View File

@@ -8,7 +8,6 @@
#include <set>
#include <string>
#include "content/public/browser/browser_context.h"
#include "content/public/browser/platform_notification_service.h"
namespace atom {
@@ -25,34 +24,25 @@ class PlatformNotificationService
// content::PlatformNotificationService:
void DisplayNotification(
content::RenderProcessHost* render_process_host,
content::BrowserContext* browser_context,
const std::string& notification_id,
const GURL& origin,
const blink::PlatformNotificationData& notification_data,
const blink::NotificationResources& notification_resources) override;
void DisplayPersistentNotification(
content::BrowserContext* browser_context,
const std::string& notification_id,
const GURL& service_worker_scope,
const GURL& origin,
const blink::PlatformNotificationData& notification_data,
const blink::NotificationResources& notification_resources) override;
void ClosePersistentNotification(content::BrowserContext* browser_context,
const std::string& notification_id) override;
void CloseNotification(content::BrowserContext* browser_context,
const std::string& notification_id) override;
void ClosePersistentNotification(const std::string& notification_id) override;
void CloseNotification(const std::string& notification_id) override;
void GetDisplayedNotifications(
content::BrowserContext* browser_context,
DisplayedNotificationsCallback callback) override;
int64_t ReadNextPersistentNotificationId(
content::BrowserContext* browser_context) override;
int64_t ReadNextPersistentNotificationId() override;
void RecordNotificationUkmEvent(
content::BrowserContext* browser_context,
const content::NotificationDatabaseData& data) override;
void ScheduleTrigger(content::BrowserContext* browser_context,
base::Time timestamp) override;
base::Time ReadNextTriggerTimestamp(
content::BrowserContext* browser_context) override;
void ScheduleTrigger(base::Time timestamp) override;
base::Time ReadNextTriggerTimestamp() override;
private:
AtomBrowserClient* browser_client_;

View File

@@ -14,7 +14,7 @@
#include "atom/browser/notifications/win/windows_toast_notification.h"
#include "base/environment.h"
#include "base/files/file_util.h"
#include "base/md5.h"
#include "base/hash/md5.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_restrictions.h"
#include "base/time/time.h"
@@ -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;

View File

@@ -351,7 +351,7 @@ void OffScreenRenderWidgetHostView::SetBounds(const gfx::Rect& new_bounds) {
SetSize(new_bounds.size());
}
gfx::NativeView OffScreenRenderWidgetHostView::GetNativeView() const {
gfx::NativeView OffScreenRenderWidgetHostView::GetNativeView() {
return gfx::NativeView();
}
@@ -366,11 +366,11 @@ ui::TextInputClient* OffScreenRenderWidgetHostView::GetTextInputClient() {
void OffScreenRenderWidgetHostView::Focus() {}
bool OffScreenRenderWidgetHostView::HasFocus() const {
bool OffScreenRenderWidgetHostView::HasFocus() {
return false;
}
bool OffScreenRenderWidgetHostView::IsSurfaceAvailableForCopy() const {
bool OffScreenRenderWidgetHostView::IsSurfaceAvailableForCopy() {
return GetDelegatedFrameHost()->CanCopyFromCompositingSurface();
}
@@ -411,7 +411,7 @@ void OffScreenRenderWidgetHostView::EnsureSurfaceSynchronizedForWebTest() {
SynchronizeVisualProperties();
}
gfx::Rect OffScreenRenderWidgetHostView::GetViewBounds() const {
gfx::Rect OffScreenRenderWidgetHostView::GetViewBounds() {
if (IsPopupWidget())
return popup_position_;
@@ -429,8 +429,7 @@ void OffScreenRenderWidgetHostView::SetBackgroundColor(SkColor color) {
}
}
base::Optional<SkColor> OffScreenRenderWidgetHostView::GetBackgroundColor()
const {
base::Optional<SkColor> OffScreenRenderWidgetHostView::GetBackgroundColor() {
return background_color_;
}
@@ -438,7 +437,7 @@ void OffScreenRenderWidgetHostView::UpdateBackgroundColor() {
NOTREACHED();
}
gfx::Size OffScreenRenderWidgetHostView::GetVisibleViewportSize() const {
gfx::Size OffScreenRenderWidgetHostView::GetVisibleViewportSize() {
return size_;
}
@@ -580,7 +579,7 @@ void OffScreenRenderWidgetHostView::CopyFromSurface(
}
void OffScreenRenderWidgetHostView::GetScreenInfo(
content::ScreenInfo* screen_info) const {
content::ScreenInfo* screen_info) {
screen_info->depth = 24;
screen_info->depth_per_component = 8;
screen_info->orientation_angle = 0;
@@ -621,8 +620,7 @@ void OffScreenRenderWidgetHostView::ImeCompositionRangeChanged(
const gfx::Range&,
const std::vector<gfx::Rect>&) {}
gfx::Size OffScreenRenderWidgetHostView::GetCompositorViewportPixelSize()
const {
gfx::Size OffScreenRenderWidgetHostView::GetCompositorViewportPixelSize() {
return gfx::ScaleToCeiledSize(GetRequestedRendererSize(),
current_device_scale_factor_);
}

View File

@@ -84,22 +84,22 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
void InitAsChild(gfx::NativeView) override;
void SetSize(const gfx::Size&) override;
void SetBounds(const gfx::Rect&) override;
gfx::NativeView GetNativeView(void) const override;
gfx::NativeView GetNativeView(void) override;
gfx::NativeViewAccessible GetNativeViewAccessible(void) override;
ui::TextInputClient* GetTextInputClient() override;
void Focus(void) override;
bool HasFocus(void) const override;
bool HasFocus(void) override;
uint32_t GetCaptureSequenceNumber() const override;
bool IsSurfaceAvailableForCopy(void) const override;
bool IsSurfaceAvailableForCopy(void) override;
void Show(void) override;
void Hide(void) override;
bool IsShowing(void) override;
void EnsureSurfaceSynchronizedForWebTest() override;
gfx::Rect GetViewBounds(void) const override;
gfx::Size GetVisibleViewportSize() const override;
gfx::Rect GetViewBounds(void) override;
gfx::Size GetVisibleViewportSize() override;
void SetInsets(const gfx::Insets&) override;
void SetBackgroundColor(SkColor color) override;
base::Optional<SkColor> GetBackgroundColor() const override;
base::Optional<SkColor> GetBackgroundColor() override;
void UpdateBackgroundColor() override;
bool LockMouse(void) override;
void UnlockMouse(void) override;
@@ -139,7 +139,7 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
const gfx::Rect& src_rect,
const gfx::Size& output_size,
base::OnceCallback<void(const SkBitmap&)> callback) override;
void GetScreenInfo(content::ScreenInfo* results) const override;
void GetScreenInfo(content::ScreenInfo* results) override;
void InitAsGuest(content::RenderWidgetHostView*,
content::RenderWidgetHostViewGuest*) override;
void TransformPointToRootSurface(gfx::PointF* point) override;
@@ -149,7 +149,7 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
CreateSyntheticGestureTarget() override;
void ImeCompositionRangeChanged(const gfx::Range&,
const std::vector<gfx::Rect>&) override;
gfx::Size GetCompositorViewportPixelSize() const override;
gfx::Size GetCompositorViewportPixelSize() override;
content::RenderWidgetHostViewBase* CreateViewForWidget(
content::RenderWidgetHost*,

View File

@@ -17,9 +17,9 @@
<key>CFBundleIconFile</key>
<string>electron.icns</string>
<key>CFBundleVersion</key>
<string>6.0.0-nightly.20190404</string>
<string>6.0.0-beta.1</string>
<key>CFBundleShortVersionString</key>
<string>6.0.0-nightly.20190404</string>
<string>6.0.0-beta.1</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.developer-tools</string>
<key>LSMinimumSystemVersion</key>

View File

@@ -50,8 +50,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 6,0,0,20190404
PRODUCTVERSION 6,0,0,20190404
FILEVERSION 6,0,0,1
PRODUCTVERSION 6,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L

View File

@@ -143,6 +143,8 @@ class InspectableWebContentsImpl
int boundary_value) override {}
void ReadyForTest() override {}
void SetOpenNewWindowForPopups(bool value) override {}
void RecordPerformanceHistogram(const std::string& name,
double duration) override {}
// content::DevToolsFrontendHostDelegate:
void HandleMessageFromDevToolsFrontend(const std::string& message);

View File

@@ -150,7 +150,7 @@ 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);
@@ -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;

View File

@@ -255,7 +255,7 @@ const char* MenuBar::GetClassName() const {
return kViewClassName;
}
void MenuBar::OnMenuButtonClicked(views::MenuButton* source,
void MenuBar::OnMenuButtonClicked(views::Button* source,
const gfx::Point& point,
const ui::Event* event) {
// Hide the accelerator when a submenu is activated.

View File

@@ -16,8 +16,9 @@
#include "ui/views/view.h"
namespace views {
class Button;
class MenuButton;
}
} // namespace views
namespace atom {
@@ -78,7 +79,7 @@ class MenuBar : public views::AccessiblePaneView,
const char* GetClassName() const override;
// views::MenuButtonListener:
void OnMenuButtonClicked(views::MenuButton* source,
void OnMenuButtonClicked(views::Button* source,
const gfx::Point& point,
const ui::Event* event) override;
void OnNativeThemeChanged(const ui::NativeTheme* theme) override;

View File

@@ -22,7 +22,7 @@ MenuDelegate::MenuDelegate(MenuBar* menu_bar)
MenuDelegate::~MenuDelegate() {}
void MenuDelegate::RunMenu(AtomMenuModel* model,
views::MenuButton* button,
views::Button* button,
ui::MenuSourceType source_type) {
gfx::Point screen_loc;
views::View::ConvertPointToScreen(button, &screen_loc);
@@ -43,8 +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(), button,
bounds, views::MENU_ANCHOR_TOPRIGHT, 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) {

View File

@@ -13,7 +13,8 @@
namespace views {
class MenuRunner;
}
class Button;
} // namespace views
namespace atom {
@@ -25,7 +26,7 @@ class MenuDelegate : public views::MenuDelegate {
~MenuDelegate() override;
void RunMenu(AtomMenuModel* model,
views::MenuButton* button,
views::Button* button,
ui::MenuSourceType source_type);
class Observer {

View File

@@ -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());
}

View File

@@ -169,7 +169,8 @@ void NotifyIcon::PopUpContextMenu(const gfx::Point& pos,
views::MenuRunner::CONTEXT_MENU | views::MenuRunner::HAS_MNEMONICS,
base::Bind(&NotifyIcon::OnContextMenuClosed,
weak_factory_.GetWeakPtr())));
menu_runner_->RunMenuAt(widget_.get(), NULL, rect, views::MENU_ANCHOR_TOPLEFT,
menu_runner_->RunMenuAt(widget_.get(), NULL, rect,
views::MenuAnchorPosition::kTopLeft,
ui::MENU_SOURCE_MOUSE);
}

View File

@@ -128,10 +128,10 @@ WebContentsPreferences::WebContentsPreferences(
SetDefaultBoolIfUndefined(options::kNativeWindowOpen, false);
SetDefaultBoolIfUndefined(options::kEnableRemoteModule, true);
SetDefaultBoolIfUndefined(options::kContextIsolation, false);
SetDefaultBoolIfUndefined("javascript", true);
SetDefaultBoolIfUndefined("images", true);
SetDefaultBoolIfUndefined("textAreasAreResizable", true);
SetDefaultBoolIfUndefined("webgl", true);
SetDefaultBoolIfUndefined(options::kJavaScript, true);
SetDefaultBoolIfUndefined(options::kImages, true);
SetDefaultBoolIfUndefined(options::kTextAreasAreResizable, true);
SetDefaultBoolIfUndefined(options::kWebGL, true);
bool webSecurity = true;
SetDefaultBoolIfUndefined(options::kWebSecurity, webSecurity);
// If webSecurity was explicity set to false, let's inherit that into
@@ -335,13 +335,13 @@ void WebContentsPreferences::AppendCommandLineSwitches(
int guest_instance_id = 0;
if (GetAsInteger(&preference_, options::kGuestInstanceID, &guest_instance_id))
command_line->AppendSwitchASCII(switches::kGuestInstanceID,
base::IntToString(guest_instance_id));
base::NumberToString(guest_instance_id));
// Pass the opener's window id.
int opener_id;
if (GetAsInteger(&preference_, options::kOpenerID, &opener_id))
command_line->AppendSwitchASCII(switches::kOpenerID,
base::IntToString(opener_id));
base::NumberToString(opener_id));
#if defined(OS_MACOSX)
// Enable scroll bounce.
@@ -405,19 +405,20 @@ void WebContentsPreferences::AppendCommandLineSwitches(
void WebContentsPreferences::OverrideWebkitPrefs(
content::WebPreferences* prefs) {
prefs->javascript_enabled = IsEnabled("javascript", true /* default_value */);
prefs->images_enabled = IsEnabled("images", true /* default_value */);
prefs->javascript_enabled =
IsEnabled(options::kJavaScript, true /* default_value */);
prefs->images_enabled = IsEnabled(options::kImages, true /* default_value */);
prefs->text_areas_are_resizable =
IsEnabled("textAreasAreResizable", true /* default_value */);
IsEnabled(options::kTextAreasAreResizable, true /* default_value */);
prefs->navigate_on_drag_drop =
IsEnabled("navigateOnDragDrop", false /* default_value */);
IsEnabled(options::kNavigateOnDragDrop, false /* default_value */);
if (!GetAsAutoplayPolicy(&preference_, "autoplayPolicy",
&prefs->autoplay_policy)) {
prefs->autoplay_policy = content::AutoplayPolicy::kNoUserGestureRequired;
}
// Check if webgl should be enabled.
bool is_webgl_enabled = IsEnabled("webgl", true /* default_value */);
bool is_webgl_enabled = IsEnabled(options::kWebGL, true /* default_value */);
prefs->webgl1_enabled = is_webgl_enabled;
prefs->webgl2_enabled = is_webgl_enabled;

View File

@@ -18,7 +18,7 @@
// The message starter should be declared in ipc/ipc_message_start.h. Since
// we don't want to patch Chromium, we just pretend to be Content Shell.
#define IPC_MESSAGE_START ShellMsgStart
#define IPC_MESSAGE_START ElectronMsgStart
IPC_STRUCT_TRAITS_BEGIN(atom::DraggableRegion)
IPC_STRUCT_TRAITS_MEMBER(draggable)

View File

@@ -117,16 +117,11 @@ class Archive : public mate::Wrappable<Archive> {
DISALLOW_COPY_AND_ASSIGN(Archive);
};
void InitAsarSupport(v8::Isolate* isolate,
v8::Local<v8::Value> source,
v8::Local<v8::Value> require) {
void InitAsarSupport(v8::Isolate* isolate, v8::Local<v8::Value> require) {
// Evaluate asar_init.js.
std::vector<v8::Local<v8::String>> asar_init_params = {
node::FIXED_ONE_BYTE_STRING(isolate, "source"),
node::FIXED_ONE_BYTE_STRING(isolate, "require")};
std::vector<v8::Local<v8::Value>> asar_init_args = {source, require};
std::vector<v8::Local<v8::Value>> asar_init_args = {require};
node::per_process::native_module_loader.CompileAndCall(
isolate->GetCurrentContext(), "electron/js2c/asar_init",
&asar_init_params, &asar_init_args, nullptr);

View File

@@ -11,7 +11,7 @@
#include "atom/common/native_mate_converters/content_converter.h"
#include "atom/common/native_mate_converters/gurl_converter.h"
#include "atom/common/node_includes.h"
#include "base/hash.h"
#include "base/hash/hash.h"
#include "native_mate/dictionary.h"
#include "url/origin.h"
#include "v8/include/v8-profiler.h"

View File

@@ -9,7 +9,7 @@
#define ATOM_MINOR_VERSION 0
#define ATOM_PATCH_VERSION 0
// clang-format off
#define ATOM_PRE_RELEASE_VERSION -nightly.20190404
#define ATOM_PRE_RELEASE_VERSION -beta.1
// clang-format on
#ifndef ATOM_STRINGIFY

View File

@@ -133,12 +133,14 @@ bool RegisterNonABICompliantCodeRange(void* start, size_t size_in_bytes) {
reinterpret_cast<DWORD64>(start));
}
/*
void UnregisterNonABICompliantCodeRange(void* start) {
ExceptionHandlerRecord* record =
reinterpret_cast<ExceptionHandlerRecord*>(start);
RtlDeleteFunctionTable(&record->runtime_function);
}
*/
#endif // _WIN64
} // namespace
@@ -193,8 +195,9 @@ void CrashReporterWin::InitBreakpad(const std::string& product_name,
v8::Isolate::GetCurrent()->GetCodeRange(&code_range, &size);
if (code_range && size &&
RegisterNonABICompliantCodeRange(code_range, size)) {
gin::Debug::SetCodeRangeDeletedCallback(
UnregisterNonABICompliantCodeRange);
// FIXME(nornagon): This broke with https://crrev.com/c/1474703
// gin::Debug::SetCodeRangeDeletedCallback(
// UnregisterNonABICompliantCodeRange);
}
}
#endif

View File

@@ -92,7 +92,7 @@ bool WriteReportIDToFile(const std::wstring& dump_path,
int64_t seconds_since_epoch =
(base::Time::Now() - base::Time::UnixEpoch()).InSeconds();
std::wstring line = base::Int64ToString16(seconds_since_epoch);
std::wstring line = base::NumberToString16(seconds_since_epoch);
line += L',';
line += report_id;
line += L'\n';

View File

@@ -50,15 +50,15 @@ bool CertFromData(const std::string& data,
} // namespace
// static
v8::Local<v8::Value> Converter<const net::AuthChallengeInfo*>::ToV8(
v8::Local<v8::Value> Converter<net::AuthChallengeInfo>::ToV8(
v8::Isolate* isolate,
const net::AuthChallengeInfo* val) {
const net::AuthChallengeInfo& val) {
mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate);
dict.Set("isProxy", val->is_proxy);
dict.Set("scheme", val->scheme);
dict.Set("host", val->challenger.host());
dict.Set("port", static_cast<uint32_t>(val->challenger.port()));
dict.Set("realm", val->realm);
dict.Set("isProxy", val.is_proxy);
dict.Set("scheme", val.scheme);
dict.Set("host", val.challenger.host());
dict.Set("port", static_cast<uint32_t>(val.challenger.port()));
dict.Set("realm", val.realm);
return mate::ConvertToV8(isolate, dict);
}

View File

@@ -24,9 +24,9 @@ struct CertPrincipal;
namespace mate {
template <>
struct Converter<const net::AuthChallengeInfo*> {
struct Converter<net::AuthChallengeInfo> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const net::AuthChallengeInfo* val);
const net::AuthChallengeInfo& val);
};
template <>

View File

@@ -15,8 +15,9 @@ struct Converter<base::string16> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const base::string16& val) {
return v8::String::NewFromTwoByte(
isolate, reinterpret_cast<const uint16_t*>(val.data()),
v8::String::kNormalString, val.size());
isolate, reinterpret_cast<const uint16_t*>(val.data()),
v8::NewStringType::kNormal, val.size())
.ToLocalChecked();
}
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,

View File

@@ -25,6 +25,13 @@
#pragma push_macro("CHECK_LE")
#pragma push_macro("CHECK_LT")
#pragma push_macro("CHECK_NE")
#pragma push_macro("DCHECK")
#pragma push_macro("DCHECK_EQ")
#pragma push_macro("DCHECK_GE")
#pragma push_macro("DCHECK_GT")
#pragma push_macro("DCHECK_LE")
#pragma push_macro("DCHECK_LT")
#pragma push_macro("DCHECK_NE")
#pragma push_macro("DISALLOW_COPY_AND_ASSIGN")
#pragma push_macro("LIKELY")
#pragma push_macro("NO_RETURN")
@@ -38,6 +45,13 @@
#undef CHECK_LE
#undef CHECK_LT
#undef CHECK_NE
#undef DCHECK
#undef DCHECK_EQ
#undef DCHECK_GE
#undef DCHECK_GT
#undef DCHECK_LE
#undef DCHECK_LT
#undef DCHECK_NE
#undef DISALLOW_COPY_AND_ASSIGN
#undef LIKELY
#undef NO_RETURN
@@ -67,6 +81,13 @@
#pragma pop_macro("CHECK_LE")
#pragma pop_macro("CHECK_LT")
#pragma pop_macro("CHECK_NE")
#pragma pop_macro("DCHECK")
#pragma pop_macro("DCHECK_EQ")
#pragma pop_macro("DCHECK_GE")
#pragma pop_macro("DCHECK_GT")
#pragma pop_macro("DCHECK_LE")
#pragma pop_macro("DCHECK_LT")
#pragma pop_macro("DCHECK_NE")
#pragma pop_macro("DISALLOW_COPY_AND_ASSIGN")
#pragma pop_macro("LIKELY")
#pragma pop_macro("NO_RETURN")

View File

@@ -160,6 +160,22 @@ const char kNodeIntegrationInSubFrames[] = "nodeIntegrationInSubFrames";
const char kDisableHtmlFullscreenWindowResize[] =
"disableHtmlFullscreenWindowResize";
// Enables JavaScript support.
const char kJavaScript[] = "javascript";
// Enables image support.
const char kImages[] = "images";
// Make TextArea elements resizable.
const char kTextAreasAreResizable[] = "textAreasAreResizable";
// Enables WebGL support.
const char kWebGL[] = "webgl";
// Whether dragging and dropping a file or link onto the page causes a
// navigation.
const char kNavigateOnDragDrop[] = "navigateOnDragDrop";
} // namespace options
namespace switches {

View File

@@ -77,6 +77,11 @@ extern const char kAllowRunningInsecureContent[];
extern const char kOffscreen[];
extern const char kNodeIntegrationInSubFrames[];
extern const char kDisableHtmlFullscreenWindowResize[];
extern const char kJavaScript[];
extern const char kImages[];
extern const char kTextAreasAreResizable[];
extern const char kWebGL[];
extern const char kNavigateOnDragDrop[];
} // namespace options

View File

@@ -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(

View File

@@ -372,6 +372,9 @@ v8::Local<v8::Promise> ExecuteJavaScriptInIsolatedWorld(
blink::WebLocalFrame::kSynchronous;
args->GetNext(&scriptExecutionType);
// Debugging tip: if you see a crash stack trace beginning from this call,
// then it is very likely that some exception happened when executing the
// "content_script/init.js" script.
GetRenderFrame(window)->GetWebFrame()->RequestExecuteScriptInIsolatedWorld(
world_id, &sources.front(), sources.size(), has_user_gesture,
scriptExecutionType, new ScriptExecutionCallback(std::move(promise)));

View File

@@ -44,7 +44,8 @@ bool IsDevToolsExtension(content::RenderFrame* render_frame) {
}
v8::Local<v8::Object> GetModuleCache(v8::Isolate* isolate) {
mate::Dictionary global(isolate, isolate->GetCurrentContext()->Global());
auto context = isolate->GetCurrentContext();
mate::Dictionary global(isolate, context->Global());
v8::Local<v8::Value> cache;
if (!global.GetHidden(kModuleCacheKey, &cache)) {
@@ -52,7 +53,7 @@ v8::Local<v8::Object> GetModuleCache(v8::Isolate* isolate) {
global.SetHidden(kModuleCacheKey, cache);
}
return cache->ToObject(isolate);
return cache->ToObject(context).ToLocalChecked();
}
// adapted from node.cc
@@ -95,7 +96,9 @@ void InvokeHiddenCallback(v8::Handle<v8::Context> context,
const std::string& hidden_key,
const std::string& callback_name) {
auto* isolate = context->GetIsolate();
auto binding_key = mate::ConvertToV8(isolate, hidden_key)->ToString(isolate);
auto binding_key = mate::ConvertToV8(isolate, hidden_key)
->ToString(context)
.ToLocalChecked();
auto private_binding_key = v8::Private::ForApi(isolate, binding_key);
auto global_object = context->Global();
v8::Local<v8::Value> value;
@@ -103,9 +106,10 @@ void InvokeHiddenCallback(v8::Handle<v8::Context> context,
return;
if (value.IsEmpty() || !value->IsObject())
return;
auto binding = value->ToObject(isolate);
auto callback_key =
mate::ConvertToV8(isolate, callback_name)->ToString(isolate);
auto binding = value->ToObject(context).ToLocalChecked();
auto callback_key = mate::ConvertToV8(isolate, callback_name)
->ToString(context)
.ToLocalChecked();
auto callback_value = binding->Get(callback_key);
DCHECK(callback_value->IsFunction()); // set by sandboxed_renderer/init.js
auto callback = v8::Handle<v8::Function>::Cast(callback_value);
@@ -241,7 +245,7 @@ void AtomSandboxedRendererClient::SetupMainWorldOverrides(
auto* isolate = context->GetIsolate();
mate::Dictionary process = mate::Dictionary::CreateEmpty(isolate);
process.SetMethod("binding", GetBinding);
process.SetMethod("_linkedBinding", GetBinding);
std::vector<v8::Local<v8::String>> isolated_bundle_params = {
node::FIXED_ONE_BYTE_STRING(isolate, "nodeProcess"),
@@ -263,7 +267,7 @@ void AtomSandboxedRendererClient::SetupExtensionWorldOverrides(
auto* isolate = context->GetIsolate();
mate::Dictionary process = mate::Dictionary::CreateEmpty(isolate);
process.SetMethod("binding", GetBinding);
process.SetMethod("_linkedBinding", GetBinding);
std::vector<v8::Local<v8::String>> isolated_bundle_params = {
node::FIXED_ONE_BYTE_STRING(isolate, "nodeProcess"),

View File

@@ -31,13 +31,14 @@ const char kIpcKey[] = "ipcNative";
// Gets the private object under kIpcKey
v8::Local<v8::Object> GetIpcObject(v8::Local<v8::Context> context) {
auto* isolate = context->GetIsolate();
auto binding_key = mate::ConvertToV8(isolate, kIpcKey)->ToString(isolate);
auto binding_key =
mate::ConvertToV8(isolate, kIpcKey)->ToString(context).ToLocalChecked();
auto private_binding_key = v8::Private::ForApi(isolate, binding_key);
auto global_object = context->Global();
auto value =
global_object->GetPrivate(context, private_binding_key).ToLocalChecked();
DCHECK(!value.IsEmpty() && value->IsObject());
return value->ToObject(isolate);
return value->ToObject(context).ToLocalChecked();
}
void InvokeIpcCallback(v8::Local<v8::Context> context,
@@ -56,8 +57,9 @@ void InvokeIpcCallback(v8::Local<v8::Context> context,
callback_scope.reset(new node::CallbackScope(isolate, ipcNative, {0, 0}));
}
auto callback_key =
mate::ConvertToV8(isolate, callback_name)->ToString(isolate);
auto callback_key = mate::ConvertToV8(isolate, callback_name)
->ToString(context)
.ToLocalChecked();
auto callback_value = ipcNative->Get(callback_key);
DCHECK(callback_value->IsFunction()); // set by init.ts
auto callback = v8::Local<v8::Function>::Cast(callback_value);

View File

@@ -2,14 +2,21 @@ is_electron_build = true
use_jumbo_build = true
root_extra_deps = [ "//electron" ]
# Registry of NMVs --> https://github.com/nodejs/node/blob/master/doc/abi_version_registry.json
node_module_version = 73
v8_promise_internal_field_count = 1
v8_typed_array_max_size_in_heap = 0
v8_embedder_string = "-electron.0"
# TODO: this breaks mksnapshot
v8_enable_snapshot_native_code_counters = false
enable_cdm_host_verification = false
proprietary_codecs = true
ffmpeg_branding = "Chrome"
enable_basic_printing = true
angle_enable_vulkan_validation_layers = false
is_cfi = false

View File

@@ -81,7 +81,7 @@ async function createWindow () {
cancelId: 1
}
dialog.showMessageBox(mainWindow!, options).then(response => {
dialog.showMessageBox(mainWindow!, options).then(({ response }) => {
done(response === 0)
})
})

View File

@@ -54,7 +54,6 @@ app.on('ready', () => {
})
})
```
Using `protocol.registerStandardSchemes` without the session will still register your custom protocol as a standard scheme.
## Methods
@@ -149,8 +148,8 @@ going to be created with `scheme`. `completion` will be called with
To handle the `request`, the `callback` should be called with either the file's
path or an object that has a `path` property, e.g. `callback(filePath)` or
`callback({ path: filePath })`. The object may also have a `headers` property
which gives a list of strings for the response headers, e.g.
`callback({ path: filePath, headers: ["Content-Security-Policy: default-src 'none'"]})`.
which gives a map of headers to values for the response headers, e.g.
`callback({ path: filePath, headers: {"Content-Security-Policy": "default-src 'none'"]})`.
When `callback` is called with nothing, a number, or an object that has an
`error` property, the `request` will fail with the `error` number you
@@ -158,9 +157,7 @@ specified. For the available error numbers you can use, please see the
[net error list][net-error].
By default the `scheme` is treated like `http:`, which is parsed differently
than protocols that follow the "generic URI syntax" like `file:`, so you
probably want to call `protocol.registerStandardSchemes` to have your scheme
treated as a standard scheme.
than protocols that follow the "generic URI syntax" like `file:`.
### `protocol.registerBufferProtocol(scheme, handler[, completion])`

View File

@@ -0,0 +1,62 @@
# Updating an Appveyor Azure Image
Electron CI on Windows uses AppVeyor, which in turn uses Azure VM images to run. Occasionally, these VM images need to be updated due to changes in Chromium requirements. In order to update you will need [PowerShell](https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-6) and the [Azure PowerShell module](https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-1.8.0&viewFallbackFrom=azurermps-6.13.0).
Occasionally we need to update these images owing to changes in Chromium or other miscellaneous build requirement changes.
Example Use Case:
* We need `VS15.9` and we have `VS15.7` installed; this would require us to update an Azure image.
1. Identify the image you wish to modify.
* In [appveyor.yml](https://github.com/electron/electron/blob/master/appveyor.yml), the image is identified by the property *image*.
* The names used correspond to the *"images"* defined for a build cloud, eg the [libcc-20 cloud](https://windows-ci.electronjs.org/build-clouds/8).
* Find the image you wish to modify in the build cloud and make note of the **VHD Blob Path** for that image, which is the value for that corresponding key.
* You will need this URI path to copy into a new image.
* You will also need the storage account name which is labeled in AppVeyor as the **Disk Storage Account Name**
2. Get the Azure storage account key
* Log into Azure using credentials stored in LastPass (under Azure Enterprise) and then find the storage account corresponding to the name found in AppVeyor.
* Example, for `appveyorlibccbuilds` **Disk Storage Account Name** you'd look for `appveyorlibccbuilds` in the list of storage accounts @ Home < Storage Accounts
* Click into it and look for `Access Keys`, and then you can use any of the keys present in the list.
3. Get the full virtual machine image URI from Azure
* Navigate to Home < Storage Accounts < `$ACCT_NAME` < Blobs < Images
* In the following list, look for the VHD path name you got from Appveyor and then click on it.
* Copy the whole URL from the top of the subsequent window.
4. Copy the image using the [Copy Master Image PowerShell script](https://github.com/appveyor/ci/blob/master/scripts/enterprise/copy-master-image-azure.ps1).
* It is essential to copy the VM because if you spin up a VM against an image that image cannot at the same time be used by AppVeyor.
* Use the storage account name, key, and URI obtained from Azure to run this script.
* See Step 3 for URI & when prompted, press enter to use same storage account as destination.
* Use default destination container name `(images)`
* Also, when naming the copy, use a name that indicates what the new image will contain (if that has changed) and date stamp.
* Ex. `libcc-20core-vs2017-15.9-2019-04-15.vhd`
* Go into Azure and get the URI for the newly created image as described in a previous step
5. Spin up a new VM using the [Create Master VM from VHD PowerShell](https://github.com/appveyor/ci/blob/master/scripts/enterprise/create_master_vm_from_vhd.ps1).
* From PowerShell, execute `ps1` file with `./create_master_vm_from_vhd.ps1`
* You will need the credential information available in the AppVeyor build cloud definition.
* This includes:
* Client ID
* Client Secret
* Tenant ID
* Subscription ID
* Resource Group
* Virtual Network
* You will also need to specify
* Master VM name - just a unique name to identify the temporary VM
* Master VM size - use `Standard_F32s_v2`
* Master VHD URI - use URI obtained @ end of previous step
* Location use `East US`
6. Log back into Azure and find the VM you just created in Homee < Virtual Machines < `$YOUR_NEW_VM`
* You can download a RDP (Remote Desktop) file to access the VM.
7. Using Microsoft Remote Desktop, click `Connect` to connect to the VM.
* Credentials for logging into the VM are found in LastPass under the `AppVeyor Enterprise master VM` credentials.
8. Modify the VM as required.
9. Shut down the VM and then delete it in Azure.
10. Add the new image to the Appveyor Cloud settings or modify an existing image to point to the new VHD.

View File

@@ -109,7 +109,13 @@ const { app, BrowserWindow } = require('electron')
function createWindow () {
// Create the browser window.
let win = new BrowserWindow({ width: 800, height: 600 })
let win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true
}
})
// and load the index.html of the app.
win.loadFile('index.html')
@@ -132,7 +138,13 @@ let win
function createWindow () {
// Create the browser window.
win = new BrowserWindow({ width: 800, height: 600 })
let win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true
}
})
// and load the index.html of the app.
win.loadFile('index.html')

View File

@@ -96,7 +96,7 @@ either `process.env` or the `window` object.
You should at least follow these steps to improve the security of your application:
1. [Only load secure content](#1-only-load-secure-content)
2. [Disable the Node.js integration in all renderers that display remote content](#2-disable-nodejs-integration-for-remote-content)
2. [Disable the Node.js integration in all renderers that display remote content](#2-do-not-enable-nodejs-integration-for-remote-content)
3. [Enable context isolation in all renderers that display remote content](#3-enable-context-isolation-for-remote-content)
4. [Use `ses.setPermissionRequestHandler()` in all sessions that load remote content](#4-handle-session-permission-requests-from-remote-content)
5. [Do not disable `webSecurity`](#5-do-not-disable-websecurity)
@@ -159,9 +159,11 @@ browserWindow.loadURL('https://example.com')
```
## 2) Disable Node.js Integration for Remote Content
## 2) Do not enable Node.js Integration for Remote Content
It is paramount that you disable Node.js integration in any renderer
_This recommendation is the default behavior in Electron since 5.0.0._
It is paramount that you do not enable Node.js integration in any renderer
([`BrowserWindow`][browser-window], [`BrowserView`][browser-view], or
[`<webview>`][webview-tag]) that loads remote content. The goal is to limit the
powers you grant to remote content, thus making it dramatically more difficult
@@ -185,7 +187,13 @@ so-called "Remote Code Execution" (RCE) attack.
```js
// Bad
const mainWindow = new BrowserWindow()
const mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: true,
nodeIntegrationInWorker: true
}
})
mainWindow.loadURL('https://example.com')
```
@@ -193,8 +201,6 @@ mainWindow.loadURL('https://example.com')
// Good
const mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: false,
nodeIntegrationInWorker: false,
preload: path.join(app.getAppPath(), 'preload.js')
}
})

View File

@@ -1,25 +1,57 @@
# Using Native Node Modules
The native Node modules are supported by Electron, but since Electron is very
likely to use a different V8 version from the Node binary installed in your
system, you have to manually specify the location of Electron's headers when
building native modules.
Native Node modules are supported by Electron, but since Electron is very
likely to use a different V8 version from the Node binary installed on your
system, the modules you use will need to be recompiled for Electron. Otherwise,
you will get the following class of error when you try to run your app:
```sh
Error: The module '/path/to/native/module.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION $XYZ. This version of Node.js requires
NODE_MODULE_VERSION $ABC. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
```
## How to install native modules
Three ways to install native modules:
There are several different ways to install native modules:
### Installing modules and rebuilding for Electron
You can install modules like other Node projects, and then rebuild the modules
for Electron with the [`electron-rebuild`][electron-rebuild] package. This
module can automatically determine the version of Electron and handle the
manual steps of downloading headers and rebuilding native modules for your app.
For example, to install `electron-rebuild` and then rebuild modules with it
via the command line:
```sh
npm install --save-dev electron-rebuild
# Every time you run "npm install", run this:
./node_modules/.bin/electron-rebuild
# On Windows if you have trouble, try:
.\node_modules\.bin\electron-rebuild.cmd
```
For more information on usage and integration with other tools, consult the
project's README.
### Using `npm`
By setting a few environment variables, you can use `npm` to install modules
directly.
An example of installing all dependencies for Electron:
For example, to install all dependencies for Electron:
```sh
# Electron's version.
export npm_config_target=1.2.3
# The architecture of Electron, can be ia32 or x64.
# The architecture of Electron, see https://electronjs.org/docs/tutorial/support#supported-platforms
# for supported architectures.
export npm_config_arch=x64
export npm_config_target_arch=x64
# Download headers for Electron.
@@ -32,25 +64,6 @@ export npm_config_build_from_source=true
HOME=~/.electron-gyp npm install
```
### Installing modules and rebuilding for Electron
You can also choose to install modules like other Node projects, and then
rebuild the modules for Electron with the [`electron-rebuild`][electron-rebuild]
package. This module can get the version of Electron and handle the manual steps
of downloading headers and building native modules for your app.
An example of installing `electron-rebuild` and then rebuild modules with it:
```sh
npm install --save-dev electron-rebuild
# Every time you run "npm install", run this:
./node_modules/.bin/electron-rebuild
# On Windows if you have trouble, try:
.\node_modules\.bin\electron-rebuild.cmd
```
### Manually building for Electron
If you are a developer developing a native module and want to test it against
@@ -62,44 +75,44 @@ cd /path-to-module/
HOME=~/.electron-gyp node-gyp rebuild --target=1.2.3 --arch=x64 --dist-url=https://atom.io/download/electron
```
The `HOME=~/.electron-gyp` changes where to find development headers. The
`--target=1.2.3` is version of Electron. The `--dist-url=...` specifies
where to download the headers. The `--arch=x64` says the module is built for
64bit system.
* `HOME=~/.electron-gyp` changes where to find development headers.
* `--target=1.2.3` is the version of Electron.
* `--dist-url=...` specifies where to download the headers.
* `--arch=x64` says the module is built for a 64-bit system.
### Manually building for a custom build of Electron
To compile native Node addons against a custom build of Electron that doesn't
To compile native Node modules against a custom build of Electron that doesn't
match a public release, instruct `npm` to use the version of Node you have bundled
with your custom build.
```sh
npm rebuild --nodedir=$HOME/.../path/to/electron/vendor/node
npm rebuild --nodedir=/path/to/electron/vendor/node
```
## Troubleshooting
If you installed a native module and found it was not working, you need to check
following things:
the following things:
* The architecture of the module has to match Electron's architecture (ia32 or x64).
* `win_delay_load_hook` is not set to `false` in the module's `binding.gyp`.
* After you upgrade Electron, you usually need to rebuild the modules.
* When in doubt, run `electron-rebuild` first.
* Make sure the native module is compatible with the target platform and
architecture for your Electron app.
* Make sure `win_delay_load_hook` is not set to `false` in the module's `binding.gyp`.
* After you upgrade Electron, you usually need to rebuild the modules.
### A note about `win_delay_load_hook`
On Windows, by default, node-gyp links native modules against `node.dll`.
On Windows, by default, `node-gyp` links native modules against `node.dll`.
However, in Electron 4.x and higher, the symbols needed by native modules are
exported by `electron.exe`, and there is no `node.dll` in Electron 4.x. In
order to load native modules on Windows, node-gyp installs a [delay-load
exported by `electron.exe`, and there is no `node.dll`. In order to load native
modules on Windows, `node-gyp` installs a [delay-load
hook](https://msdn.microsoft.com/en-us/library/z9h1h6ty.aspx) that triggers
when the native module is loaded, and redirects the `node.dll` reference to use
the loading executable instead of looking for `node.dll` in the library search
path (which would turn up nothing). As such, on Electron 4.x and higher,
`'win_delay_load_hook': 'true'` is required to load native modules.
If you get an error like `Module did not self-register`, or `The specified
procedure could not be found`, it may mean that the module you're trying to use
did not correctly include the delay-load hook. If the module is built with
@@ -125,12 +138,13 @@ In particular, it's important that:
- `win_delay_load_hook.obj` is linked directly into the final DLL. If the hook
is set up in a dependent DLL, it won't fire at the right time.
See [node-gyp](https://github.com/nodejs/node-gyp/blob/e2401e1395bef1d3c8acec268b42dc5fb71c4a38/src/win_delay_load_hook.cc) for an example delay-load hook if you're implementing your own.
See [`node-gyp`](https://github.com/nodejs/node-gyp/blob/e2401e1395bef1d3c8acec268b42dc5fb71c4a38/src/win_delay_load_hook.cc)
for an example delay-load hook if you're implementing your own.
## Modules that rely on `prebuild`
[`prebuild`](https://github.com/mafintosh/prebuild) provides a way to
publish native Node modules with prebuilt binaries for multiple versions of Node
[`prebuild`](https://github.com/prebuild/prebuild) provides a way to publish
native Node modules with prebuilt binaries for multiple versions of Node
and Electron.
If modules provide binaries for the usage in Electron, make sure to omit
@@ -143,13 +157,13 @@ The [`node-pre-gyp` tool][node-pre-gyp] provides a way to deploy native Node
modules with prebuilt binaries, and many popular modules are using it.
Usually those modules work fine under Electron, but sometimes when Electron uses
a newer version of V8 than Node, and there are ABI changes, bad things may
happen. So in general it is recommended to always build native modules from
source code.
a newer version of V8 than Node and/or there are ABI changes, bad things may
happen. So in general, it is recommended to always build native modules from
source code. `electron-rebuild` handles this for you automatically.
If you are following the `npm` way of installing modules, then this is done
by default, if not, you have to pass `--build-from-source` to `npm`, or set the
`npm_config_build_from_source` environment variable.
[electron-rebuild]: https://github.com/paulcbetts/electron-rebuild
[electron-rebuild]: https://github.com/electron/electron-rebuild
[node-pre-gyp]: https://github.com/mapbox/node-pre-gyp

View File

@@ -2,13 +2,12 @@
const ipcMainUtils = require('@electron/internal/browser/ipc-main-internal-utils')
const { desktopCapturer } = process.electronBinding('desktop_capturer')
const { createDesktopCapturer } = process.electronBinding('desktop_capturer')
const eventBinding = process.electronBinding('event')
const deepEqual = (a, b) => JSON.stringify(a) === JSON.stringify(b)
// A queue for holding all requests from renderer process.
let requestsQueue = []
let currentlyRunning = []
ipcMainUtils.handle('ELECTRON_BROWSER_DESKTOP_CAPTURER_GET_SOURCES', (event, captureWindow, captureScreen, thumbnailSize, fetchWindowIcons) => {
const customEvent = eventBinding.createWithSender(event.sender)
@@ -18,63 +17,85 @@ ipcMainUtils.handle('ELECTRON_BROWSER_DESKTOP_CAPTURER_GET_SOURCES', (event, cap
return []
}
return new Promise((resolve, reject) => {
const options = {
captureWindow,
captureScreen,
thumbnailSize,
fetchWindowIcons
}
for (const running of currentlyRunning) {
if (deepEqual(running.options, options)) {
// If a request is currently running for the same options
// return that promise
return running.getSources
}
}
const getSources = new Promise((resolve, reject) => {
const stopRunning = () => {
// Remove from currentlyRunning once we resolve or reject
currentlyRunning = currentlyRunning.filter(running => running.options !== options)
}
const request = {
options: {
captureWindow,
captureScreen,
thumbnailSize,
fetchWindowIcons
options,
resolve: (value) => {
stopRunning()
resolve(value)
},
resolve
}
requestsQueue.push(request)
if (requestsQueue.length === 1) {
desktopCapturer.startHandling(captureWindow, captureScreen, thumbnailSize, fetchWindowIcons)
reject: (err) => {
stopRunning()
reject(err)
},
capturer: createDesktopCapturer()
}
request.capturer.emit = createCapturerEmitHandler(request.capturer, request)
request.capturer.startHandling(captureWindow, captureScreen, thumbnailSize, fetchWindowIcons)
// If the WebContents is destroyed before receiving result, just remove the
// reference from requestsQueue to make the module not send the result to it.
// reference to resolve, emit and the capturer itself so that it never dispatches
// back to the renderer
event.sender.once('destroyed', () => {
request.resolve = null
delete request.capturer.emit
delete request.capturer
stopRunning()
})
})
currentlyRunning.push({
options,
getSources
})
return getSources
})
desktopCapturer.emit = (event, name, sources, fetchWindowIcons) => {
// Receiving sources result from main process, now send them back to renderer.
const handledRequest = requestsQueue.shift()
const unhandledRequestsQueue = []
const createCapturerEmitHandler = (capturer, request) => {
return function handlEmitOnCapturer (event, name, sources, fetchWindowIcons) {
// Ensure that this capturer instance can only ever receive a single event
// if we get more than one it is a bug but will also cause strange behavior
// if we still try to handle it
delete capturer.emit
const result = sources.map(source => {
return {
id: source.id,
name: source.name,
thumbnail: source.thumbnail.toDataURL(),
display_id: source.display_id,
appIcon: (fetchWindowIcons && source.appIcon) ? source.appIcon.toDataURL() : null
if (name === 'error') {
const error = sources
request.reject(error)
return
}
})
if (handledRequest.resolve) {
handledRequest.resolve(result)
}
// Check the queue to see whether there is another identical request & handle
requestsQueue.forEach(request => {
if (deepEqual(handledRequest.options, request.options)) {
if (request.resolve) {
request.resolve(result)
const result = sources.map(source => {
return {
id: source.id,
name: source.name,
thumbnail: source.thumbnail.toDataURL(),
display_id: source.display_id,
appIcon: (fetchWindowIcons && source.appIcon) ? source.appIcon.toDataURL() : null
}
} else {
unhandledRequestsQueue.push(request)
}
})
requestsQueue = unhandledRequestsQueue
})
// If the requestsQueue is not empty, start a new request handling.
if (requestsQueue.length > 0) {
const { captureWindow, captureScreen, thumbnailSize, fetchWindowIcons } = requestsQueue[0].options
return desktopCapturer.startHandling(captureWindow, captureScreen, thumbnailSize, fetchWindowIcons)
if (request.resolve) {
request.resolve(result)
}
}
}

View File

@@ -1,7 +1,7 @@
'use strict';
(function () {
const asar = process.binding('atom_common_asar')
const asar = process._linkedBinding('atom_common_asar')
const assert = require('assert')
const { Buffer } = require('buffer')
const childProcess = require('child_process')

View File

@@ -1,14 +1,6 @@
'use strict'
/* global source, require */
// Expose fs module without asar support.
// NB: Node's 'fs' and 'internal/fs/streams' have a lazy-loaded circular
// dependency. So to expose the unmodified Node 'fs' functionality here,
// we have to copy both 'fs' *and* 'internal/fs/streams' and modify the
// copies to depend on each other instead of on our asarified 'fs' code.
source['original-fs'].replace("require('internal/fs/streams')", "require('original-fs/streams')")
source['original-fs/streams'].replace("require('fs')", "require('original-fs')")
/* global require */
// Monkey-patch the fs module.
require('electron/js2c/asar').wrapFsWithAsar(require('fs'))

View File

@@ -4,7 +4,7 @@
const { EventEmitter } = require('events')
process.electronBinding = require('@electron/internal/common/atom-binding-setup').electronBindingSetup(nodeProcess.binding, 'renderer')
process.electronBinding = require('@electron/internal/common/atom-binding-setup').electronBindingSetup(nodeProcess._linkedBinding, 'renderer')
const v8Util = process.electronBinding('v8_util')

View File

@@ -2,7 +2,7 @@
/* global nodeProcess, isolatedWorld */
process.electronBinding = require('@electron/internal/common/atom-binding-setup').electronBindingSetup(nodeProcess.binding, 'renderer')
process.electronBinding = require('@electron/internal/common/atom-binding-setup').electronBindingSetup(nodeProcess._linkedBinding, 'renderer')
const v8Util = process.electronBinding('v8_util')

View File

@@ -4,6 +4,24 @@ import * as path from 'path'
const Module = require('module')
// Make sure globals like "process" and "global" are always available in preload
// scripts even after they are deleted in "loaded" script.
//
// Note 1: We rely on a Node patch to actually pass "process" and "global" and
// other arguments to the wrapper.
//
// Note 2: Node introduced a new code path to use native code to wrap module
// code, which does not work with this hack. However by modifying the
// "Module.wrapper" we can force Node to use the old code path to wrap module
// code with JavaScript.
Module.wrapper = [
'(function (exports, require, module, __filename, __dirname, process, global, Buffer) { ' +
// By running the code in a new closure, it would be possible for the module
// code to override "process" and "Buffer" with local variables.
'return function (exports, require, module, __filename, __dirname) { ',
'\n}.call(this, exports, require, module, __filename, __dirname); });'
]
// We modified the original process.argv to let node.js load the
// init.js, we need to restore it here.
process.argv.splice(1, 1)

15
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "electron",
"version": "6.0.0-nightly.20190404",
"version": "6.0.0-beta.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -4789,7 +4789,8 @@
"version": "2.1.1",
"resolved": false,
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@@ -5254,7 +5255,8 @@
"version": "5.1.1",
"resolved": false,
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==",
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -5318,6 +5320,7 @@
"resolved": false,
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -5366,13 +5369,15 @@
"version": "1.0.2",
"resolved": false,
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.2",
"resolved": false,
"integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=",
"dev": true
"dev": true,
"optional": true
}
}
},

View File

@@ -1,6 +1,6 @@
{
"name": "electron",
"version": "6.0.0-nightly.20190404",
"version": "6.0.0-beta.1",
"repository": "https://github.com/electron/electron",
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
"devDependencies": {

View File

@@ -69,8 +69,10 @@ revert_build_swiftshader_for_arm32.patch
fix_disable_usage_of_abort_report_np_in_mas_builds.patch
fix_disable_usage_of_pthread_fchdir_np_and_pthread_chdir_np_in_mas.patch
fix_disable_usage_of_setapplicationisdaemon_and.patch
disable_custom_libcxx_on_windows.patch
fix_retain_compatibility_with_msvc.patch
ipc_message_start.patch
disable_network_services_by_default.patch
unsandboxed_ppapi_processes_skip_zygote.patch
viz_osr.patch
patch_the_ensure_gn_version_py_script_to_work_on_mac_ci.patch
revert_roll_clang_356356_357569.patch
disable_custom_libcxx_on_windows.patch

View File

@@ -10,7 +10,7 @@ This patch makes three changes to Accelerator::GetShortcutText to improve shortc
3. Ctrl-Shift-= should show as Ctrl-+
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
index a59d08c79b315ad30dea3ce4fb67b59bba07fae7..7f245b1e8b9b3c5dc6666be4d74b69c86e80a351 100644
index dadc140e9429c166ecd4c653c9ef5d0d4c4db2a4..bc93a9ecb28ff6973fc4d15f67a17d545c169a89 100644
--- a/ui/base/accelerators/accelerator.cc
+++ b/ui/base/accelerators/accelerator.cc
@@ -11,6 +11,7 @@
@@ -31,7 +31,7 @@ index a59d08c79b315ad30dea3ce4fb67b59bba07fae7..7f245b1e8b9b3c5dc6666be4d74b69c8
namespace ui {
@@ -148,7 +147,15 @@ base::string16 Accelerator::GetShortcutText() const {
@@ -150,7 +149,15 @@ base::string16 Accelerator::GetShortcutText() const {
shortcut = KeyCodeToName(key_code_);
#endif
@@ -47,7 +47,7 @@ index a59d08c79b315ad30dea3ce4fb67b59bba07fae7..7f245b1e8b9b3c5dc6666be4d74b69c8
#if defined(OS_WIN)
// Our fallback is to try translate the key code to a regular character
// unless it is one of digits (VK_0 to VK_9). Some keyboard
@@ -157,21 +164,14 @@ base::string16 Accelerator::GetShortcutText() const {
@@ -159,21 +166,14 @@ base::string16 Accelerator::GetShortcutText() const {
// accent' for '0'). For display in the menu (e.g. Ctrl-0 for the
// default zoom level), we leave VK_[0-9] alone without translation.
wchar_t key;
@@ -75,7 +75,7 @@ index a59d08c79b315ad30dea3ce4fb67b59bba07fae7..7f245b1e8b9b3c5dc6666be4d74b69c8
}
// Checking whether the character used for the accelerator is alphanumeric.
@@ -235,7 +235,7 @@ base::string16 Accelerator::ApplyLongFormModifiers(
@@ -237,7 +237,7 @@ base::string16 Accelerator::ApplyLongFormModifiers(
// more information.
if (IsCtrlDown())
shortcut = ApplyModifierToAcceleratorString(shortcut, IDS_APP_CTRL_KEY);

View File

@@ -39,10 +39,10 @@ index 2aef366ac8194aa261cbca6abc051f7da8a988d3..3c7d66c81032636abcca4f1538ce9b7f
GIN_EXPORT static ArrayBufferAllocator* SharedInstance();
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
index 0fdf8ba729f7fabcc2779299bc591ee2dd1fa9ba..611b44c5b70166665b132cfde79d0b2f0ea5ddad 100644
index 1df2ce89d245c5965fe957c3b48a977ab2b19ee3..9efa1d3a330b08826e2ec3bde75ac5b228c7f9cf 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -650,6 +650,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
@@ -553,6 +553,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
size, WTF::ArrayBufferContents::kDontInitialize);
}

View File

@@ -6,10 +6,10 @@ Subject: allow_webview_file_url.patch
Allow webview to load non-web URLs.
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index e06d2a5e9da5bd0218102636b5e8a0e981db31bc..af8db86dde165c087302d8bc5802e3dafde6a577 100644
index 289e7d0e40d379d32112b4565aa0751eccb37f47..f1744b1c54727f39ebecc0c20245faf856bf38a0 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -1522,6 +1522,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
@@ -1514,6 +1514,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
!policy->IsWebSafeScheme(info.common_params.url.scheme()) &&
!is_external_protocol;

View File

@@ -9,10 +9,22 @@ then some methods call into the original. Let's just return an empty
gfx::Rect and do the actual job in the subclass.
diff --git a/chrome/browser/ui/autofill/popup_view_common.cc b/chrome/browser/ui/autofill/popup_view_common.cc
index 004e9cb86bee7c10f6a68cdf6ceb60bf39627e1d..c6da9a8f5c14615bf22192f540b6fd95fa1ccb0e 100644
index 004e9cb86bee7c10f6a68cdf6ceb60bf39627e1d..a78dc65c413ce72d31a364e1b36dbe067cf579d7 100644
--- a/chrome/browser/ui/autofill/popup_view_common.cc
+++ b/chrome/browser/ui/autofill/popup_view_common.cc
@@ -176,14 +176,14 @@ gfx::Rect PopupViewCommon::GetWindowBounds(gfx::NativeView container_view) {
@@ -8,9 +8,11 @@
#include <utility>
#include "build/build_config.h"
+#if 0
#include "chrome/browser/platform_util.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_window.h"
+#endif
#include "ui/gfx/geometry/vector2d.h"
#if defined(OS_ANDROID)
@@ -176,14 +178,14 @@ gfx::Rect PopupViewCommon::GetWindowBounds(gfx::NativeView container_view) {
views::Widget::GetTopLevelWidgetForNativeView(container_view);
if (widget)
return widget->GetWindowBoundsInScreen();

View File

@@ -5,14 +5,14 @@ Subject: blink-worker-enable-csp-in-file-scheme.patch
diff --git a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
index 6e5842541701f0d094164914e5a53e60d7526d1e..9696f24f0f3edfbe9d9f78376956f0602e3a12aa 100644
index e2134f58fe7c59a17a24e428a4ba27d1f8db838e..174386d0768123c290094e6cf7e9a2ba95bc887c 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
@@ -307,7 +307,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy(
@@ -308,7 +308,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy(
// document (which is implemented in WorkerMessagingProxy, and
// m_contentSecurityPolicy should be left as nullptr to inherit the policy).
if (!response.CurrentRequestUrl().ProtocolIs("blob") &&
- !response.CurrentRequestUrl().ProtocolIs("file") &&
!response.CurrentRequestUrl().ProtocolIs("filesystem")) {
content_security_policy_ = ContentSecurityPolicy::Create();
content_security_policy_ = MakeGarbageCollected<ContentSecurityPolicy>();
content_security_policy_->SetOverrideURLForSelf(

View File

@@ -7,10 +7,10 @@ This is used by editors to obtain the filesystem path from a dragged file. See
documentation at https://electronjs.org/docs/api/file-object
diff --git a/third_party/blink/renderer/core/fileapi/file.h b/third_party/blink/renderer/core/fileapi/file.h
index 3abff1a1e4de7978e01587cc1bf2b3deb4318161..5213d1c46dcc25de84c4b882454b1f7d079f237f 100644
index 05e05fb1631851009897f3789d3e770475ce1363..e2ad5fef884532847d035430c14c25e042e2ab24 100644
--- a/third_party/blink/renderer/core/fileapi/file.h
+++ b/third_party/blink/renderer/core/fileapi/file.h
@@ -202,6 +202,9 @@ class CORE_EXPORT File final : public Blob {
@@ -201,6 +201,9 @@ class CORE_EXPORT File final : public Blob {
}
const String& name() const { return name_; }
@@ -21,10 +21,10 @@ index 3abff1a1e4de7978e01587cc1bf2b3deb4318161..5213d1c46dcc25de84c4b882454b1f7d
// http://dev.w3.org/2006/webapi/FileAPI/#file-attrs
int64_t lastModified() const;
diff --git a/third_party/blink/renderer/core/fileapi/file.idl b/third_party/blink/renderer/core/fileapi/file.idl
index 940f8e62ce228beaf71f5a4be88539a431415ab1..0cf315636afe0e5e1533b3372cdfe2c09ec581e1 100644
index 41b8183e858b6d955bacbb72281a08e750b6b29f..0db894ecfae63795724335d914f9f992c0755fd1 100644
--- a/third_party/blink/renderer/core/fileapi/file.idl
+++ b/third_party/blink/renderer/core/fileapi/file.idl
@@ -33,6 +33,7 @@
@@ -32,6 +32,7 @@
Serializable
] interface File : Blob {
readonly attribute DOMString name;

View File

@@ -10,10 +10,10 @@ to fix electron/electron#13787. The backport landed in Chromium 67 but the
DidCreateScriptContext re-ordering needs to be upstreamed or kept indefinitely
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 a56856c704ec7fa65d560a8604d7303be707a1ac..127a4e2dbf5984bb3512e426350d648e1d4837ab 100644
index 02d087e9ed5a91280bc00c75d70fc460b53cda1d..27c72802bc474610c8bc9083a7a41845223ed5cf 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
@@ -200,11 +200,10 @@ void LocalWindowProxy::Initialize() {
@@ -190,11 +190,10 @@ void LocalWindowProxy::Initialize() {
GetFrame()->IsMainFrame());
MainThreadDebugger::Instance()->ContextCreated(script_state_, GetFrame(),
origin);

View File

@@ -14,10 +14,10 @@ when there is code doing that.
This patch reverts the change to fix the crash in Electron.
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index 7bb3906762dbfe73e3c57d7c416168a2df8c99e4..64ef55ab3aa93c71fd58816ef2983e797f8dd75c 100644
index dd0e2f0df7b59ff0899473b96eac6ed3fb2f4122..6a8258a68d1e026ab5ad0c28d6d47883032a2a66 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -409,10 +409,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
@@ -413,10 +413,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
}
CHECK(!view_ || !view_->IsAttached());
@@ -28,7 +28,7 @@ index 7bb3906762dbfe73e3c57d7c416168a2df8c99e4..64ef55ab3aa93c71fd58816ef2983e79
if (!Client())
return;
@@ -430,6 +426,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
@@ -434,6 +430,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
// Notify ScriptController that the frame is closing, since its cleanup ends
// up calling back to LocalFrameClient via WindowProxy.
GetScriptController().ClearForClose();

View File

@@ -5,10 +5,10 @@ Subject: blink_world_context.patch
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
index 611a2f6443a954f984e11c4cf84991c60f1ea08a..60afd4d8805da3d9fcb9f2a0fc0b857b550615eb 100644
index 6b1777713b03ee58d875377226d9827589388d79..5871096511969db7f029148679195bb7cdc7839f 100644
--- a/third_party/blink/public/web/web_local_frame.h
+++ b/third_party/blink/public/web/web_local_frame.h
@@ -350,6 +350,9 @@ class WebLocalFrame : public WebFrame {
@@ -355,6 +355,9 @@ class WebLocalFrame : public WebFrame {
// be calling this API.
virtual v8::Local<v8::Context> MainWorldScriptContext() const = 0;
@@ -19,10 +19,10 @@ index 611a2f6443a954f984e11c4cf84991c60f1ea08a..60afd4d8805da3d9fcb9f2a0fc0b857b
// 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 3ae069323d53af44a8c061ee3dd0efe558e20692..818f91e2744f1d8c7c02c665d17136c6cf992f89 100644
index 481c9b9bdebef21fa7a78698a95be7fa6901673b..165406a76deedf1c4f34d451eb43be2977431481 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
@@ -865,6 +865,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
@@ -867,6 +867,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
return MainWorldScriptContext()->Global();
}
@@ -37,10 +37,10 @@ index 3ae069323d53af44a8c061ee3dd0efe558e20692..818f91e2744f1d8c7c02c665d17136c6
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 84d256cad315d93a434a5878805c7114175df3a7..165ba0f0081755a3ece4aa6fdcfb653508bd6df4 100644
index 04874b65153227a208a114736a036c34507a3148..67a894cb7327fee07f70cd5749f445f708d35503 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
@@ -148,6 +148,8 @@ class CORE_EXPORT WebLocalFrameImpl final
@@ -147,6 +147,8 @@ class CORE_EXPORT WebLocalFrameImpl final
int argc,
v8::Local<v8::Value> argv[]) override;
v8::Local<v8::Context> MainWorldScriptContext() const override;

View File

@@ -6,7 +6,7 @@ Subject: boringssl BUILD.gn
Build BoringSSL with some extra functions that nodejs needs.
diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
index e50f30a4763ee834564a2f91e0b6b0543138d6e5..5262a59d413fc9944e164a7e269fee431361b5bd 100644
index 051b3ed07fa7d4ec2e5f9200dab6843176e55d56..edf567e79c88fbe66acf4aabd3952cb8adcab4af 100644
--- a/third_party/boringssl/BUILD.gn
+++ b/third_party/boringssl/BUILD.gn
@@ -45,6 +45,19 @@ config("no_asm_config") {

View File

@@ -5,7 +5,7 @@ Subject: browser_compositor_mac.patch
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.h b/content/browser/renderer_host/browser_compositor_view_mac.h
index 454c4cfd5a73bda737ec4570101517718518e1d8..9fa3b7ca2eb07f470ba5595f5da6013956b14491 100644
index de89d291e5cbc0981cf06170ed35502a1239136d..656f6c38d55d9f9af569bc772254ca13c279eeab 100644
--- a/content/browser/renderer_host/browser_compositor_view_mac.h
+++ b/content/browser/renderer_host/browser_compositor_view_mac.h
@@ -60,6 +60,8 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
@@ -26,7 +26,7 @@ index 454c4cfd5a73bda737ec4570101517718518e1d8..9fa3b7ca2eb07f470ba5595f5da60139
viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink);
void OnDidNotProduceFrame(const viz::BeginFrameAck& ack);
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.mm b/content/browser/renderer_host/browser_compositor_view_mac.mm
index 0817b4eca4f4e6f7f5d250589c1e4dbcc068237c..dcc2340e59771e8d73de7e97fa2371d8bec7b149 100644
index 625566d5ad2510679cd3ed4c306c1cd3715f4c94..342c85daba1812461b4d9c0f9255220b26aca770 100644
--- a/content/browser/renderer_host/browser_compositor_view_mac.mm
+++ b/content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -79,6 +79,12 @@

View File

@@ -5,7 +5,7 @@ Subject: build_gn.patch
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 9e843f3c30d28a529c22e21b7fe4ba7439978156..1bace3eb626b86c7a47c3dccaf5442c86a14a6b8 100644
index 7175865b31ceefb592bfdfb55b00a1aaab14ef15..a96c2429dacac65489da0cd6fa5a642222f4b518 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -123,6 +123,9 @@ if (current_os == "") {
@@ -18,7 +18,7 @@ index 9e843f3c30d28a529c22e21b7fe4ba7439978156..1bace3eb626b86c7a47c3dccaf5442c8
# 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
@@ -441,6 +444,7 @@ default_compiler_configs = [
@@ -438,6 +441,7 @@ default_compiler_configs = [
"//build/config/compiler:thin_archive",
"//build/config/coverage:default_coverage",
"//build/config/sanitizers:default_sanitizer_flags",

View File

@@ -5,10 +5,10 @@ Subject: can_create_window.patch
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index f1ee6aab83bfa5557ff27bca07d69e9a3544ded6..3421d787abf08f3854a5cf21ec62b880fcbba518 100644
index a3651be4e397f85350bdf13179ca826c18b44cb5..6f3b476f027d768140813654033e44cd121365db 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -3646,6 +3646,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -3669,6 +3669,7 @@ void RenderFrameHostImpl::CreateNewWindow(
last_committed_origin_, params->window_container_type,
params->target_url, params->referrer.To<Referrer>(),
params->frame_name, params->disposition, *params->features,
@@ -17,10 +17,10 @@ index f1ee6aab83bfa5557ff27bca07d69e9a3544ded6..3421d787abf08f3854a5cf21ec62b880
&no_javascript_access);
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index 8406b096d6f1e3e3c4b82a02ff4efa0d97ced63e..69424cdd76d458d632e0e2ed902858a7a607b43a 100644
index 7deab3ea78fc85815a7c713dc7718723f9302975..cf352ff127ea9aee0dcf5eff3915b21def76f0bb 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -275,6 +275,10 @@ struct CreateNewWindowParams {
@@ -288,6 +288,10 @@ struct CreateNewWindowParams {
// The window features to use for the new window.
blink.mojom.WindowFeatures features;
@@ -32,10 +32,10 @@ index 8406b096d6f1e3e3c4b82a02ff4efa0d97ced63e..69424cdd76d458d632e0e2ed902858a7
// 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 6a952d2c52082a0a0fe1a256babfb49014d22e0b..04c766ffe55d6c24b7aaa19e70236a7a93fb015c 100644
index 445e1febebe62b014d995a2bfb8ceefedc1e5e6a..03999fb7f9bfc1bb21cda1bfe15e95fb3bc9b678 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -513,6 +513,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -519,6 +519,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -45,10 +45,10 @@ index 6a952d2c52082a0a0fe1a256babfb49014d22e0b..04c766ffe55d6c24b7aaa19e70236a7a
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 42b673aea33b2831308244eb12e2670156e8f615..3f9739aa7b3a29106bc267ee9ba67dd7ebdd3099 100644
index 0a1bf5d0b4d1fddcef30d2da697dc77b5b7f8c79..424bdb1dde40cc4003e022908de702a9d9e488d4 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -175,6 +175,7 @@ class RenderFrameHost;
@@ -178,6 +178,7 @@ class RenderFrameHost;
class RenderProcessHost;
class RenderViewHost;
class ResourceContext;
@@ -56,7 +56,7 @@ index 42b673aea33b2831308244eb12e2670156e8f615..3f9739aa7b3a29106bc267ee9ba67dd7
class SerialDelegate;
class ServiceManagerConnection;
class SiteInstance;
@@ -786,6 +787,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -798,6 +799,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -66,18 +66,18 @@ index 42b673aea33b2831308244eb12e2670156e8f615..3f9739aa7b3a29106bc267ee9ba67dd7
bool opener_suppressed,
bool* no_javascript_access);
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 2002ea3db55b47c8792ad4e2fca54b08585e89ea..07126db61d6985e42628ea2e518eeda9457f0e71 100644
index 3e328daa58275e05b30b7a3fabb03f69db2fd7d2..d207e3760d8b48c1283085da132ee03eddb4c17c 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -76,6 +76,7 @@
@@ -77,6 +77,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/audio_device_factory.h"
#include "content/renderer/media/stream/media_stream_device_observer.h"
#include "content/renderer/media/video_capture_impl_manager.h"
@@ -1360,6 +1361,8 @@ WebView* RenderViewImpl::CreateView(
#include "content/renderer/media/video_capture/video_capture_impl_manager.h"
@@ -1370,6 +1371,8 @@ WebView* RenderViewImpl::CreateView(
}
params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features);
@@ -87,10 +87,10 @@ index 2002ea3db55b47c8792ad4e2fca54b08585e89ea..07126db61d6985e42628ea2e518eeda9
// moved on send.
bool is_background_tab =
diff --git a/content/shell/browser/web_test/web_test_content_browser_client.cc b/content/shell/browser/web_test/web_test_content_browser_client.cc
index 9e738f90c516cfec18816a183f1a2ab615827307..7e04c82967e3458be32345e683af33b9abc5289e 100644
index a303b169acb638a0c4bbec1349a028c8d89762bd..c95dcedefc74e5ad9883d16448bb36fcb5a088a6 100644
--- a/content/shell/browser/web_test/web_test_content_browser_client.cc
+++ b/content/shell/browser/web_test/web_test_content_browser_client.cc
@@ -299,6 +299,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
@@ -298,6 +298,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -100,10 +100,10 @@ index 9e738f90c516cfec18816a183f1a2ab615827307..7e04c82967e3458be32345e683af33b9
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/shell/browser/web_test/web_test_content_browser_client.h b/content/shell/browser/web_test/web_test_content_browser_client.h
index 1eeb9dafd62e163c7458352de31c62dbd1293f32..0d46e75cdf0a1ef573e733432a4613da850d6f4d 100644
index 6413e5f117d7dfd4a61779d4c971c28a14a86082..a02e232249cf99c55ec5b07a94b29f0a6d4a38bf 100644
--- a/content/shell/browser/web_test/web_test_content_browser_client.h
+++ b/content/shell/browser/web_test/web_test_content_browser_client.h
@@ -67,6 +67,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
@@ -68,6 +68,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,

View File

@@ -46,7 +46,7 @@ index befe726af9c10b1563a7fc0bb77cc55f65943d5c..46c6fe08bab8471007f78d3ef227e519
GlobalShortcutListener* GlobalShortcutListener::GetInstance() {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
diff --git a/chrome/browser/extensions/global_shortcut_listener_win.cc b/chrome/browser/extensions/global_shortcut_listener_win.cc
index f5d0ac4ba826ee4f023224ce90c6d8b6614c2912..380682029d20cab485bb8b52bd5c7d9cdc424c7d 100644
index c5125495b4d178ffb18be4d2d9670f7556412cbd..cddb321abb938c667a4a2089f87eab999510e9b1 100644
--- a/chrome/browser/extensions/global_shortcut_listener_win.cc
+++ b/chrome/browser/extensions/global_shortcut_listener_win.cc
@@ -62,6 +62,8 @@ void GlobalShortcutListenerWin::OnWndProc(HWND hwnd,
@@ -58,7 +58,7 @@ index f5d0ac4ba826ee4f023224ce90c6d8b6614c2912..380682029d20cab485bb8b52bd5c7d9c
ui::Accelerator accelerator(
ui::KeyboardCodeForWindowsKeyCode(key_code), modifiers);
@@ -98,6 +100,7 @@ bool GlobalShortcutListenerWin::RegisterAcceleratorImpl(
@@ -92,6 +94,7 @@ bool GlobalShortcutListenerWin::RegisterAcceleratorImpl(
modifiers |= accelerator.IsShiftDown() ? MOD_SHIFT : 0;
modifiers |= accelerator.IsCtrlDown() ? MOD_CONTROL : 0;
modifiers |= accelerator.IsAltDown() ? MOD_ALT : 0;

View File

@@ -12,7 +12,7 @@ Without this patch, calling `registerStandardSchemes` during initialization
when in debug mode will cause a DCHECK to fire.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index 010ecd6f98489d0945f0998bed2a3c6ff1ff7137..793004d877394bb89447db275cc8d0d8660d263a 100644
index 4dc87d822f1290475d756d1b12237ac31a8a7581..62997d683a83be4fd399a1474a5598aee28d379a 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -757,7 +757,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
@@ -40,7 +40,7 @@ index 456df421598153bde006ad0ecb0f1031360bb543..af06d78b91fa30e5daf993ad2c65c2c5
return service_manager::ProcessType::kDefault;
}
diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h
index f836a17fa0568aa33e204725f96233aac236aac5..af1d5ef18fb414a681bee48d36c3f94ed789c077 100644
index f498906f693ea6047add85fcf59ed34457120053..9864dbdd240b3c55eec53a1ab46e409c3d463293 100644
--- a/content/public/app/content_main_delegate.h
+++ b/content/public/app/content_main_delegate.h
@@ -88,6 +88,9 @@ class CONTENT_EXPORT ContentMainDelegate {

View File

@@ -8,10 +8,10 @@ run before shutdown. This is required to cleanup WebContents asynchronously
in atom::CommonWebContentsDelegate::ResetManageWebContents.
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index f79b1a629779af2b991a1c95ad4e0d4a8ec6d217..28f2aaf4ef55e505e278719956277f1aefe0146a 100644
index 6e3dfde1019beee050e542934470beebd7a0c43e..76dd73f3ccfb43d0e74016a5a84afd4a2db22ca4 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -1548,7 +1548,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
@@ -1564,7 +1564,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
}
base::RunLoop run_loop;

View File

@@ -8,10 +8,10 @@ this patch can be removed once we switch to network service,
where the embedders have a chance to design their URLLoaders.
diff --git a/content/browser/loader/cross_site_document_resource_handler.cc b/content/browser/loader/cross_site_document_resource_handler.cc
index f86a9167ac1ec5e7b082e474eb4b5f217d06df92..47df32ecb078a8f18e474f5c38faf2c7bdab30a1 100644
index 9e65e50de1d45d8435145b56bf7108a8c0272065..3103e4caa2adf853277774092cbd645fd8ece952 100644
--- a/content/browser/loader/cross_site_document_resource_handler.cc
+++ b/content/browser/loader/cross_site_document_resource_handler.cc
@@ -673,6 +673,9 @@ bool CrossSiteDocumentResourceHandler::ShouldBlockBasedOnHeaders(
@@ -666,6 +666,9 @@ bool CrossSiteDocumentResourceHandler::ShouldBlockBasedOnHeaders(
return false;
}
@@ -22,7 +22,7 @@ index f86a9167ac1ec5e7b082e474eb4b5f217d06df92..47df32ecb078a8f18e474f5c38faf2c7
}
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index b41997165352e06cd6179e1d0dd3c18e4ab819a2..bab2e97e836c81ccce6f7ba874ecfcafc3a05de0 100644
index 7e15121545795d39ec3326856919e6582b239506..0c2798cdae8166d792a4bf4ef94fa00cc4b8afa0 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -61,6 +61,10 @@ ContentBrowserClient::SiteInstanceForNavigationType ContentBrowserClient::Should
@@ -37,10 +37,10 @@ index b41997165352e06cd6179e1d0dd3c18e4ab819a2..bab2e97e836c81ccce6f7ba874ecfcaf
const MainFunctionParams& parameters) {
return nullptr;
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 406cca4538b978a8de41845b02f4c0d15b393cde..a5e64cf1f90b3a184e0b5ce69f5a9baedcf1a27c 100644
index e89f60b3c6297a90e95058c19fc953c82af043e9..e1585d687026cc5d0528dd99ae9e36ffb6699dfc 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -241,6 +241,9 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -244,6 +244,9 @@ class CONTENT_EXPORT ContentBrowserClient {
content::RenderFrameHost* rfh,
content::SiteInstance* pending_site_instance) {}

Some files were not shown because too many files have changed in this diff Show More