mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 909866 - Fix an exact rooting hazard in JSCompartment::wrap; r=sfink
--HG-- extra : rebase_source : 637cea3f6c93a333bfe9000f0837663fd0905853
This commit is contained in:
parent
4aeeb65d91
commit
c1259eea9d
@ -54,8 +54,8 @@ JSCompartment::wrap(JSContext *cx, JS::MutableHandleValue vp, JS::HandleObject e
|
|||||||
|
|
||||||
/* Handle strings. */
|
/* Handle strings. */
|
||||||
if (vp.isString()) {
|
if (vp.isString()) {
|
||||||
JSString *str = vp.toString();
|
JS::RootedString str(cx, vp.toString());
|
||||||
if (!wrap(cx, &str))
|
if (!wrap(cx, str.address()))
|
||||||
return false;
|
return false;
|
||||||
vp.setString(str);
|
vp.setString(str);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user