Created
January 21, 2021 08:59
-
-
Save zckevin/d1ec931b278cf320710fb1b1f32d53f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_dom_configuration.cc b/third_party/blink/renderer/bindings/core/v8/v8_dom_configuration.cc | |
index d84004cd41..739ba61e9f 100644 | |
--- a/third_party/blink/renderer/bindings/core/v8/v8_dom_configuration.cc | |
+++ b/third_party/blink/renderer/bindings/core/v8/v8_dom_configuration.cc | |
@@ -520,7 +520,7 @@ void InstallMethodInternal( | |
if (!WorldConfigurationApplies(config, world)) | |
return; | |
- v8::Local<v8::String> name = config.MethodName(isolate); | |
+ v8::Local<v8::Name> name = config.MethodName(isolate); | |
v8::FunctionCallback callback = config.callback; | |
// Promise-returning functions need to return a reject promise when | |
// an exception occurs. This includes a case that the receiver object is not | |
@@ -551,7 +551,6 @@ void InstallMethodInternal( | |
v8::Local<v8::Function> function = | |
function_template->GetFunction(isolate->GetCurrentContext()) | |
.ToLocalChecked(); | |
- function->SetName(name); | |
if (location & V8DOMConfiguration::kOnInstance && !instance.IsEmpty()) { | |
instance | |
->DefineOwnProperty( | |
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_dom_configuration.h b/third_party/blink/renderer/bindings/core/v8/v8_dom_configuration.h | |
index 4f517704a5..488dc8864f 100644 | |
--- a/third_party/blink/renderer/bindings/core/v8/v8_dom_configuration.h | |
+++ b/third_party/blink/renderer/bindings/core/v8/v8_dom_configuration.h | |
@@ -266,7 +266,7 @@ class CORE_EXPORT V8DOMConfiguration final { | |
struct MethodConfiguration { | |
MethodConfiguration& operator=(const MethodConfiguration&) = delete; | |
DISALLOW_NEW(); | |
- v8::Local<v8::String> MethodName(v8::Isolate* isolate) const { | |
+ v8::Local<v8::Name> MethodName(v8::Isolate* isolate) const { | |
return V8AtomicString(isolate, name); | |
} | |
diff --git a/third_party/blink/renderer/core/frame/location.idl b/third_party/blink/renderer/core/frame/location.idl | |
index 7a86ead9cc..ea47333ddb 100644 | |
--- a/third_party/blink/renderer/core/frame/location.idl | |
+++ b/third_party/blink/renderer/core/frame/location.idl | |
@@ -40,7 +40,7 @@ | |
// However, *reading* |href|, or accessing any component, is a security | |
// problem, since that allows tracking navigation. | |
// https://html.spec.whatwg.org/C/#crossoriginproperties-(-o-) | |
- [CallWith=Isolate, RaisesException, Unforgeable] void replace(URLString url); | |
+ [CallWith=Isolate, CrossOrigin, RaisesException, Unforgeable] void replace(URLString url); | |
[Unforgeable] void reload(); | |
// TODO(foolip): |ancestorOrigins| should have [Unforgeable, SameObject]. | |
diff --git a/third_party/blink/renderer/core/frame/window.idl b/third_party/blink/renderer/core/frame/window.idl | |
index 2d737b8cba..f72784866e 100644 | |
--- a/third_party/blink/renderer/core/frame/window.idl | |
+++ b/third_party/blink/renderer/core/frame/window.idl | |
@@ -52,8 +52,8 @@ | |
[CrossOrigin, CallWith=Isolate] void close(); | |
[CrossOrigin] readonly attribute boolean closed; | |
void stop(); | |
- [CallWith=Isolate] void focus(); | |
- void blur(); | |
+ [CrossOrigin, CallWith=Isolate] void focus(); | |
+ [CrossOrigin] void blur(); | |
// other browsing contexts | |
[Replaceable, CrossOrigin] readonly attribute Window frames; | |
@@ -83,9 +83,9 @@ | |
[Measure, CallWith=ScriptState] DOMString? prompt(optional DOMString message = "", optional DOMString defaultValue = ""); | |
[Measure, CallWith=ScriptState] void print(); | |
- [CallWith=Isolate, RaisesException] void postMessage(any message, USVString targetOrigin, optional sequence<object> transfer = []); | |
+ [CrossOrigin, CallWith=Isolate, RaisesException] void postMessage(any message, USVString targetOrigin, optional sequence<object> transfer = []); | |
- [CallWith=Isolate, RaisesException] void postMessage(any message, optional WindowPostMessageOptions options); | |
+ [CrossOrigin, CallWith=Isolate, RaisesException] void postMessage(any message, optional WindowPostMessageOptions options); | |
// WindowOrWorkerGlobalScope mixin | |
// https://html.spec.whatwg.org/C/#windoworworkerglobalscope-mixin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment