Permalink
Browse files

feat: upgrade to Chromium 72.0.3626.52 (#16334)

  • Loading branch information...
nornagon authored and BinaryMuse committed Jan 22, 2019
1 parent ff9b23e commit 1918e76913ed550a3b2738ac541de48cb9db4afa
Showing with 2,102 additions and 1,734 deletions.
  1. +1 −0 .circleci/config.yml
  2. +5 −6 BUILD.gn
  3. +2 −2 DEPS
  4. +34 −0 atom/app/atom_main_delegate.cc
  5. +1 −0 atom/app/atom_main_delegate.h
  6. +8 −6 atom/browser/api/atom_api_app.cc
  7. +3 −1 atom/browser/api/atom_api_auto_updater.cc
  8. +3 −2 atom/browser/api/atom_api_browser_view.cc
  9. +4 −3 atom/browser/api/atom_api_browser_window_mac.mm
  10. +3 −1 atom/browser/api/atom_api_debugger.cc
  11. +3 −2 atom/browser/api/atom_api_download_item.cc
  12. +3 −2 atom/browser/api/atom_api_in_app_purchase.cc
  13. +3 −1 atom/browser/api/atom_api_menu.cc
  14. +2 −2 atom/browser/api/atom_api_menu_mac.mm
  15. +5 −2 atom/browser/api/atom_api_net.cc
  16. +3 −2 atom/browser/api/atom_api_notification.cc
  17. +3 −2 atom/browser/api/atom_api_power_monitor.cc
  18. +3 −1 atom/browser/api/atom_api_screen.cc
  19. +9 −6 atom/browser/api/atom_api_session.cc
  20. +3 −2 atom/browser/api/atom_api_system_preferences.cc
  21. +3 −2 atom/browser/api/atom_api_top_level_window.cc
  22. +3 −1 atom/browser/api/atom_api_tray.cc
  23. +3 −2 atom/browser/api/atom_api_view.cc
  24. +24 −20 atom/browser/api/atom_api_web_contents.cc
  25. +2 −1 atom/browser/api/atom_api_web_contents.h
  26. +12 −1 atom/browser/api/{atom_api_web_contents_osr.cc → atom_api_web_contents_impl.cc}
  27. +1 −1 atom/browser/api/atom_api_web_contents_mac.mm
  28. +2 −1 atom/browser/api/event_emitter.cc
  29. +23 −3 atom/browser/atom_browser_client.cc
  30. +6 −1 atom/browser/atom_browser_client.h
  31. +0 −5 atom/browser/atom_browser_context.cc
  32. +0 −1 atom/browser/atom_browser_context.h
  33. +1 −28 atom/browser/atom_browser_main_parts.cc
  34. +0 −1 atom/browser/atom_browser_main_parts.h
  35. +1 −1 atom/browser/browser_mac.mm
  36. +6 −1 atom/browser/browser_process_impl.cc
  37. +4 −2 atom/browser/browser_process_impl.h
  38. +3 −2 atom/browser/common_web_contents_delegate.cc
  39. +1 −1 atom/browser/common_web_contents_delegate.h
  40. +13 −6 atom/browser/common_web_contents_delegate_mac.mm
  41. +6 −3 atom/browser/common_web_contents_delegate_views.cc
  42. +21 −0 atom/browser/mac/atom_application.mm
  43. +11 −6 atom/browser/native_browser_view_mac.mm
  44. +21 −13 atom/browser/native_window_mac.mm
  45. +8 −0 atom/browser/native_window_views.cc
  46. +1 −0 atom/browser/native_window_views.h
  47. +1 −5 atom/browser/net/atom_network_delegate.cc
  48. +2 −4 atom/browser/net/atom_network_delegate.h
  49. +0 −10 atom/browser/net/url_request_context_getter.cc
  50. +3 −1 atom/browser/ui/certificate_trust_mac.mm
  51. +5 −5 atom/browser/ui/cocoa/atom_inspectable_web_contents_view.mm
  52. +1 −1 atom/browser/ui/cocoa/atom_native_widget_mac.h
  53. +1 −1 atom/browser/ui/cocoa/atom_native_widget_mac.mm
  54. +11 −8 atom/browser/ui/cocoa/atom_ns_window_delegate.mm
  55. +10 −9 atom/browser/ui/drag_util_mac.mm
  56. +6 −3 atom/browser/ui/file_dialog_mac.mm
  57. +2 −3 atom/browser/ui/inspectable_web_contents_impl.cc
  58. +1 −1 atom/browser/ui/inspectable_web_contents_impl.h
  59. +4 −2 atom/browser/ui/message_box_mac.mm
  60. +0 −3 atom/browser/ui/views/atom_views_delegate.cc
  61. +0 −2 atom/browser/ui/views/atom_views_delegate.h
  62. +2 −3 atom/browser/ui/views/submenu_button.cc
  63. +27 −0 atom/browser/web_contents_preferences.cc
  64. +2 −2 atom/browser/web_dialog_helper.cc
  65. +4 −2 atom/browser/web_view_guest_delegate.cc
  66. +1 −1 atom/common/api/atom_api_native_image_mac.mm
  67. +3 −3 atom/common/api/atom_bindings.cc
  68. +1 −1 atom/common/api/constructor.h
  69. +2 −8 atom/common/common_message_generator.cc
  70. +22 −21 atom/common/native_mate_converters/blink_converter.cc
  71. +3 −3 atom/common/native_mate_converters/blink_converter.h
  72. +10 −6 atom/common/native_mate_converters/callback.cc
  73. +8 −3 atom/common/native_mate_converters/callback.h
  74. +3 −2 atom/common/native_mate_converters/v8_value_converter.cc
  75. +1 −1 atom/common/node_bindings_win.cc
  76. +3 −2 atom/renderer/api/atom_api_spell_check_client.cc
  77. +7 −3 atom/renderer/api/atom_api_web_frame.cc
  78. +0 −1 atom/renderer/content_settings_observer.cc
  79. +1 −2 atom/renderer/content_settings_observer.h
  80. +14 −6 atom/utility/atom_content_utility_client.cc
  81. +5 −0 atom/utility/atom_content_utility_client.h
  82. +6 −8 chromium_src/BUILD.gn
  83. +5 −0 docs/api/browser-window.md
  84. +1 −0 filenames.gni
  85. +2 −2 lib/browser/guest-view-manager.js
  86. +3 −1 native_mate/native_mate/dictionary.h
  87. +2 −1 native_mate/native_mate/wrappable.cc
  88. +0 −1 patches/common/boringssl/.patches
  89. +3 −3 patches/common/boringssl/add_ec_group_order_bits_for_openssl_compatibility.patch
  90. +1 −1 patches/common/boringssl/add_ec_key_key2buf_for_openssl_compatibility.patch
  91. +0 −58 patches/common/boringssl/implement_ssl_get_tlsext_status_type.patch
  92. +2 −4 patches/common/chromium/.patches
  93. +6 −6 patches/common/chromium/accelerator.patch
  94. +4 −4 patches/common/chromium/add_realloc.patch
  95. +2 −2 patches/common/chromium/allow_webview_file_url.patch
  96. +0 −19 patches/common/chromium/app_indicator_icon_menu.patch
  97. +2 −2 patches/common/chromium/blink-worker-enable-csp-in-file-scheme.patch
  98. +2 −2 patches/common/chromium/blink_file_path.patch
  99. +2 −2 patches/common/chromium/blink_fix_prototype_assert.patch
  100. +4 −4 patches/common/chromium/blink_initialization_order.patch
  101. +3 −3 patches/common/chromium/blink_local_frame.patch
  102. +6 −6 patches/common/chromium/blink_world_context.patch
  103. +4 −4 patches/common/chromium/boringssl_build_gn.patch
  104. +7 −7 patches/common/chromium/browser_compositor_mac.patch
  105. +2 −2 patches/common/chromium/build_gn.patch
  106. +20 −20 patches/common/chromium/can_create_window.patch
  107. +2 −2 patches/common/chromium/chrome_key_systems.patch
  108. +2 −2 patches/common/chromium/color_chooser.patch
  109. +3 −3 patches/common/chromium/command-ismediakey.patch
  110. +5 −5 patches/common/chromium/compositor_delegate.patch
  111. +9 −9 patches/common/chromium/content_allow_embedder_to_prevent_locking_scheme_registry.patch
  112. +2 −2 patches/common/chromium/content_browser_main_loop.patch
  113. +4 −4 patches/common/chromium/cross_site_document_resource_handler.patch
  114. +0 −113 patches/common/chromium/customizable_app_indicator_id_prefix.patch
  115. +6 −6 patches/common/chromium/dcheck.patch
  116. +1 −1 patches/common/chromium/desktop_media_list.patch
  117. +7 −7 patches/common/chromium/disable-redraw-lock.patch
  118. +34 −34 patches/common/chromium/disable_color_correct_rendering.patch
  119. +3 −1 patches/common/chromium/disable_detach_webview_frame.patch
  120. +3 −3 patches/common/chromium/disable_hidden.patch
  121. +27 −0 patches/common/chromium/disable_time_ticks_dcheck.patch
  122. +2 −2 patches/common/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch
  123. +35 −0 patches/common/chromium/dom_storage_limits.patch
  124. +2 −2 patches/common/chromium/exclude-a-few-test-files-from-build.patch
  125. +364 −0 patches/common/chromium/fix_test_compilation_error.patch
  126. +0 −240 patches/common/chromium/fix_trackpad_scrolling.patch
  127. +8 −8 patches/common/chromium/frame_host_manager.patch
  128. +3 −3 patches/common/chromium/gin_enable_disable_v8_platform.patch
  129. +3 −3 patches/common/chromium/gritsettings_resource_ids.patch
  130. +2 −2 patches/common/chromium/ignore_rc_check.patch
  131. +1 −1 patches/common/chromium/isolate_holder.patch
  132. +1 −1 patches/common/chromium/mas-audiodeviceduck.patch
  133. +3 −3 patches/common/chromium/mas-cfisobjc.patch
  134. +1 −1 patches/common/chromium/mas-cgdisplayusesforcetogray.patch
  135. +1 −1 patches/common/chromium/mas-lssetapplicationlaunchservicesserverconnectionstatus.patch
  136. +3 −3 patches/common/chromium/mas_blink_no_private_api.patch
  137. +34 −34 patches/common/chromium/mas_no_private_api.patch
  138. +2 −2 patches/common/chromium/net_url_request_job.patch
  139. +2 −2 patches/common/chromium/no_cache_storage_check.patch
  140. +1 −1 patches/common/chromium/notification_provenance.patch
  141. +2 −2 patches/common/chromium/out_of_process_instance.patch
  142. +4 −4 patches/common/chromium/pepper_flash.patch
  143. +39 −39 patches/common/chromium/printing.patch
  144. +7 −7 patches/common/chromium/render_widget_host_view_base.patch
  145. +8 −8 patches/common/chromium/render_widget_host_view_mac.patch
  146. +13 −11 patches/common/chromium/resource_file_conflict.patch
  147. +2 −2 patches/common/chromium/scroll_bounce_flag.patch
  148. +11 −14 patches/common/chromium/ssl_security_state_tab_helper.patch
  149. +5 −5 patches/common/chromium/support_mixed_sandbox_with_zygote.patch
  150. +21 −25 patches/common/chromium/tts.patch
  151. +6 −6 patches/common/chromium/web_contents.patch
  152. +12 −12 patches/common/chromium/webgl_context_attributes.patch
  153. +3 −3 patches/common/chromium/webview_cross_drag.patch
  154. +0 −52 patches/common/chromium/windows_cc_wrapper.patch
  155. +10 −10 patches/common/chromium/worker_context_will_destroy.patch
  156. +2 −0 patches/common/config.json
  157. +1 −0 patches/common/swiftshader/.patches
  158. +38 −0 patches/common/swiftshader/fix_arm64.patch
  159. +2 −4 patches/common/v8/.patches
  160. +0 −112 patches/common/v8/0001-deps-cherry-pick-0483e9a-from-upstream-V8.patch
  161. +0 −136 patches/common/v8/0002-deps-cherry-pick-b87d408-from-upstream-V8.patch
  162. +0 −180 patches/common/v8/0003-deps-cherry-pick-073073b-from-upstream-V8.patch
  163. +4 −4 patches/common/v8/add_realloc.patch
  164. +5 −5 patches/common/v8/array_buffer.patch
  165. +9 −9 patches/common/v8/build-torque-with-x64-toolchain-on-arm.patch
  166. +5 −5 patches/common/v8/build_gn.patch
  167. +4 −4 patches/common/v8/dcheck.patch
  168. +2 −2 patches/common/v8/deps_backport_detailed_line_info_for_cpu_profiler.patch
  169. +5 −99 ...eps-cherry-pick-88f8fe1-from-upstream-V8.patch → deps_cherry-pick_88f8fe1_from_upstream_v8.patch}
  170. +25 −25 patches/common/v8/deps_provide_more_v8_backwards_compatibility.patch
  171. +2 −2 patches/common/v8/do_not_run_arm_arm64_mksnapshot_binaries.patch
  172. +2 −2 patches/common/v8/export_platform.patch
  173. +4 −4 patches/common/v8/expose_mksnapshot.patch
  174. +719 −0 patches/common/v8/reland_don_t_use_v8_initializers_code_in_v8_base.patch
  175. +2 −1 spec/api-browser-window-spec.js
  176. +14 −1 spec/api-session-spec.js
  177. +2 −0 spec/api-web-contents-spec.js
  178. +4 −2 spec/webview-spec.js
