зеркало из https://github.com/mozilla/pjs.git
fixing readEvalFile() by creating another Context
This commit is contained in:
Родитель
1a7cc4e5cb
Коммит
4a274478e3
|
@ -118,6 +118,7 @@ struct Activation : public gc_base {
|
|||
|
||||
JSValue Context::readEvalFile(FILE* in, const String& fileName)
|
||||
{
|
||||
Context cx(mWorld, mGlobal);
|
||||
String buffer;
|
||||
string line;
|
||||
LineReader inReader(in);
|
||||
|
@ -147,7 +148,7 @@ JSValue Context::readEvalFile(FILE* in, const String& fileName)
|
|||
// list of zero or more statements
|
||||
ICodeModule* icm = genCode(parsedStatements, fileName);
|
||||
if (icm) {
|
||||
result = interpret(icm, emptyArgs);
|
||||
result = cx.interpret(icm, emptyArgs);
|
||||
delete icm;
|
||||
}
|
||||
|
||||
|
|
|
@ -118,6 +118,7 @@ struct Activation : public gc_base {
|
|||
|
||||
JSValue Context::readEvalFile(FILE* in, const String& fileName)
|
||||
{
|
||||
Context cx(mWorld, mGlobal);
|
||||
String buffer;
|
||||
string line;
|
||||
LineReader inReader(in);
|
||||
|
@ -147,7 +148,7 @@ JSValue Context::readEvalFile(FILE* in, const String& fileName)
|
|||
// list of zero or more statements
|
||||
ICodeModule* icm = genCode(parsedStatements, fileName);
|
||||
if (icm) {
|
||||
result = interpret(icm, emptyArgs);
|
||||
result = cx.interpret(icm, emptyArgs);
|
||||
delete icm;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче