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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.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/V8IteratorResultValue.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp b/third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp
index 9cd406359926bf28b5604fba6e16fd9a4801d527..8ac33c2cbc4b61675bc6a62dd6c49a13efba1af6 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp
@@ -11,8 +11,8 @@ v8::Local<v8::Object> v8IteratorResultValue(v8::Isolate* isolate, bool done, v8:
v8::Local<v8::Object> result = v8::Object::New(isolate);
if (value.IsEmpty())
value = v8::Undefined(isolate);
- if (!v8CallBoolean(result->Set(isolate->GetCurrentContext(), v8String(isolate, "done"), v8Boolean(done, isolate)))
- || !v8CallBoolean(result->Set(isolate->GetCurrentContext(), v8String(isolate, "value"), value)))
+ if (!v8CallBoolean(result->CreateDataProperty(isolate->GetCurrentContext(), v8String(isolate, "done"), v8Boolean(done, isolate)))
+ || !v8CallBoolean(result->CreateDataProperty(isolate->GetCurrentContext(), v8String(isolate, "value"), value)))
return v8::Local<v8::Object>();
return result;
}

Powered by Google App Engine
This is Rietveld 408576698