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

Side by Side Diff: src/objects-debug.cc

Issue 184493002: A JSArray may have a filler map in the elements pointer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fixin' nits. Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-347903.js » ('j') | 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 257
258 template <class Traits> 258 template <class Traits>
259 void FixedTypedArray<Traits>::FixedTypedArrayVerify() { 259 void FixedTypedArray<Traits>::FixedTypedArrayVerify() {
260 CHECK(IsHeapObject() && 260 CHECK(IsHeapObject() &&
261 HeapObject::cast(this)->map()->instance_type() == 261 HeapObject::cast(this)->map()->instance_type() ==
262 Traits::kInstanceType); 262 Traits::kInstanceType);
263 } 263 }
264 264
265 265
266 bool JSObject::ElementsAreSafeToExamine() { 266 bool JSObject::ElementsAreSafeToExamine() {
267 return (FLAG_use_gvn && FLAG_use_allocation_folding) || 267 // If a GC was caused while constructing this object, the elements
268 reinterpret_cast<Map*>(elements()) != 268 // pointer may point to a one pointer filler map.
269 return reinterpret_cast<Map*>(elements()) !=
269 GetHeap()->one_pointer_filler_map(); 270 GetHeap()->one_pointer_filler_map();
270 } 271 }
271 272
272 273
273 void JSObject::JSObjectVerify() { 274 void JSObject::JSObjectVerify() {
274 VerifyHeapPointer(properties()); 275 VerifyHeapPointer(properties());
275 VerifyHeapPointer(elements()); 276 VerifyHeapPointer(elements());
276 277
277 if (GetElementsKind() == NON_STRICT_ARGUMENTS_ELEMENTS) { 278 if (GetElementsKind() == NON_STRICT_ARGUMENTS_ELEMENTS) {
278 CHECK(this->elements()->IsFixedArray()); 279 CHECK(this->elements()->IsFixedArray());
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 for (int i = 0; i < number_of_transitions(); ++i) { 1151 for (int i = 0; i < number_of_transitions(); ++i) {
1151 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; 1152 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false;
1152 } 1153 }
1153 return true; 1154 return true;
1154 } 1155 }
1155 1156
1156 1157
1157 #endif // DEBUG 1158 #endif // DEBUG
1158 1159
1159 } } // namespace v8::internal 1160 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-347903.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698