Bug 1332378 - Worklet must evaluate scripts in the right JS compartment, r=nbp

This commit is contained in:
Andrea Marchesini 2017-01-20 14:39:39 +01:00
Родитель 59ca1bd6d8
Коммит e261213b58
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -208,6 +208,8 @@ public:
// since otherwise nsJSUtils::EvaluateString will set it up for us.
compileOptions.setNoScriptRval(true);
JSAutoCompartment comp(cx, globalObj);
JS::Rooted<JS::Value> unused(cx);
if (!JS::Evaluate(cx, compileOptions, buffer, &unused)) {
ErrorResult error;