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

Unified Diff: Source/bindings/core/v8/WindowProxy.cpp

Issue 1153613007: bindings: Use CreateDataProperty() instead of ForceSet() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 months 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: Source/bindings/core/v8/WindowProxy.cpp
diff --git a/Source/bindings/core/v8/WindowProxy.cpp b/Source/bindings/core/v8/WindowProxy.cpp
index 6374266650f27573d4734429b2c0bfacedfcb171..6f33b0a75c418e3edc89139b537873b9eba48aca 100644
--- a/Source/bindings/core/v8/WindowProxy.cpp
+++ b/Source/bindings/core/v8/WindowProxy.cpp
@@ -374,6 +374,8 @@ void WindowProxy::updateDocumentProperty()
checkDocumentWrapper(m_document.newLocal(m_isolate), frame->document());
ASSERT(documentWrapper->IsObject());
+ // We can't use DefineOwnProperty() here because it doesn't work for
+ // global proxy objects.
if (!v8CallBoolean(context->Global()->ForceSet(context, v8AtomicString(m_isolate, "document"), documentWrapper, static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete))))
bashi 2015/06/03 00:16:37 We still need ForceSet().
return;

Powered by Google App Engine
This is Rietveld 408576698