зеркало из https://github.com/mozilla/gecko-dev.git
Bug 831658 - Handle multiple RegExpShareds in the same compartment. r=dvander
This commit is contained in:
Родитель
3d1624e9a0
Коммит
adfe1de262
|
@ -0,0 +1,4 @@
|
|||
// Don't assert.
|
||||
String.prototype.search = evalcx('').String.prototype.search
|
||||
x = /./.test()
|
||||
''.search(/()/)
|
|
@ -652,8 +652,7 @@ RegExpCompartment::~RegExpCompartment()
|
|||
* RegExpStatics may have prevented a single RegExpShared from
|
||||
* being collected during RegExpCompartment::sweep().
|
||||
*/
|
||||
if (!inUse_.empty()) {
|
||||
PendingSet::Enum e(inUse_);
|
||||
for (PendingSet::Enum e(inUse_); !e.empty(); e.popFront()) {
|
||||
RegExpShared *shared = e.front();
|
||||
JS_ASSERT(shared->activeUseCount == 0);
|
||||
js_delete(shared);
|
||||
|
|
Загрузка…
Ссылка в новой задаче