Bug 1153498 - Use RelocatablePtr in RegExpShared since these can be destroyed outside of the GC r=terrence

This commit is contained in:
Jon Coppeard 2015-04-14 11:31:12 +01:00
Родитель 4f7bbfd7c8
Коммит fe8f98ea43
2 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -0,0 +1,10 @@
// |jit-test| allow-oom; allow-unhandlable-oom
if (!("oomAfterAllocations" in this && "gczeal" in this))
quit();
gczeal(0);
"".search(function() {});
r = /x/;
x = [/y/];
oomAfterAllocations(5);
x.v = function() {};
a = /z/;

Просмотреть файл

@ -119,7 +119,7 @@ class RegExpShared
struct RegExpCompilation
{
HeapPtrJitCode jitCode;
RelocatablePtrJitCode jitCode;
uint8_t* byteCode;
RegExpCompilation() : byteCode(nullptr) {}
@ -131,7 +131,7 @@ class RegExpShared
};
/* Source to the RegExp, for lazy compilation. */
HeapPtrAtom source;
RelocatablePtrAtom source;
RegExpFlag flags;
size_t parenCount;