diff --git a/lib/vm.js b/lib/vm.js index 45f0f59150..d3348afac5 100644 --- a/lib/vm.js +++ b/lib/vm.js @@ -21,19 +21,6 @@ var binding = process.binding('evals'); -binding.NodeScript._setCloneMethod(function(source, target) { - Object.getOwnPropertyNames(source).forEach(function(key) { - try { - var desc = Object.getOwnPropertyDescriptor(source, key); - if (desc.value === source) desc.value = target; - - Object.defineProperty(target, key, desc); - } catch (e) { - // Catch sealed properties errors - } - }); -}); - exports.Script = binding.NodeScript; exports.createScript = function(code, ctx, name) { return new exports.Script(code, ctx, name); diff --git a/src/node_script.cc b/src/node_script.cc index 019597485f..4f4153caa9 100644 --- a/src/node_script.cc +++ b/src/node_script.cc @@ -37,11 +37,9 @@ using v8::TryCatch; using v8::String; using v8::Exception; using v8::Local; -using v8::Null; using v8::Array; using v8::Persistent; using v8::Integer; -using v8::Function; using v8::FunctionTemplate; @@ -96,23 +94,10 @@ class WrappedScript : ObjectWrap { static Handle CompileRunInThisContext(const Arguments& args); static Handle CompileRunInNewContext(const Arguments& args); - static Handle SetCloneMethod(const Arguments& args); - Persistent