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

Unified Diff: Source/bindings/core/v8/custom/V8MessageEventCustom.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/custom/V8MessageEventCustom.cpp
diff --git a/Source/bindings/core/v8/custom/V8MessageEventCustom.cpp b/Source/bindings/core/v8/custom/V8MessageEventCustom.cpp
index d36fe3bb0376c82aa8475ae03487083896e02a21..94a6b0601c974b91a7bebd579aba5b42115b4bdc 100644
--- a/Source/bindings/core/v8/custom/V8MessageEventCustom.cpp
+++ b/Source/bindings/core/v8/custom/V8MessageEventCustom.cpp
@@ -89,6 +89,8 @@ void V8MessageEvent::dataAttributeGetterCustom(const v8::PropertyCallbackInfo<v8
// TODO(bashi): We use ForceSet() here, and we use hidden values in other
// places (e.g. V8CustomEventCustom.cpp). We should use the same way to
// handle "any" attributes.
+ // TODO(bashi): Use DefineOwnProperty() instead of ForceSet().
+ // http://crbug.com/475206
v8::PropertyAttribute dataAttr = static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly);
if (!v8CallBoolean(info.Holder()->ForceSet(info.GetIsolate()->GetCurrentContext(), v8AtomicString(info.GetIsolate(), "data"), result, dataAttr))) {
bashi 2015/06/03 00:16:37 We can't use DefineOwnProperty() here because it r
v8SetReturnValue(info, v8::Null(info.GetIsolate()));

Powered by Google App Engine
This is Rietveld 408576698