1 var ContextifyContext
= require('bindings')('contextify').ContextifyContext
;
3 module
.exports
= function Contextify (sandbox
) {
4 if (typeof sandbox
!= 'object') {
7 var ctx
= new ContextifyContext(sandbox
);
9 sandbox
.run = function () {
10 return ctx
.run
.apply(ctx
, arguments
);
13 sandbox
.getGlobal = function () {
14 return ctx
.getGlobal();
17 sandbox
.dispose = function () {
18 sandbox
.run = function () {
19 throw new Error("Called run() after dispose().");
21 sandbox
.getGlobal = function () {
22 throw new Error("Called getGlobal() after dispose().");
24 sandbox
.dispose = function () {
25 throw new Error("Called dispose() after dispose().");