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

Side by Side Diff: src/objects.cc

Issue 24259005: Revert ("Chromium 284577 needs a mitigation CL added." (svn-id 16742)) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 | « src/heap-inl.h ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 8953 matching lines...) Expand 10 before | Expand all | Expand 10 after
8964 object->Size(); 8964 object->Size();
8965 if ((ptr_end + AllocationMemento::kSize) <= 8965 if ((ptr_end + AllocationMemento::kSize) <=
8966 object->GetHeap()->NewSpaceTop()) { 8966 object->GetHeap()->NewSpaceTop()) {
8967 // There is room in newspace for allocation info. Do we have some? 8967 // There is room in newspace for allocation info. Do we have some?
8968 Map** possible_allocation_memento_map = 8968 Map** possible_allocation_memento_map =
8969 reinterpret_cast<Map**>(ptr_end); 8969 reinterpret_cast<Map**>(ptr_end);
8970 if (*possible_allocation_memento_map == 8970 if (*possible_allocation_memento_map ==
8971 object->GetHeap()->allocation_memento_map()) { 8971 object->GetHeap()->allocation_memento_map()) {
8972 AllocationMemento* memento = AllocationMemento::cast( 8972 AllocationMemento* memento = AllocationMemento::cast(
8973 reinterpret_cast<Object*>(ptr_end + kHeapObjectTag)); 8973 reinterpret_cast<Object*>(ptr_end + kHeapObjectTag));
8974 8974 return memento;
8975 // TODO(mvstanton): because of chromium bug 284577, put extra care
8976 // into validating that the memento points to a valid AllocationSite.
8977 // This check is expensive so remove it asap. Also, this check
8978 // HIDES bug 284577, so it must be disabled to debug/diagnose.
8979 Object* site = memento->allocation_site();
8980 Heap* heap = object->GetHeap();
8981 if (heap->InOldPointerSpace(site) &&
8982 site->IsHeapObject() &&
8983 HeapObject::cast(site)->map() == heap->allocation_site_map()) {
8984 return memento;
8985 }
8986 } 8975 }
8987 } 8976 }
8988 } 8977 }
8989 return NULL; 8978 return NULL;
8990 } 8979 }
8991 8980
8992 8981
8993 uint32_t StringHasher::MakeArrayIndexHash(uint32_t value, int length) { 8982 uint32_t StringHasher::MakeArrayIndexHash(uint32_t value, int length) {
8994 // For array indexes mix the length into the hash as an array index could 8983 // For array indexes mix the length into the hash as an array index could
8995 // be zero. 8984 // be zero.
(...skipping 7101 matching lines...) Expand 10 before | Expand all | Expand 10 after
16097 #define ERROR_MESSAGES_TEXTS(C, T) T, 16086 #define ERROR_MESSAGES_TEXTS(C, T) T,
16098 static const char* error_messages_[] = { 16087 static const char* error_messages_[] = {
16099 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16088 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16100 }; 16089 };
16101 #undef ERROR_MESSAGES_TEXTS 16090 #undef ERROR_MESSAGES_TEXTS
16102 return error_messages_[reason]; 16091 return error_messages_[reason];
16103 } 16092 }
16104 16093
16105 16094
16106 } } // namespace v8::internal 16095 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698