Changed method signature of EvaluateScript to return nsresult. Added nsJSThreadContextStack pushing and popping around script evaluation.

git-svn-id: svn://10.0.0.236/trunk@43669 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
vidur%netscape.com
1999-08-19 20:36:31 +00:00
parent d70dfd8146
commit 29bf6d365c
10 changed files with 87 additions and 44 deletions

View File

@@ -105,11 +105,11 @@ public:
nsAutoString ret;
PRBool isUndefined;
PRBool ok;
nsresult ok;
ok = scriptContext->EvaluateString(nsString(jsExpr),
nsnull, 0, ret, &isUndefined);
nsCRT::free(jsExpr);
if (ok) {
if (NS_SUCCEEDED(ok)) {
// JSContext* cx = (JSContext*)scriptContext->GetNativeContext();
// Find out if it can be converted into a string
if (!isUndefined) {