@@ -167,6 +167,7 @@ step-gn-gen-default: &step-gn-gen-default
step-electron-build: &step-electron-build
run:
name: Electron build
no_output_timeout: 30m
command: |
cd src
ninja -C out/Default electron -j18
@@ -1,8 +1,3 @@
import("build/asar.gni")
import("build/npm.gni")
import("buildflags/buildflags.gni")
import("electron_paks.gni")
import("filenames.gni")
import("//build/config/locales.gni")
import("//build/config/ui.gni")
import("//build/config/win/manifest.gni")
@@ -14,6 +9,11 @@ import("//tools/grit/grit_rule.gni")
import("//tools/grit/repack.gni")
import("//tools/v8_context_snapshot/v8_context_snapshot.gni")
import("//v8/snapshot_toolchain.gni")
import("build/asar.gni")
import("build/npm.gni")
import("buildflags/buildflags.gni")
import("electron_paks.gni")
import("filenames.gni")

if (is_mac) {
import("//build/config/mac/rules.gni")
@@ -421,7 +421,6 @@ static_library("electron_lib") {

if (enable_osr) {
sources += [
"atom/browser/api/atom_api_web_contents_osr.cc",
"atom/browser/osr/osr_output_device.cc",
"atom/browser/osr/osr_output_device.h",
"atom/browser/osr/osr_render_widget_host_view.cc",
4 DEPS
@@ -10,9 +10,9 @@ gclient_gn_args = [

vars = {
'chromium_version':
'71.0.3578.98',
'72.0.3626.52',
'node_version':
'aeae08cda811ed122918bfd48fd9e56f8204d818',
'ad2c89ec3be0f5db3ea02b0f591d36a5d84c51ad',

'boto_version': 'f7574aa6cc2c819430c1f05e9a1a1a666ef8169b',
'pyyaml_version': '3.12',
@@ -8,6 +8,10 @@
#include <memory>
#include <string>

#if defined(OS_LINUX)
#include <glib.h> // for g_setenv()
#endif

#include "atom/app/atom_content_client.h"
#include "atom/browser/atom_browser_client.h"
#include "atom/browser/relauncher.h"
@@ -182,6 +186,36 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
return false;
}

void AtomMainDelegate::PostEarlyInitialization(bool is_running_tests) {
std::string custom_locale;
ui::ResourceBundle::InitSharedInstanceWithLocale(
custom_locale, nullptr, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
auto* cmd_line = base::CommandLine::ForCurrentProcess();
if (cmd_line->HasSwitch(::switches::kLang)) {
const std::string locale = cmd_line->GetSwitchValueASCII(::switches::kLang);
const base::FilePath locale_file_path =
ui::ResourceBundle::GetSharedInstance().GetLocaleFilePath(locale, true);
if (!locale_file_path.empty()) {
custom_locale = locale;
#if defined(OS_LINUX)
/* When built with USE_GLIB, libcc's GetApplicationLocaleInternal() uses
* glib's g_get_language_names(), which keys off of getenv("LC_ALL") */
g_setenv("LC_ALL", custom_locale.c_str(), TRUE);
#endif
}
}

#if defined(OS_MACOSX)
if (custom_locale.empty())
l10n_util::OverrideLocaleWithCocoaLocale();
#endif

LoadResourceBundle(custom_locale);

AtomBrowserClient::SetApplicationLocale(
l10n_util::GetApplicationLocale(custom_locale));
}

void AtomMainDelegate::PreSandboxStartup() {
auto* command_line = base::CommandLine::ForCurrentProcess();

@@ -25,6 +25,7 @@ class AtomMainDelegate : public content::ContentMainDelegate {
bool BasicStartupComplete(int* exit_code) override;
void PreSandboxStartup() override;
void PreCreateMainMessageLoop() override;
void PostEarlyInitialization(bool is_running_tests) override;
content::ContentBrowserClient* CreateContentBrowserClient() override;
content::ContentRendererClient* CreateContentRendererClient() override;
content::ContentUtilityClient* CreateContentUtilityClient() override;
@@ -30,7 +30,7 @@
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
#include "base/sys_info.h"
#include "base/system/sys_info.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/icon_manager.h"
#include "chrome/common/chrome_paths.h"
@@ -780,24 +780,24 @@ void App::OnGpuProcessCrashed(base::TerminationStatus status) {

void App::BrowserChildProcessLaunchedAndConnected(
const content::ChildProcessData& data) {
ChildProcessLaunched(data.process_type, data.GetHandle());
ChildProcessLaunched(data.process_type, data.GetProcess().Handle());
}

void App::BrowserChildProcessHostDisconnected(
const content::ChildProcessData& data) {
ChildProcessDisconnected(base::GetProcId(data.GetHandle()));
ChildProcessDisconnected(base::GetProcId(data.GetProcess().Handle()));
}

void App::BrowserChildProcessCrashed(
const content::ChildProcessData& data,
const content::ChildProcessTerminationInfo& info) {
ChildProcessDisconnected(base::GetProcId(data.GetHandle()));
ChildProcessDisconnected(base::GetProcId(data.GetProcess().Handle()));
}

void App::BrowserChildProcessKilled(
const content::ChildProcessData& data,
const content::ChildProcessTerminationInfo& info) {
ChildProcessDisconnected(base::GetProcId(data.GetHandle()));
ChildProcessDisconnected(base::GetProcId(data.GetProcess().Handle()));
}

void App::RenderProcessReady(content::RenderProcessHost* host) {
@@ -1401,7 +1401,9 @@ void Initialize(v8::Local<v8::Object> exports,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("App", atom::api::App::GetConstructor(isolate)->GetFunction());
dict.Set("App", atom::api::App::GetConstructor(isolate)
->GetFunction(context)
.ToLocalChecked());
dict.Set("app", atom::api::App::Create(isolate));
#if defined(OS_MACOSX)
auto browser = base::Unretained(Browser::Get());
@@ -147,7 +147,9 @@ void Initialize(v8::Local<v8::Object> exports,
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("autoUpdater", AutoUpdater::Create(isolate));
dict.Set("AutoUpdater", AutoUpdater::GetConstructor(isolate)->GetFunction());
dict.Set("AutoUpdater", AutoUpdater::GetConstructor(isolate)
->GetFunction(context)
.ToLocalChecked());
}

} // namespace
@@ -159,8 +159,9 @@ void Initialize(v8::Local<v8::Object> exports,
v8::Isolate* isolate = context->GetIsolate();
BrowserView::SetConstructor(isolate, base::Bind(&BrowserView::New));

mate::Dictionary browser_view(
isolate, BrowserView::GetConstructor(isolate)->GetFunction());
mate::Dictionary browser_view(isolate, BrowserView::GetConstructor(isolate)
->GetFunction(context)
.ToLocalChecked());
browser_view.SetMethod("fromId",
&mate::TrackableObject<BrowserView>::FromWeakMapID);
browser_view.SetMethod("getAllViews",
@@ -59,8 +59,9 @@ - (NSView*)hitTest:(NSPoint)aPoint {
// Make NativeWindow use a NSView as content view.
static_cast<NativeWindowMac*>(window())->OverrideNSWindowContentView();
// Add webview to contentView.
NSView* webView = iwc->GetView()->GetNativeView();
NSView* contentView = [window()->GetNativeWindow() contentView];
NSView* webView = iwc->GetView()->GetNativeView().GetNativeNSView();
NSView* contentView =
[window()->GetNativeWindow().GetNativeNSWindow() contentView];
[webView setFrame:[contentView bounds]];

// ensure that buttons view is floated to top of view hierarchy
@@ -80,7 +81,7 @@ - (NSView*)hitTest:(NSPoint)aPoint {
// All ControlRegionViews should be added as children of the WebContentsView,
// because WebContentsView will be removed and re-added when entering and
// leaving fullscreen mode.
NSView* webView = web_contents()->GetNativeView();
NSView* webView = web_contents()->GetNativeView().GetNativeNSView();
NSInteger webViewWidth = NSWidth([webView bounds]);
NSInteger webViewHeight = NSHeight([webView bounds]);

@@ -194,7 +194,9 @@ void Initialize(v8::Local<v8::Object> exports,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary(isolate, exports)
.Set("Debugger", Debugger::GetConstructor(isolate)->GetFunction());
.Set("Debugger", Debugger::GetConstructor(isolate)
->GetFunction(context)
.ToLocalChecked());
}

} // namespace
@@ -244,8 +244,9 @@ void Initialize(v8::Local<v8::Object> exports,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary(isolate, exports)
.Set("DownloadItem",
atom::api::DownloadItem::GetConstructor(isolate)->GetFunction());
.Set("DownloadItem", atom::api::DownloadItem::GetConstructor(isolate)
->GetFunction(context)
.ToLocalChecked());
}

} // namespace
@@ -132,8 +132,9 @@ void Initialize(v8::Local<v8::Object> exports,
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("inAppPurchase", InAppPurchase::Create(isolate));
dict.Set("InAppPurchase",
InAppPurchase::GetConstructor(isolate)->GetFunction());
dict.Set("InAppPurchase", InAppPurchase::GetConstructor(isolate)
->GetFunction(context)
.ToLocalChecked());
#endif
}

@@ -233,7 +233,9 @@ void Initialize(v8::Local<v8::Object> exports,
Menu::SetConstructor(isolate, base::Bind(&Menu::New));

mate::Dictionary dict(isolate, exports);
dict.Set("Menu", Menu::GetConstructor(isolate)->GetFunction());
dict.Set(
"Menu",
Menu::GetConstructor(isolate)->GetFunction(context).ToLocalChecked());
#if defined(OS_MACOSX)
dict.SetMethod("setApplicationMenu", &Menu::SetApplicationMenu);
dict.SetMethod("sendActionToFirstResponder",
@@ -56,7 +56,7 @@
base::Closure callback) {
if (!native_window)
return;
NSWindow* nswindow = native_window->GetNativeWindow();
NSWindow* nswindow = native_window->GetNativeWindow().GetNativeNSWindow();

auto close_callback = base::Bind(
&MenuMac::OnClosed, weak_factory_.GetWeakPtr(), window_id, callback);
@@ -99,7 +99,7 @@

[popup_controllers_[window_id] setCloseCallback:close_callback];
// Make sure events can be pumped while the menu is up.
base::MessageLoop::ScopedNestableTaskAllower allow;
base::MessageLoopCurrent::ScopedNestableTaskAllower allow;

// One of the events that could be pumped is |window.close()|.
// User-initiated event-tracking loops protect against this by
@@ -31,7 +31,9 @@ void Net::BuildPrototype(v8::Isolate* isolate,
}

v8::Local<v8::Value> Net::URLRequest(v8::Isolate* isolate) {
return URLRequest::GetConstructor(isolate)->GetFunction();
return URLRequest::GetConstructor(isolate)
->GetFunction(isolate->GetCurrentContext())
.ToLocalChecked();
}

} // namespace api
@@ -53,7 +55,8 @@ void Initialize(v8::Local<v8::Object> exports,

mate::Dictionary dict(isolate, exports);
dict.Set("net", Net::Create(isolate));
dict.Set("Net", Net::GetConstructor(isolate)->GetFunction());
dict.Set("Net",
Net::GetConstructor(isolate)->GetFunction(context).ToLocalChecked());
}

} // namespace
@@ -263,8 +263,9 @@ void Initialize(v8::Local<v8::Object> exports,
Notification::SetConstructor(isolate, base::Bind(&Notification::New));

mate::Dictionary dict(isolate, exports);
dict.Set("Notification",
Notification::GetConstructor(isolate)->GetFunction());
dict.Set("Notification", Notification::GetConstructor(isolate)
->GetFunction(context)
.ToLocalChecked());

dict.SetMethod("isSupported", &Notification::IsSupported);
}
@@ -141,8 +141,9 @@ void Initialize(v8::Local<v8::Object> exports,
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("powerMonitor", PowerMonitor::Create(isolate));
dict.Set("PowerMonitor",
PowerMonitor::GetConstructor(isolate)->GetFunction());
dict.Set("PowerMonitor", PowerMonitor::GetConstructor(isolate)
->GetFunction(context)
.ToLocalChecked());
}

} // namespace
@@ -164,7 +164,9 @@ void Initialize(v8::Local<v8::Object> exports,
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("screen", Screen::Create(isolate));
dict.Set("Screen", Screen::GetConstructor(isolate)->GetFunction());
dict.Set(
"Screen",
Screen::GetConstructor(isolate)->GetFunction(context).ToLocalChecked());
}

} // namespace
@@ -444,10 +444,9 @@ void Session::ClearStorageData(mate::Arguments* args) {
// https://w3c.github.io/mediacapture-main/#dom-mediadeviceinfo-deviceid
MediaDeviceIDSalt::Reset(browser_context()->prefs());
}
storage_partition->ClearData(
options.storage_types, options.quota_types, options.origin,
content::StoragePartition::OriginMatcherFunction(), base::Time(),
base::Time::Max(), base::Bind(&OnClearStorageDataDone, callback));
storage_partition->ClearData(options.storage_types, options.quota_types,
options.origin, base::Time(), base::Time::Max(),
base::Bind(&OnClearStorageDataDone, callback));
}

void Session::FlushStorageData() {
@@ -805,8 +804,12 @@ void Initialize(v8::Local<v8::Object> exports,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("Session", Session::GetConstructor(isolate)->GetFunction());
dict.Set("Cookies", Cookies::GetConstructor(isolate)->GetFunction());
dict.Set(
"Session",
Session::GetConstructor(isolate)->GetFunction(context).ToLocalChecked());
dict.Set(
"Cookies",
Cookies::GetConstructor(isolate)->GetFunction(context).ToLocalChecked());
dict.SetMethod("fromPartition", &FromPartition);
}

@@ -121,8 +121,9 @@ void Initialize(v8::Local<v8::Object> exports,
v8::Isolate* isolate = context->GetIsolate();
mate::Dictionary dict(isolate, exports);
dict.Set("systemPreferences", SystemPreferences::Create(isolate));
dict.Set("SystemPreferences",
SystemPreferences::GetConstructor(isolate)->GetFunction());
dict.Set("SystemPreferences", SystemPreferences::GetConstructor(isolate)
->GetFunction(context)
.ToLocalChecked());
}

} // namespace
@@ -1179,8 +1179,9 @@ void Initialize(v8::Local<v8::Object> exports,
v8::Isolate* isolate = context->GetIsolate();
TopLevelWindow::SetConstructor(isolate, base::Bind(&TopLevelWindow::New));

mate::Dictionary constructor(
isolate, TopLevelWindow::GetConstructor(isolate)->GetFunction());
mate::Dictionary constructor(isolate, TopLevelWindow::GetConstructor(isolate)
->GetFunction(context)
.ToLocalChecked());
constructor.SetMethod("fromId",
&mate::TrackableObject<TopLevelWindow>::FromWeakMapID);
constructor.SetMethod("getAllWindows",
@@ -254,7 +254,9 @@ void Initialize(v8::Local<v8::Object> exports,
Tray::SetConstructor(isolate, base::Bind(&Tray::New));

mate::Dictionary dict(isolate, exports);
dict.Set("Tray", Tray::GetConstructor(isolate)->GetFunction());
dict.Set(
"Tray",
Tray::GetConstructor(isolate)->GetFunction(context).ToLocalChecked());
}

} // namespace
@@ -76,8 +76,9 @@ void Initialize(v8::Local<v8::Object> exports,
v8::Isolate* isolate = context->GetIsolate();
View::SetConstructor(isolate, base::Bind(&View::New));

mate::Dictionary constructor(isolate,
View::GetConstructor(isolate)->GetFunction());
mate::Dictionary constructor(
isolate,
View::GetConstructor(isolate)->GetFunction(context).ToLocalChecked());

mate::Dictionary dict(isolate, exports);
dict.Set("View", constructor);
Oops, something went wrong.

0 comments on commit 1918e76

Please sign in to comment.