Browse Source

MozUtils: JS::Evaluate() don't use `globalJSObject` anymore as bug 1097987 is landed in goanna3 side.

master
Roy Tam 3 years ago
parent
commit
17c3851933
  1. 2
      k-meleon/app/MozUtils.cpp

2
k-meleon/app/MozUtils.cpp

@ -747,7 +747,7 @@ bool InjectJS(nsIDOMWindow* dom, const wchar_t* userScript, CString& result)
JS::CompileOptions opts(cx);
opts.setFileAndLine("kmeleon", 0);
opts.setNoScriptRval(false);
JS::Evaluate(cx, globalJSObject, opts, userScript, wcslen(userScript), &v);
JS::Evaluate(cx, opts, userScript, wcslen(userScript), &v);
::JS_ReportPendingException(cx);
if (v.isString() && !v.isObject()) {
JSString* str = v.toString();

Loading…
Cancel
Save