feat: Upgrade to Chromium 71.0.3578.98 (#15966)
This commit is contained in:
parent
92ddfd0d4c
commit
52fe92d02e
204 changed files with 2291 additions and 1760 deletions
|
@ -15,7 +15,7 @@
|
|||
#include "native_mate/wrappable.h"
|
||||
|
||||
#include "atom/common/node_includes.h"
|
||||
#include "atom_natives.h" // NOLINT: This file is generated with js2c.
|
||||
#include "third_party/electron_node/src/node_native_module.h"
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -122,23 +122,15 @@ void InitAsarSupport(v8::Isolate* isolate,
|
|||
v8::Local<v8::Value> source,
|
||||
v8::Local<v8::Value> require) {
|
||||
// Evaluate asar_init.js.
|
||||
v8::Local<v8::Context> context(isolate->GetCurrentContext());
|
||||
auto maybe_asar_init = v8::Script::Compile(
|
||||
context, node::asar_init_value.ToStringChecked(isolate));
|
||||
v8::Local<v8::Script> asar_init;
|
||||
v8::Local<v8::Value> result;
|
||||
if (maybe_asar_init.ToLocal(&asar_init))
|
||||
result = asar_init->Run(context).ToLocalChecked();
|
||||
std::vector<v8::Local<v8::String>> asar_init_params = {
|
||||
node::FIXED_ONE_BYTE_STRING(isolate, "source"),
|
||||
node::FIXED_ONE_BYTE_STRING(isolate, "require")};
|
||||
|
||||
// Initialize asar support.
|
||||
DCHECK(result->IsFunction());
|
||||
std::vector<v8::Local<v8::Value>> asar_init_args = {source, require};
|
||||
|
||||
v8::Local<v8::Value> args[] = {
|
||||
source,
|
||||
require,
|
||||
node::asar_value.ToStringChecked(isolate),
|
||||
};
|
||||
result.As<v8::Function>()->Call(result, 3, args);
|
||||
node::per_process::native_module_loader.CompileAndCall(
|
||||
isolate->GetCurrentContext(), "electron/js2c/asar_init",
|
||||
&asar_init_params, &asar_init_args, nullptr);
|
||||
}
|
||||
|
||||
void Initialize(v8::Local<v8::Object> exports,
|
||||
|
|
|
@ -22,7 +22,9 @@ struct Converter<CrashReporter::UploadReportResult> {
|
|||
v8::Isolate* isolate,
|
||||
const CrashReporter::UploadReportResult& reports) {
|
||||
mate::Dictionary dict(isolate, v8::Object::New(isolate));
|
||||
dict.Set("date", v8::Date::New(isolate, reports.first * 1000.0));
|
||||
dict.Set("date",
|
||||
v8::Date::New(isolate->GetCurrentContext(), reports.first * 1000.0)
|
||||
.ToLocalChecked());
|
||||
dict.Set("id", reports.second);
|
||||
return dict.GetHandle();
|
||||
}
|
||||
|
|
|
@ -273,7 +273,7 @@ v8::Local<v8::Value> NativeImage::ToPNG(mate::Arguments* args) {
|
|||
}
|
||||
|
||||
const SkBitmap bitmap =
|
||||
image_.AsImageSkia().GetRepresentation(scale_factor).sk_bitmap();
|
||||
image_.AsImageSkia().GetRepresentation(scale_factor).GetBitmap();
|
||||
std::vector<unsigned char> encoded;
|
||||
gfx::PNGCodec::EncodeBGRASkBitmap(bitmap, false, &encoded);
|
||||
const char* data = reinterpret_cast<char*>(encoded.data());
|
||||
|
@ -285,7 +285,7 @@ v8::Local<v8::Value> NativeImage::ToBitmap(mate::Arguments* args) {
|
|||
float scale_factor = GetScaleFactorFromOptions(args);
|
||||
|
||||
const SkBitmap bitmap =
|
||||
image_.AsImageSkia().GetRepresentation(scale_factor).sk_bitmap();
|
||||
image_.AsImageSkia().GetRepresentation(scale_factor).GetBitmap();
|
||||
SkPixelRef* ref = bitmap.pixelRef();
|
||||
if (!ref)
|
||||
return node::Buffer::New(args->isolate(), 0).ToLocalChecked();
|
||||
|
@ -317,14 +317,14 @@ std::string NativeImage::ToDataURL(mate::Arguments* args) {
|
|||
}
|
||||
|
||||
return webui::GetBitmapDataUrl(
|
||||
image_.AsImageSkia().GetRepresentation(scale_factor).sk_bitmap());
|
||||
image_.AsImageSkia().GetRepresentation(scale_factor).GetBitmap());
|
||||
}
|
||||
|
||||
v8::Local<v8::Value> NativeImage::GetBitmap(mate::Arguments* args) {
|
||||
float scale_factor = GetScaleFactorFromOptions(args);
|
||||
|
||||
const SkBitmap bitmap =
|
||||
image_.AsImageSkia().GetRepresentation(scale_factor).sk_bitmap();
|
||||
image_.AsImageSkia().GetRepresentation(scale_factor).GetBitmap();
|
||||
SkPixelRef* ref = bitmap.pixelRef();
|
||||
if (!ref)
|
||||
return node::Buffer::New(args->isolate(), 0).ToLocalChecked();
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include "third_party/blink/public/platform/web_mouse_event.h"
|
||||
#include "third_party/blink/public/platform/web_mouse_wheel_event.h"
|
||||
#include "third_party/blink/public/web/web_device_emulation_params.h"
|
||||
#include "third_party/blink/public/web/web_find_options.h"
|
||||
#include "ui/base/clipboard/clipboard.h"
|
||||
#include "ui/events/keycodes/dom/keycode_converter.h"
|
||||
#include "ui/events/keycodes/keyboard_code_conversion.h"
|
||||
|
@ -368,19 +367,6 @@ bool Converter<blink::WebDeviceEmulationParams>::FromV8(
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Converter<blink::WebFindOptions>::FromV8(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> val,
|
||||
blink::WebFindOptions* out) {
|
||||
mate::Dictionary dict;
|
||||
if (!ConvertFromV8(isolate, val, &dict))
|
||||
return false;
|
||||
|
||||
dict.Get("forward", &out->forward);
|
||||
dict.Get("matchCase", &out->match_case);
|
||||
dict.Get("findNext", &out->find_next);
|
||||
return true;
|
||||
}
|
||||
|
||||
// static
|
||||
v8::Local<v8::Value> Converter<blink::WebContextMenuData::MediaType>::ToV8(
|
||||
v8::Isolate* isolate,
|
||||
|
|
|
@ -15,7 +15,6 @@ class WebMouseEvent;
|
|||
class WebMouseWheelEvent;
|
||||
class WebKeyboardEvent;
|
||||
struct WebDeviceEmulationParams;
|
||||
struct WebFindOptions;
|
||||
struct WebFloatPoint;
|
||||
struct WebPoint;
|
||||
struct WebSize;
|
||||
|
@ -95,13 +94,6 @@ struct Converter<blink::WebDeviceEmulationParams> {
|
|||
blink::WebDeviceEmulationParams* out);
|
||||
};
|
||||
|
||||
template <>
|
||||
struct Converter<blink::WebFindOptions> {
|
||||
static bool FromV8(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> val,
|
||||
blink::WebFindOptions* out);
|
||||
};
|
||||
|
||||
template <>
|
||||
struct Converter<blink::WebContextMenuData::MediaType> {
|
||||
static v8::Local<v8::Value> ToV8(
|
||||
|
|
|
@ -30,7 +30,8 @@
|
|||
#undef NO_RETURN
|
||||
#undef LIKELY
|
||||
#undef arraysize
|
||||
#undef debug_string // This is defined in macOS SDK in AssertMacros.h.
|
||||
#undef debug_string // This is defined in macOS SDK in AssertMacros.h.
|
||||
#undef require_string // This is defined in macOS SDK in AssertMacros.h.
|
||||
#include "env-inl.h"
|
||||
#include "env.h"
|
||||
#include "node.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue