mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset b92529577644 (bug 895395) on suspicion of causing shutdown hangs on OS X
This commit is contained in:
parent
9c7728d496
commit
65a88f9ef0
@ -355,7 +355,9 @@ frontend::CompileScript(ExclusiveContext *cx, LifoAlloc *alloc, HandleObject sco
|
||||
if (!FoldConstants(cx, &pn, &parser))
|
||||
return nullptr;
|
||||
|
||||
if (!NameFunctions(cx, pn))
|
||||
// Inferring names for functions in compiled scripts is currently only
|
||||
// supported while on the main thread. See bug 895395.
|
||||
if (cx->isJSContext() && !NameFunctions(cx->asJSContext(), pn))
|
||||
return nullptr;
|
||||
|
||||
if (!EmitTree(cx, &bce, pn))
|
||||
|
@ -23,7 +23,7 @@ class NameResolver
|
||||
{
|
||||
static const size_t MaxParents = 100;
|
||||
|
||||
ExclusiveContext *cx;
|
||||
JSContext *cx;
|
||||
size_t nparents; /* number of parents in the parents array */
|
||||
ParseNode *parents[MaxParents]; /* history of ParseNodes we've been looking at */
|
||||
StringBuffer *buf; /* when resolving, buffer to append to */
|
||||
@ -262,7 +262,7 @@ class NameResolver
|
||||
}
|
||||
|
||||
public:
|
||||
explicit NameResolver(ExclusiveContext *cx) : cx(cx), nparents(0), buf(nullptr) {}
|
||||
explicit NameResolver(JSContext *cx) : cx(cx), nparents(0), buf(nullptr) {}
|
||||
|
||||
/*
|
||||
* Resolve all names for anonymous functions recursively within the
|
||||
@ -331,7 +331,7 @@ class NameResolver
|
||||
} /* anonymous namespace */
|
||||
|
||||
bool
|
||||
frontend::NameFunctions(ExclusiveContext *cx, ParseNode *pn)
|
||||
frontend::NameFunctions(JSContext *cx, ParseNode *pn)
|
||||
{
|
||||
NameResolver nr(cx);
|
||||
nr.resolve(pn);
|
||||
|
@ -10,15 +10,12 @@
|
||||
#include "js/TypeDecls.h"
|
||||
|
||||
namespace js {
|
||||
|
||||
class ExclusiveContext;
|
||||
|
||||
namespace frontend {
|
||||
|
||||
class ParseNode;
|
||||
|
||||
bool
|
||||
NameFunctions(ExclusiveContext *cx, ParseNode *pn);
|
||||
NameFunctions(JSContext *cx, ParseNode *pn);
|
||||
|
||||
} /* namespace frontend */
|
||||
} /* namespace js */
|
||||
|
Loading…
Reference in New Issue
Block a user