gecko/js/xpconnect/tests/chrome/file_expandosharing.jsm
Kyle Huey 1482122303 Bug 798491: Add an option to stick all chrome JSMs/JS components in the same compartment. r=mrbkap,philikon
--HG--
extra : rebase_source : 98337b6a8c07d05e8c961a452dd05a7d75c3c60b
2012-10-31 09:13:28 -07:00

11 lines
394 B
JavaScript

this.EXPORTED_SYMBOLS = ['checkFromJSM'];
this.checkFromJSM = function checkFromJSM(target, is_op) {
is_op(target.numProp, 42, "Number expando works");
is_op(target.strProp, "foo", "String expando works");
// If is_op is todo_is, target.objProp will be undefined.
try {
is_op(target.objProp.bar, "baz", "Object expando works");
} catch(e) { is_op(0, 1, "No object expando"); }
}