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

Unified Diff: test/cctest/test-unboxed-doubles.cc

Issue 2645083003: Remove one of the JSObject::WriteToField() methods in favor of another. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-unboxed-doubles.cc
diff --git a/test/cctest/test-unboxed-doubles.cc b/test/cctest/test-unboxed-doubles.cc
index 582e2757fbd297e30e6b0659091485488629a23e..1f43c0fa59f83ce216ab6a13f03a58fa0896c0cf 100644
--- a/test/cctest/test-unboxed-doubles.cc
+++ b/test/cctest/test-unboxed-doubles.cc
@@ -70,6 +70,12 @@ static double GetDoubleFieldValue(JSObject* obj, FieldIndex field_index) {
}
}
+void WriteToField(JSObject* object, int descriptor, Object* value) {
+ DescriptorArray* descriptors = object->map()->instance_descriptors();
+ PropertyDetails details = descriptors->GetDetails(descriptor);
+ object->WriteToField(descriptor, details, value);
+}
+
const int kNumberOfBits = 32;
@@ -1047,7 +1053,7 @@ TEST(DoScavenge) {
Handle<JSObject> obj = factory->NewJSObjectFromMap(map, NOT_TENURED);
Handle<HeapNumber> heap_number = factory->NewHeapNumber(42.5);
- obj->WriteToField(0, *heap_number);
+ WriteToField(*obj, 0, *heap_number);
{
// Ensure the object is properly set up.
@@ -1123,8 +1129,8 @@ TEST(DoScavengeWithIncrementalWriteBarrier) {
Handle<JSObject> obj = factory->NewJSObjectFromMap(map, NOT_TENURED);
Handle<HeapNumber> heap_number = factory->NewHeapNumber(42.5);
- obj->WriteToField(0, *heap_number);
- obj->WriteToField(1, *obj_value);
+ WriteToField(*obj, 0, *heap_number);
+ WriteToField(*obj, 1, *obj_value);
{
// Ensure the object is properly set up.
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698