Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.cpp

Issue 2439013002: Implement cross-origin attributes using access check interceptors. (Closed)
Patch Set: . Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.cpp b/third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.cpp
index 598c7849184a513a3d75c786b24541ffefcfd366..e586982e24fcfcd714bdf3d9f573d292f03a21a3 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.cpp
@@ -89,6 +89,15 @@ bool V8DOMWrapper::isWrapper(v8::Isolate* isolate, v8::Local<v8::Value> value) {
return perIsolateData->hasInstance(untrustedWrapperTypeInfo, object);
}
+void V8DOMWrapper::clearNativeInfo(v8::Isolate* isolate,
+ v8::Local<v8::Object> wrapper) {
+ DCHECK_GE(wrapper->InternalFieldCount(), 2);
+ int indices[] = {v8DOMWrapperObjectIndex, v8DOMWrapperTypeIndex};
+ void* values[] = {nullptr, nullptr};
+ wrapper->SetAlignedPointerInInternalFields(WTF_ARRAY_LENGTH(indices), indices,
+ values);
+}
+
bool V8DOMWrapper::hasInternalFieldsSet(v8::Local<v8::Value> value) {
if (value.IsEmpty() || !value->IsObject())
return false;

Powered by Google App Engine
This is Rietveld 408576698