mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1133909 - Fix hazards revealed by adding in new GCPointers, r=terrence
This commit is contained in:
parent
cbb779d14d
commit
f8688076a8
@ -29,7 +29,7 @@ const Class SymbolObject::class_ = {
|
||||
};
|
||||
|
||||
SymbolObject *
|
||||
SymbolObject::create(JSContext *cx, JS::Symbol *symbol)
|
||||
SymbolObject::create(JSContext *cx, JS::HandleSymbol symbol)
|
||||
{
|
||||
JSObject *obj = NewBuiltinClassInstance(cx, &class_);
|
||||
if (!obj)
|
||||
|
@ -28,7 +28,7 @@ class SymbolObject : public NativeObject
|
||||
* Creates a new Symbol object boxing the given primitive Symbol. The
|
||||
* object's [[Prototype]] is determined from context.
|
||||
*/
|
||||
static SymbolObject *create(JSContext *cx, JS::Symbol *symbol);
|
||||
static SymbolObject *create(JSContext *cx, JS::HandleSymbol symbol);
|
||||
|
||||
JS::Symbol *unbox() const {
|
||||
return getFixedSlot(PRIMITIVE_VALUE_SLOT).toSymbol();
|
||||
|
@ -1612,8 +1612,8 @@ RegExpCompiler::Assemble(JSContext *cx,
|
||||
return RegExpCode();
|
||||
|
||||
if (reg_exp_too_big_) {
|
||||
JS_ReportError(cx, "regexp too big");
|
||||
code.destroy();
|
||||
JS_ReportError(cx, "regexp too big");
|
||||
return RegExpCode();
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "jit/mips/Simulator-mips.h"
|
||||
#include "js/HashTable.h"
|
||||
#include "js/Vector.h"
|
||||
#include "js/GCAPI.h"
|
||||
|
||||
#ifdef JS_CPU_SPARC
|
||||
#ifdef __linux__ // bugzilla 502369
|
||||
@ -250,8 +251,11 @@ class ExecutableAllocator {
|
||||
|
||||
void releasePoolPages(ExecutablePool *pool) {
|
||||
MOZ_ASSERT(pool->m_allocation.pages);
|
||||
if (destroyCallback)
|
||||
if (destroyCallback) {
|
||||
// Do not allow GC during the page release callback.
|
||||
JS::AutoSuppressGCAnalysis nogc;
|
||||
destroyCallback(pool->m_allocation.pages, pool->m_allocation.size);
|
||||
}
|
||||
systemRelease(pool->m_allocation);
|
||||
MOZ_ASSERT(m_pools.initialized());
|
||||
m_pools.remove(m_pools.lookup(pool)); // this asserts if |pool| is not in m_pools
|
||||
|
@ -3614,7 +3614,8 @@ js::PrimitiveToObject(JSContext *cx, const Value &v)
|
||||
if (v.isBoolean())
|
||||
return BooleanObject::create(cx, v.toBoolean());
|
||||
MOZ_ASSERT(v.isSymbol());
|
||||
return SymbolObject::create(cx, v.toSymbol());
|
||||
RootedSymbol symbol(cx, v.toSymbol());
|
||||
return SymbolObject::create(cx, symbol);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user