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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user