patch from peterv.  We can't use js_* in this module because they're libjs' private stash.  I got away with it on Linux somehow, but not on mac, and probably not on windows.  jsd_EvaluateScriptInStackFrame now uses JS_EvaluateInStackFrame, instead of doing the inflation itself and calling JS_EvaluateUCInStackFrame.
This commit is contained in:
rginda%netscape.com 2001-04-24 23:02:58 +00:00
Родитель f5d55452bc
Коммит 180a87ba2f
1 изменённых файлов: 11 добавлений и 11 удалений

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

@ -25,7 +25,6 @@
*/
#include "jsd.h"
#include "jsstr.h"
#ifdef DEBUG
void JSD_ASSERT_VALID_THREAD_STATE(JSDThreadState* jsdthreadstate)
@ -333,9 +332,9 @@ jsd_EvaluateScriptInStackFrame(JSDContext* jsdc,
const char *bytes, uintN length,
const char *filename, uintN lineno, jsval *rval)
{
jschar *chars;
JSBool retval;
JSBool valid;
JSBool ok;
JSExceptionState* exceptionState;
JSContext *cx;
JS_ASSERT(JSD_CURRENT_THREAD() == jsdthreadstate->thread);
@ -349,14 +348,15 @@ jsd_EvaluateScriptInStackFrame(JSDContext* jsdc,
cx = jsdthreadstate->context;
JS_ASSERT(cx);
chars = js_InflateString(cx, bytes, length);
if (!chars)
return JS_FALSE;
ok = jsd_EvaluateUCScriptInStackFrame(jsdc, jsdthreadstate, jsdframe, chars,
length, filename, lineno, rval);
JS_free(cx, chars);
return ok;
exceptionState = JS_SaveExceptionState(cx);
jsd_StartingEvalUsingFilename(jsdc, filename);
retval = JS_EvaluateInStackFrame(cx, jsdframe->fp, bytes, length,
filename, lineno, rval);
jsd_FinishedEvalUsingFilename(jsdc, filename);
JS_RestoreExceptionState(cx, exceptionState);
return retval;
}
JSString*