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

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

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.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Binding.h b/third_party/WebKit/Source/bindings/core/v8/V8Binding.h
index 5076928cbc12b2178b7cce8004bf9f36cde5a7b5..599bc7323634e4e5364e11605d4b12affff2ff7b 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8Binding.h
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Binding.h
@@ -884,9 +884,10 @@ template<typename Collection> static void indexedPropertyEnumerator(const v8::Pr
Collection* collection = toScriptWrappable(info.Holder())->toImpl<Collection>();
int length = collection->length();
v8::Local<v8::Array> properties = v8::Array::New(info.GetIsolate(), length);
+ v8::Local<v8::Context> context = info.GetIsolate()->GetCurrentContext();
for (int i = 0; i < length; ++i) {
v8::Local<v8::Integer> integer = v8::Integer::New(info.GetIsolate(), i);
- if (!v8CallBoolean(properties->Set(info.GetIsolate()->GetCurrentContext(), integer, integer)))
+ if (!v8CallBoolean(properties->CreateDataProperty(context, i, integer)))
return;
}
v8SetReturnValue(info, properties);
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptPromise.cpp ('k') | third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698