зеркало из https://github.com/mozilla/gecko-dev.git
e45aad00ec
This patch allows specifying an OriginAttributes when creating a sandbox using Components.utils.Sandbox() by specifying an originAttributes member on the options dictionary. If an OA is specified in this way, it is used for creating codebase principals from the string arguments passed to the function. Otherwise, if one or more principals are passed in the array argument to Sandbox(), the OA of the principal(s) is used to construct codebase principals from the strings inside the array. In this case, we check to make sure that all of the passed principals have the same OA, otherwise we'll throw an exception. In case no explicit OA is specified and no principals are passed in the array argument, we create the codebase principals using a default OA. |
||
---|---|---|
.. | ||
test_origin.js | ||
xpcshell.ini |