зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1252912 - Ensure that we wrap the results of the shortestPaths JS shell testing function. r=jimb
--HG-- extra : rebase_source : 997441c17bb884a7edaf17e5ee83c17f15112253
This commit is contained in:
Родитель
8dafb27e55
Коммит
67c2983eed
|
@ -2776,8 +2776,11 @@ ShortestPaths(JSContext* cx, unsigned argc, Value* vp)
|
|||
return false;
|
||||
|
||||
RootedValue predecessor(cx, values[i][j][k]);
|
||||
if (!JS_DefineProperty(cx, part, "predecessor", predecessor, JSPROP_ENUMERATE))
|
||||
if (!cx->compartment()->wrap(cx, &predecessor) ||
|
||||
!JS_DefineProperty(cx, part, "predecessor", predecessor, JSPROP_ENUMERATE))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (names[i][j][k]) {
|
||||
RootedString edge(cx, NewStringCopyZ<CanGC>(cx, names[i][j][k].get()));
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
try {
|
||||
x = evalcx('')
|
||||
toSource = (function() {
|
||||
})
|
||||
} catch (foo) {}
|
||||
shortestPaths(this, ["$4"], 5)
|
Загрузка…
Ссылка в новой задаче