electron/patches/chromium/blink_world_context.patch

52 lines
2.6 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2018-09-21 00:30:26 +00:00
From: Anonymous <anonymous@electronjs.org>
Date: Thu, 20 Sep 2018 17:45:11 -0700
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
2019-05-21 17:05:21 +00:00
index 82fb3fdfe6bfa8c8d885ee133270b6f2564325a8..f3bad71eab608d3b9ac0e08446c9e520f47e9b10 100644
--- a/third_party/blink/public/web/web_local_frame.h
+++ b/third_party/blink/public/web/web_local_frame.h
2019-05-21 17:05:21 +00:00
@@ -355,6 +355,9 @@ class WebLocalFrame : public WebFrame {
// be calling this API.
virtual v8::Local<v8::Context> MainWorldScriptContext() const = 0;
+ virtual v8::Local<v8::Context> WorldScriptContext(
+ v8::Isolate* isolate, int world_id) const = 0;
+
// Executes script in the context of the current page and returns the value
// 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 e12642b4703474840a490f426b90c61141f9881e..2610245d88af53e116faa825df264fd9d9babc05 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
2019-05-21 17:05:21 +00:00
@@ -873,6 +873,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
return MainWorldScriptContext()->Global();
}
+v8::Local<v8::Context> WebLocalFrameImpl::WorldScriptContext(
+ v8::Isolate* isolate, int world_id) const {
+ scoped_refptr<DOMWrapperWorld> world = DOMWrapperWorld::EnsureIsolatedWorld(
+ isolate, world_id);
+ return ToScriptState(GetFrame(), *world)->GetContext();
+}
+
bool WebFrame::ScriptCanAccess(WebFrame* target) {
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
chore: bump chromium to 2a7aff41ce73adc0eeee67d364989 (master) (#18505) * chore: bump chromium in DEPS to 07463d3cd628b037c11f36022cb4c788db4628e3 * chore: update patches * fix: Don't leak system network context when nw service is disabled https://chromium-review.googlesource.com/c/chromium/src/+/1632494 NetworkService is now deleted by using SequnceLocalStorageSlot on the IO thread when the service is disabled, which expects all associated NetworkContexts on that sequence to be destroyed. * chore: bump chromium in DEPS to 7c16850e7e40990e141f47101b737ec1092175a1 * fix: Destroy all network contexts before primary network context * Simplify out-of-process service registration https://chromium-review.googlesource.com/c/chromium/src/+/1615882 * [ThreadPool] Rename base::ThreadPool to base::ThreadPoolInstance https://chromium-review.googlesource.com/c/chromium/src/+/1634851 * chore: update patches * fix: -Winconsistent-missing-override warnings * chore: bump chromium in DEPS to 93ebfaccc12715df1d5426797998eed0932f7ae1 * Change CreateBrowserMainParts to return unique_ptrs https://chromium-review.googlesource.com/c/chromium/src/+/1632532 * chore: update patches * chore: bump chromium in DEPS to e656555ffb87bdd05e248d0a3ef9dd9d3433e17b * chore: bump chromium in DEPS to 111e7a8d2e3ae9d70e535009d6afb066ac906063 * chore: bump chromium in DEPS to 9b6b84670d32a7aff41ce73adc0eeee67d364989 * chore: update patches * chore: remove ShouldInterceptResourceAsStream as it is removed upstream Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1639597 * chore: remove ResourceDispatcherHostCreated as it is removed upstream Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1610892 * chore: CreateWithStrongBinding --> CreateWithSelfOwnedReceiver Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1636722 * chore: rename all blink media enums Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1639237 * chore: add accidentally removed patch content back
2019-06-04 03:44:12 +00:00
index b503bf7cef554dfb35c2123cba51c0fba7402c7e..2d38c4cebcd4040bbd417d4ae9189da954d9cfce 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
2019-05-13 18:49:01 +00:00
@@ -146,6 +146,8 @@ class CORE_EXPORT WebLocalFrameImpl final
int argc,
v8::Local<v8::Value> argv[]) override;
v8::Local<v8::Context> MainWorldScriptContext() const override;
+ v8::Local<v8::Context> WorldScriptContext(
+ v8::Isolate* isolate, int world_id) const override;
v8::Local<v8::Object> GlobalProxy() const override;
2018-09-21 00:30:26 +00:00
void StartReload(WebFrameLoadType) override;
void ReloadImage(const WebNode&) override;