Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- Manifest: js/xpconnect/tests/unit/xpcshell.toml
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
function run_test() {
function checkOpaqueWrapper(val) {
unprivilegedSb.prop = val;
try {
Cu.evalInSandbox('prop();', sb);
} catch (e) {
Assert.ok(/denied|insecure|/.test(e));
}
}
checkOpaqueWrapper(eval);
checkOpaqueWrapper(xoSb.eval);
checkOpaqueWrapper(epSb.eval);
checkOpaqueWrapper(Function);
checkOpaqueWrapper(xoSb.Function);
checkOpaqueWrapper(epSb.Function);
}