mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 305689497e3e (bug 650161) for causing LeakSanitizer failures
This commit is contained in:
parent
e66c012e9f
commit
fbac30fbbb
@ -502,11 +502,8 @@ class JSRuntimeWrapper
|
||||
public:
|
||||
static JSRuntimeWrapper *Create()
|
||||
{
|
||||
JSRuntime *runtime = JS_NewRuntime(sRuntimeHeapSize);
|
||||
if (NS_WARN_IF(!runtime))
|
||||
return nullptr;
|
||||
JSRuntimeWrapper *entry = new JSRuntimeWrapper();
|
||||
|
||||
JSRuntimeWrapper *entry = new JSRuntimeWrapper(runtime);
|
||||
if (NS_FAILED(entry->Init())) {
|
||||
delete entry;
|
||||
return nullptr;
|
||||
@ -552,19 +549,22 @@ private:
|
||||
|
||||
JSRuntime *mRuntime;
|
||||
JSContext *mContext;
|
||||
JS::PersistentRooted<JSObject*> mGlobal;
|
||||
JSObject *mGlobal;
|
||||
bool mOK;
|
||||
|
||||
static const JSClass sGlobalClass;
|
||||
|
||||
JSRuntimeWrapper(JSRuntime* rt)
|
||||
: mRuntime(rt), mContext(nullptr), mGlobal(rt, nullptr), mOK(false)
|
||||
JSRuntimeWrapper()
|
||||
: mRuntime(nullptr), mContext(nullptr), mGlobal(nullptr), mOK(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(JSRuntimeWrapper);
|
||||
}
|
||||
|
||||
nsresult Init()
|
||||
{
|
||||
mRuntime = JS_NewRuntime(sRuntimeHeapSize);
|
||||
NS_ENSURE_TRUE(mRuntime, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
/*
|
||||
* Not setting this will cause JS_CHECK_RECURSION to report false
|
||||
* positives
|
||||
|
Loading…
Reference in New Issue
Block a user