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

Side by Side Diff: test/mjsunit/mirror-object.js

Issue 733253004: PropertyDetails cleanup: NORMAL property type merged with FIELD. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cleanup Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « src/x87/macro-assembler-x87.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 if (typeof name === 'symbol') continue; 118 if (typeof name === 'symbol') continue;
119 var found = false; 119 var found = false;
120 for (var i = 0; i < fromJSON.properties.length; i++) { 120 for (var i = 0; i < fromJSON.properties.length; i++) {
121 if (fromJSON.properties[i].name == name) { 121 if (fromJSON.properties[i].name == name) {
122 // Check that serialized handle is correct. 122 // Check that serialized handle is correct.
123 assertEquals(properties[i].value().handle(), fromJSON.properties[i].ref, 'Unexpected serialized handle'); 123 assertEquals(properties[i].value().handle(), fromJSON.properties[i].ref, 'Unexpected serialized handle');
124 124
125 // Check that serialized name is correct. 125 // Check that serialized name is correct.
126 assertEquals(properties[i].name(), fromJSON.properties[i].name, 'Unexpec ted serialized name'); 126 assertEquals(properties[i].name(), fromJSON.properties[i].name, 'Unexpec ted serialized name');
127 127
128 // If property type is normal property type is not serialized. 128 assertEquals(properties[i].propertyType(), fromJSON.properties[i].proper tyType, 'Unexpected serialized property type');
129 if (properties[i].propertyType() != debug.PropertyType.Normal) {
130 assertEquals(properties[i].propertyType(), fromJSON.properties[i].prop ertyType, 'Unexpected serialized property type');
131 } else {
132 assertTrue(typeof(fromJSON.properties[i].propertyType) === 'undefined' , 'Unexpected serialized property type');
133 }
134 129
135 // If there are no attributes attributes are not serialized. 130 // If there are no attributes attributes are not serialized.
136 if (properties[i].attributes() != debug.PropertyAttribute.None) { 131 if (properties[i].attributes() != debug.PropertyAttribute.None) {
137 assertEquals(properties[i].attributes(), fromJSON.properties[i].attrib utes, 'Unexpected serialized attributes'); 132 assertEquals(properties[i].attributes(), fromJSON.properties[i].attrib utes, 'Unexpected serialized attributes');
138 } else { 133 } else {
139 assertTrue(typeof(fromJSON.properties[i].attributes) === 'undefined', 'Unexpected serialized attributes'); 134 assertTrue(typeof(fromJSON.properties[i].attributes) === 'undefined', 'Unexpected serialized attributes');
140 } 135 }
141 136
142 // Lookup the serialized object from the handle reference. 137 // Lookup the serialized object from the handle reference.
143 var o = refs.lookup(fromJSON.properties[i].ref); 138 var o = refs.lookup(fromJSON.properties[i].ref);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 } 258 }
264 assertTrue("[[BoundThis]]" in property_map); 259 assertTrue("[[BoundThis]]" in property_map);
265 assertEquals("function", property_map["[[BoundThis]]"].value().type()); 260 assertEquals("function", property_map["[[BoundThis]]"].value().type());
266 assertEquals(Array, property_map["[[BoundThis]]"].value().value()); 261 assertEquals(Array, property_map["[[BoundThis]]"].value().value());
267 assertTrue("[[TargetFunction]]" in property_map); 262 assertTrue("[[TargetFunction]]" in property_map);
268 assertEquals("function", property_map["[[TargetFunction]]"].value().type()); 263 assertEquals("function", property_map["[[TargetFunction]]"].value().type());
269 assertEquals(Number, property_map["[[TargetFunction]]"].value().value()); 264 assertEquals(Number, property_map["[[TargetFunction]]"].value().value());
270 assertTrue("[[BoundArgs]]" in property_map); 265 assertTrue("[[BoundArgs]]" in property_map);
271 assertEquals("object", property_map["[[BoundArgs]]"].value().type()); 266 assertEquals("object", property_map["[[BoundArgs]]"].value().type());
272 assertEquals(1, property_map["[[BoundArgs]]"].value().value().length); 267 assertEquals(1, property_map["[[BoundArgs]]"].value().value().length);
OLDNEW
« no previous file with comments | « src/x87/macro-assembler-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698