As @paul-s mentioned you have a problem with a closure inside your loop. A simple fix:
var obj = {"one":1, "two":2, "three":3};
var cloned = {};
function makeReadOnlyProperty(cloned, obj, prop) {
Object.defineProperty(cloned, prop,
{
set: function()
{
throw new UnableRewriteException('original cannot be rewrite');
},
get: function()
{
return obj[prop]
},
enumerable: true
});
}
for (var prop in obj)
{
makeReadOnlyProperty(cloned, obj, prop);
}