зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
ab0c961743
Коммит
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче