mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 580128. Remove cross origin string wrappers from hash when the wrapped string dies. r=mrbkap.
As a note: this bug took peterv and mrbkap 7 hours to track down using replay debugging after spending hours trying to even catch it on a replay debugging box.
This commit is contained in:
parent
ab0c961743
commit
c914f1d5dd
@ -334,8 +334,13 @@ JSCompartment::sweep(JSContext *cx)
|
||||
chunk = NULL;
|
||||
/* Remove dead wrappers from the table. */
|
||||
for (WrapperMap::Enum e(crossCompartmentWrappers); !e.empty(); e.popFront()) {
|
||||
if (IsAboutToBeFinalized(e.front().value.toGCThing()))
|
||||
JS_ASSERT_IF(IsAboutToBeFinalized(e.front().key.toGCThing()) &&
|
||||
!IsAboutToBeFinalized(e.front().value.toGCThing()),
|
||||
e.front().key.isString());
|
||||
if (IsAboutToBeFinalized(e.front().key.toGCThing()) ||
|
||||
IsAboutToBeFinalized(e.front().value.toGCThing())) {
|
||||
e.removeFront();
|
||||
}
|
||||
}
|
||||
|
||||
#if defined JS_METHODJIT && defined JS_MONOIC
|
||||
|
Loading…
Reference in New Issue
Block a user