mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 580128 - Enter the right compartment when calling toString. r=jst
This commit is contained in:
parent
adcddf1716
commit
d5907b5ac9
@ -1715,6 +1715,10 @@ nsJSContext::EvaluateString(const nsAString& aScript,
|
||||
// If all went well, convert val to a string if one is wanted.
|
||||
if (ok) {
|
||||
JSAutoRequest ar(mContext);
|
||||
JSAutoEnterCompartment ac;
|
||||
if (!ac.enter(mContext, (JSObject *)aScopeObject)) {
|
||||
stack->Pop(nsnull);
|
||||
}
|
||||
rv = JSValueToAString(mContext, val, aRetValue, aIsUndefined);
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user