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
a12ca3e4e8
commit
639d62a891
@ -54,8 +54,8 @@ JSCompartment::wrap(JSContext *cx, JS::MutableHandleValue vp, JS::HandleObject e
|
||||
|
||||
/* Handle strings. */
|
||||
if (vp.isString()) {
|
||||
JSString *str = vp.toString();
|
||||
if (!wrap(cx, &str))
|
||||
JS::RootedString str(cx, vp.toString());
|
||||
if (!wrap(cx, str.address()))
|
||||
return false;
|
||||
vp.setString(str);
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user