Commit 6139bafd authored by verwaest@chromium.org's avatar verwaest@chromium.org

Also in ClearNonLiveTransitions we have to check if there still is a...

Also in ClearNonLiveTransitions we have to check if there still is a transition array before we access it.
This should never happen in the long run, but will happen when maps still have a back-pointer while the forward pointer (the transition) was overwritten.

Review URL: https://chromiumcodereview.appspot.com/10704109

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a2cfa9d3
......@@ -1997,7 +1997,7 @@ int DescriptorArray::SearchWithCache(String* name) {
TransitionArray* DescriptorArray::transitions() {
if (!this->MayContainTransitions()) return NULL;
ASSERT(MayContainTransitions());
Object* array = get(kTransitionsIndex);
return TransitionArray::cast(array);
}
......
......@@ -7366,11 +7366,12 @@ static bool ClearNonLiveTransition(Heap* heap,
// because it cannot be called from outside the GC and we already have methods
// depending on the transitions layout in the GC anyways.
void Map::ClearNonLiveTransitions(Heap* heap) {
TransitionArray* t = transitions();
// If there are no transitions to be cleared, return.
// TODO(verwaest) Should be an assert, otherwise back pointers are not
// properly cleared.
if (t == NULL) return;
if (!HasTransitionArray()) return;
TransitionArray* t = transitions();
int transition_index = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment