chore: bump chromium to 7dff37844cb3 (master) (#18059)
This commit is contained in:
parent
00358545a9
commit
2616911f7a
77 changed files with 1636 additions and 294 deletions
|
@ -530,9 +530,9 @@ int ImportIntoCertStore(CertificateManagerModel* model,
|
|||
}
|
||||
#endif
|
||||
|
||||
void OnIconDataAvailable(util::Promise promise, gfx::Image* icon) {
|
||||
if (icon && !icon->IsEmpty()) {
|
||||
promise.Resolve(*icon);
|
||||
void OnIconDataAvailable(util::Promise promise, gfx::Image icon) {
|
||||
if (!icon.IsEmpty()) {
|
||||
promise.Resolve(icon);
|
||||
} else {
|
||||
promise.RejectWithErrorMessage("Failed to get file icon.");
|
||||
}
|
||||
|
|
|
@ -64,11 +64,17 @@ void AutoUpdater::OnError(const std::string& message,
|
|||
auto errorObject =
|
||||
error->ToObject(isolate()->GetCurrentContext()).ToLocalChecked();
|
||||
|
||||
auto context = isolate()->GetCurrentContext();
|
||||
|
||||
// add two new params for better error handling
|
||||
errorObject->Set(mate::StringToV8(isolate(), "code"),
|
||||
v8::Integer::New(isolate(), code));
|
||||
errorObject->Set(mate::StringToV8(isolate(), "domain"),
|
||||
mate::StringToV8(isolate(), domain));
|
||||
errorObject
|
||||
->Set(context, mate::StringToV8(isolate(), "code"),
|
||||
v8::Integer::New(isolate(), code))
|
||||
.Check();
|
||||
errorObject
|
||||
->Set(context, mate::StringToV8(isolate(), "domain"),
|
||||
mate::StringToV8(isolate(), domain))
|
||||
.Check();
|
||||
|
||||
mate::EmitEvent(isolate(), GetWrapper(), "error", errorObject, message);
|
||||
}
|
||||
|
|
|
@ -491,12 +491,14 @@ void WebContents::DestroyWebContents(bool async) {
|
|||
ResetManagedWebContents(async);
|
||||
}
|
||||
|
||||
bool WebContents::DidAddMessageToConsole(content::WebContents* source,
|
||||
int32_t level,
|
||||
const base::string16& message,
|
||||
int32_t line_no,
|
||||
const base::string16& source_id) {
|
||||
return Emit("console-message", level, message, line_no, source_id);
|
||||
bool WebContents::DidAddMessageToConsole(
|
||||
content::WebContents* source,
|
||||
blink::mojom::ConsoleMessageLevel level,
|
||||
const base::string16& message,
|
||||
int32_t line_no,
|
||||
const base::string16& source_id) {
|
||||
return Emit("console-message", static_cast<int32_t>(level), message, line_no,
|
||||
source_id);
|
||||
}
|
||||
|
||||
void WebContents::OnCreateWindow(
|
||||
|
|
|
@ -336,7 +336,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
|
|||
|
||||
// content::WebContentsDelegate:
|
||||
bool DidAddMessageToConsole(content::WebContents* source,
|
||||
int32_t level,
|
||||
blink::mojom::ConsoleMessageLevel level,
|
||||
const base::string16& message,
|
||||
int32_t line_no,
|
||||
const base::string16& source_id) override;
|
||||
|
|
|
@ -52,7 +52,10 @@ void Event::FrameDeleted(content::RenderFrameHost* rfh) {
|
|||
}
|
||||
|
||||
void Event::PreventDefault(v8::Isolate* isolate) {
|
||||
GetWrapper()->Set(StringToV8(isolate, "defaultPrevented"), v8::True(isolate));
|
||||
GetWrapper()
|
||||
->Set(isolate->GetCurrentContext(),
|
||||
StringToV8(isolate, "defaultPrevented"), v8::True(isolate))
|
||||
.Check();
|
||||
}
|
||||
|
||||
bool Event::SendReply(const base::ListValue& result) {
|
||||
|
|
|
@ -108,8 +108,13 @@ class EventEmitter : public Wrappable<T> {
|
|||
v8::HandleScope handle_scope(isolate());
|
||||
EmitEvent(isolate(), GetWrapper(), name, event,
|
||||
std::forward<Args>(args)...);
|
||||
return event->Get(StringToV8(isolate(), "defaultPrevented"))
|
||||
->BooleanValue(isolate());
|
||||
auto context = isolate()->GetCurrentContext();
|
||||
v8::Local<v8::Value> defaultPrevented;
|
||||
if (event->Get(context, StringToV8(isolate(), "defaultPrevented"))
|
||||
.ToLocal(&defaultPrevented)) {
|
||||
return defaultPrevented->BooleanValue(isolate());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(EventEmitter);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue