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

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

Issue 1938943002: Use v8::Object::CreateDataProperty() for object construction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp b/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
index a2a5278991b52917665b080bfd97ca23807aa653..44f8a1e7a85e2a92ee440459aa221eefaba9befa 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
@@ -862,7 +862,7 @@ bool addHiddenValueToArray(v8::Isolate* isolate, v8::Local<v8::Object> object, v
}
v8::Local<v8::Array> array = v8::Local<v8::Array>::Cast(arrayValue);
- return v8CallBoolean(array->Set(isolate->GetCurrentContext(), v8::Integer::New(isolate, array->Length()), value));
+ return v8CallBoolean(array->CreateDataProperty(isolate->GetCurrentContext(), array->Length(), value));
}
void removeHiddenValueFromArray(v8::Isolate* isolate, v8::Local<v8::Object> object, v8::Local<v8::Value> value, int arrayIndex)

Powered by Google App Engine
This is Rietveld 408576698