chore: bump chromium to 92.0.4505.0 (master) (#29058)
* chore: bump chromium in DEPS to 92.0.4500.2 * resolve conflicts * update patches * chore: cherry-pick 82434206f306 from chromium (#29060) * fix patch * chore: bump chromium in DEPS to 92.0.4501.0 * chore: bump chromium in DEPS to 92.0.4502.0 * chore: bump chromium in DEPS to 92.0.4503.0 * chore: update patches *2869869
: [Code Health] Refactor ListValue::Insert in gpu compositor2869869
* 2877924: Separate InkDropHost from InkDropHostView2877924
* chore: bump chromium in DEPS to 92.0.4504.0 * update patches * Fixup for Separate InkDropHost from InkDropHostView2877924
* 2873469: Compute hashes of .pak files during the build, and check it at runtime.2873469
* 2874397: Remove flag to disable microtasks scope consistency checks2874397
* 2881471: Remove unneeded trace_event.h includes in headers.2881471
* 2844717: [Keyboard Tooltip] Rename RWHV*::SetTooltipText to UpdateTooltipUnderCursor2844717
* chore: bump chromium in DEPS to 92.0.4505.0 * chore: update patches * 2883887: Retire ScopedObserver in /chrome/browser/predictors.2883887
* 2883694: Retire ScopedObserver in /chrome/browser.2883694
* fixup after merge * fixup: Remove flag to disable microtasks scope consistency checks * Temporarily disable setcallhandler-test.js nan test This test should be renabled once https://github.com/electron/electron/pull/29028 lands * Use gin_helper::MicrotasksScope instead of v8::MicrotasksScope * chore: bump chromium in DEPS to 92.0.4506.0 * update patches * Revert "update patches" This reverts commit 333ec0d4c205bd3cbee28d2bc3d068871dbb900a. * Revert "chore: bump chromium in DEPS to 92.0.4506.0" This reverts commit 2bd52f8cd89b173c8b15a61d74fa7539cdbf574b. * Fixup: Use gin_helper::MicrotasksScope instead of v8::MicrotasksScope * Fixup: Use gin_helper::MicrotasksScope instead of v8::MicrotasksScope Co-authored-by: Jeremy Rose <nornagon@nornagon.net> Co-authored-by: Jeremy Rose <jeremya@chromium.org> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
This commit is contained in:
parent
9cf71d72ab
commit
2eb3bddb05
66 changed files with 286 additions and 244 deletions
|
@ -1377,9 +1377,7 @@ std::vector<gin_helper::Dictionary> App::GetAppMetrics(v8::Isolate* isolate) {
|
|||
}
|
||||
|
||||
v8::Local<v8::Value> App::GetGPUFeatureStatus(v8::Isolate* isolate) {
|
||||
auto status = content::GetFeatureStatus();
|
||||
base::DictionaryValue temp;
|
||||
return gin::ConvertToV8(isolate, status ? *status : temp);
|
||||
return gin::ConvertToV8(isolate, content::GetFeatureStatus());
|
||||
}
|
||||
|
||||
v8::Local<v8::Promise> App::GetGPUInfo(v8::Isolate* isolate,
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "base/optional.h"
|
||||
#include "base/task/thread_pool.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
#include "base/trace_event/trace_config.h"
|
||||
#include "content/public/browser/tracing_controller.h"
|
||||
#include "shell/common/gin_converters/callback_converter.h"
|
||||
#include "shell/common/gin_converters/file_path_converter.h"
|
||||
|
|
|
@ -49,7 +49,7 @@ FileSelectHelper::FileSelectHelper(
|
|||
DCHECK(web_contents_);
|
||||
|
||||
content::WebContentsObserver::Observe(web_contents_);
|
||||
observer_.Add(render_frame_host_->GetRenderViewHost()->GetWidget());
|
||||
observation_.Observe(render_frame_host_->GetRenderViewHost()->GetWidget());
|
||||
}
|
||||
|
||||
FileSelectHelper::~FileSelectHelper() = default;
|
||||
|
@ -235,7 +235,8 @@ void FileSelectHelper::OnFilesSelected(
|
|||
void FileSelectHelper::RenderWidgetHostDestroyed(
|
||||
content::RenderWidgetHost* widget_host) {
|
||||
render_frame_host_ = nullptr;
|
||||
observer_.Remove(widget_host);
|
||||
DCHECK(observation_.IsObservingSource(widget_host));
|
||||
observation_.Reset();
|
||||
}
|
||||
|
||||
// content::WebContentsObserver:
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <vector>
|
||||
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/scoped_observation.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "content/public/browser/file_select_listener.h"
|
||||
#include "content/public/browser/render_frame_host.h"
|
||||
|
@ -100,8 +101,9 @@ class FileSelectHelper : public content::WebContentsObserver,
|
|||
scoped_refptr<content::FileSelectListener> listener_;
|
||||
FileChooserParams::Mode mode_;
|
||||
|
||||
ScopedObserver<content::RenderWidgetHost, content::RenderWidgetHostObserver>
|
||||
observer_{this};
|
||||
base::ScopedObservation<content::RenderWidgetHost,
|
||||
content::RenderWidgetHostObserver>
|
||||
observation_{this};
|
||||
|
||||
// Temporary files only used on OSX. This class is responsible for deleting
|
||||
// these files when they are no longer needed.
|
||||
|
|
|
@ -456,7 +456,8 @@ void OffScreenRenderWidgetHostView::Destroy() {
|
|||
delete this;
|
||||
}
|
||||
|
||||
void OffScreenRenderWidgetHostView::SetTooltipText(const std::u16string&) {}
|
||||
void OffScreenRenderWidgetHostView::UpdateTooltipUnderCursor(
|
||||
const std::u16string&) {}
|
||||
|
||||
uint32_t OffScreenRenderWidgetHostView::GetCaptureSequenceNumber() const {
|
||||
return latest_capture_sequence_number_;
|
||||
|
|
|
@ -121,7 +121,7 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
|
|||
void ImeCancelComposition(void) override;
|
||||
void RenderProcessGone() override;
|
||||
void Destroy(void) override;
|
||||
void SetTooltipText(const std::u16string&) override;
|
||||
void UpdateTooltipUnderCursor(const std::u16string&) override;
|
||||
content::CursorManager* GetCursorManager() override;
|
||||
void CopyFromSurface(
|
||||
const gfx::Rect& src_rect,
|
||||
|
|
|
@ -35,10 +35,10 @@ SubmenuButton::SubmenuButton(PressedCallback callback,
|
|||
gfx::Canvas::SizeStringInt(GetText(), gfx::FontList(), &text_width_,
|
||||
&text_height_, 0, 0);
|
||||
|
||||
SetInkDropMode(InkDropMode::ON);
|
||||
SetInkDropBaseColor(
|
||||
ink_drop()->SetMode(views::InkDropHost::InkDropMode::ON);
|
||||
ink_drop()->SetBaseColor(
|
||||
color_utils::BlendTowardMaxContrast(background_color_, 0x81));
|
||||
views::InkDrop::UseInkDropForFloodFillRipple(this, false, true);
|
||||
views::InkDrop::UseInkDropForFloodFillRipple(ink_drop(), false, true);
|
||||
}
|
||||
|
||||
SubmenuButton::~SubmenuButton() = default;
|
||||
|
|
|
@ -9,13 +9,14 @@
|
|||
namespace gin_helper {
|
||||
|
||||
MicrotasksScope::MicrotasksScope(v8::Isolate* isolate,
|
||||
bool ignore_browser_checkpoint) {
|
||||
bool ignore_browser_checkpoint,
|
||||
v8::MicrotasksScope::Type scope_type) {
|
||||
if (Locker::IsBrowserProcess()) {
|
||||
if (!ignore_browser_checkpoint)
|
||||
v8::MicrotasksScope::PerformCheckpoint(isolate);
|
||||
} else {
|
||||
v8_microtasks_scope_ = std::make_unique<v8::MicrotasksScope>(
|
||||
isolate, v8::MicrotasksScope::kRunMicrotasks);
|
||||
v8_microtasks_scope_ =
|
||||
std::make_unique<v8::MicrotasksScope>(isolate, scope_type);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,9 @@ namespace gin_helper {
|
|||
class MicrotasksScope {
|
||||
public:
|
||||
explicit MicrotasksScope(v8::Isolate* isolate,
|
||||
bool ignore_browser_checkpoint = false);
|
||||
bool ignore_browser_checkpoint = false,
|
||||
v8::MicrotasksScope::Type scope_type =
|
||||
v8::MicrotasksScope::kRunMicrotasks);
|
||||
~MicrotasksScope();
|
||||
|
||||
private:
|
||||
|
|
|
@ -174,6 +174,8 @@ bool AllowWasmCodeGenerationCallback(v8::Local<v8::Context> context,
|
|||
void ErrorMessageListener(v8::Local<v8::Message> message,
|
||||
v8::Local<v8::Value> data) {
|
||||
v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
isolate, v8::MicrotasksScope::kDoNotRunMicrotasks);
|
||||
node::Environment* env = node::Environment::GetCurrent(isolate);
|
||||
|
||||
if (env) {
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <vector>
|
||||
|
||||
#include "gin/converter.h"
|
||||
#include "shell/common/gin_helper/microtasks_scope.h"
|
||||
#include "third_party/blink/public/common/messaging/cloneable_message.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
|
@ -24,6 +25,8 @@ class V8Serializer : public v8::ValueSerializer::Delegate {
|
|||
~V8Serializer() override = default;
|
||||
|
||||
bool Serialize(v8::Local<v8::Value> value, blink::CloneableMessage* out) {
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
isolate_, v8::MicrotasksScope::kDoNotRunMicrotasks);
|
||||
WriteBlinkEnvelope(19);
|
||||
|
||||
serializer_.WriteHeader();
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "components/spellcheck/renderer/spellcheck_worditerator.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "shell/common/gin_helper/function_template.h"
|
||||
#include "shell/common/gin_helper/microtasks_scope.h"
|
||||
#include "third_party/blink/public/web/web_text_checking_completion.h"
|
||||
#include "third_party/blink/public/web/web_text_checking_result.h"
|
||||
#include "third_party/icu/source/common/unicode/uscript.h"
|
||||
|
@ -219,6 +220,9 @@ void SpellCheckClient::SpellCheckWords(const SpellCheckScope& scope,
|
|||
const std::set<std::u16string>& words) {
|
||||
DCHECK(!scope.spell_check_.IsEmpty());
|
||||
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
isolate_, v8::MicrotasksScope::kDoNotRunMicrotasks);
|
||||
|
||||
v8::Local<v8::FunctionTemplate> templ = gin_helper::CreateFunctionTemplate(
|
||||
isolate_,
|
||||
base::BindRepeating(&SpellCheckClient::OnSpellCheckDone, AsWeakPtr()));
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "net/base/net_module.h"
|
||||
#include "net/grit/net_resources.h"
|
||||
#include "services/service_manager/public/cpp/interface_provider.h"
|
||||
#include "shell/common/gin_helper/microtasks_scope.h"
|
||||
#include "shell/common/options_switches.h"
|
||||
#include "shell/common/world_ids.h"
|
||||
#include "third_party/blink/public/common/browser_interface_broker_proxy.h"
|
||||
|
@ -63,6 +64,10 @@ void ElectronRenderFrameObserver::DidClearWindowObject() {
|
|||
void ElectronRenderFrameObserver::DidInstallConditionalFeatures(
|
||||
v8::Handle<v8::Context> context,
|
||||
int world_id) {
|
||||
auto* isolate = context->GetIsolate();
|
||||
v8::MicrotasksScope microtasks_scope(
|
||||
isolate, v8::MicrotasksScope::kDoNotRunMicrotasks);
|
||||
|
||||
if (ShouldNotifyClient(world_id))
|
||||
renderer_client_->DidCreateScriptContext(context, render_frame_);
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "shell/common/api/electron_bindings.h"
|
||||
#include "shell/common/application_info.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "shell/common/gin_helper/microtasks_scope.h"
|
||||
#include "shell/common/node_bindings.h"
|
||||
#include "shell/common/node_includes.h"
|
||||
#include "shell/common/node_util.h"
|
||||
|
@ -168,6 +169,8 @@ void ElectronSandboxedRendererClient::RunScriptsAtDocumentStart(
|
|||
return;
|
||||
|
||||
auto* isolate = blink::MainThreadIsolate();
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
isolate, v8::MicrotasksScope::kDoNotRunMicrotasks);
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
|
||||
v8::Local<v8::Context> context =
|
||||
|
@ -184,6 +187,8 @@ void ElectronSandboxedRendererClient::RunScriptsAtDocumentEnd(
|
|||
return;
|
||||
|
||||
auto* isolate = blink::MainThreadIsolate();
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
isolate, v8::MicrotasksScope::kDoNotRunMicrotasks);
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
|
||||
v8::Local<v8::Context> context =
|
||||
|
@ -269,6 +274,8 @@ void ElectronSandboxedRendererClient::WillReleaseScriptContext(
|
|||
return;
|
||||
|
||||
auto* isolate = context->GetIsolate();
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
isolate, v8::MicrotasksScope::kDoNotRunMicrotasks);
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
v8::Context::Scope context_scope(context);
|
||||
InvokeHiddenCallback(context, kLifecycleKey, "onExit");
|
||||
|
|
|
@ -45,6 +45,9 @@ WebWorkerObserver::~WebWorkerObserver() {
|
|||
void WebWorkerObserver::WorkerScriptReadyForEvaluation(
|
||||
v8::Local<v8::Context> worker_context) {
|
||||
v8::Context::Scope context_scope(worker_context);
|
||||
auto* isolate = worker_context->GetIsolate();
|
||||
v8::MicrotasksScope microtasks_scope(
|
||||
isolate, v8::MicrotasksScope::kDoNotRunMicrotasks);
|
||||
|
||||
// Start the embed thread.
|
||||
node_bindings_->PrepareMessageLoop();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue