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

Side by Side Diff: src/builtins.cc

Issue 6461022: Merge a number of assertion failure fixes to the 3.0 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.0/
Patch Set: '' Created 9 years, 10 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
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 361
362 static bool ArrayPrototypeHasNoElements(Context* global_context, 362 static bool ArrayPrototypeHasNoElements(Context* global_context,
363 JSObject* array_proto) { 363 JSObject* array_proto) {
364 // This method depends on non writability of Object and Array prototype 364 // This method depends on non writability of Object and Array prototype
365 // fields. 365 // fields.
366 if (array_proto->elements() != Heap::empty_fixed_array()) return false; 366 if (array_proto->elements() != Heap::empty_fixed_array()) return false;
367 // Hidden prototype 367 // Hidden prototype
368 array_proto = JSObject::cast(array_proto->GetPrototype()); 368 array_proto = JSObject::cast(array_proto->GetPrototype());
369 ASSERT(array_proto->elements() == Heap::empty_fixed_array()); 369 ASSERT(array_proto->elements() == Heap::empty_fixed_array());
370 // Object.prototype 370 // Object.prototype
371 array_proto = JSObject::cast(array_proto->GetPrototype()); 371 Object* proto = array_proto->GetPrototype();
372 if (proto == Heap::null_value()) return false;
373 array_proto = JSObject::cast(proto);
372 if (array_proto != global_context->initial_object_prototype()) return false; 374 if (array_proto != global_context->initial_object_prototype()) return false;
373 if (array_proto->elements() != Heap::empty_fixed_array()) return false; 375 if (array_proto->elements() != Heap::empty_fixed_array()) return false;
374 ASSERT(array_proto->GetPrototype()->IsNull()); 376 ASSERT(array_proto->GetPrototype()->IsNull());
375 return true; 377 return true;
376 } 378 }
377 379
378 380
379 MUST_USE_RESULT 381 MUST_USE_RESULT
380 static inline MaybeObject* EnsureJSArrayWithWritableFastElements( 382 static inline MaybeObject* EnsureJSArrayWithWritableFastElements(
381 Object* receiver) { 383 Object* receiver) {
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 if (entry->contains(pc)) { 1538 if (entry->contains(pc)) {
1537 return names_[i]; 1539 return names_[i];
1538 } 1540 }
1539 } 1541 }
1540 } 1542 }
1541 return NULL; 1543 return NULL;
1542 } 1544 }
1543 1545
1544 1546
1545 } } // namespace v8::internal 1547 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698