Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 3e88c961eef0756bc54e58bbae3d0a2076beebd2..02d8d3481f636d0b90702251b59684cde3eb8861 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -10134,30 +10134,6 @@ void JSFunction::AttemptConcurrentOptimization() { |
} |
-Handle<JSFunction> JSFunction::CloneClosure(Handle<JSFunction> function) { |
- Isolate* isolate = function->GetIsolate(); |
- Handle<Map> map(function->map()); |
- Handle<SharedFunctionInfo> shared(function->shared()); |
- Handle<Context> context(function->context()); |
- Handle<JSFunction> clone = |
- isolate->factory()->NewFunctionFromSharedFunctionInfo(shared, context); |
- |
- if (shared->bound()) { |
- clone->set_function_bindings(function->function_bindings()); |
- } |
- |
- // In typical case, __proto__ of ``function`` is the default Function |
- // prototype, which means that SetPrototype below is a no-op. |
- // In rare cases when that is not true, we mutate the clone's __proto__. |
- Handle<Object> original_prototype(map->prototype(), isolate); |
- if (*original_prototype != clone->map()->prototype()) { |
- JSObject::SetPrototype(clone, original_prototype, false).Assert(); |
- } |
- |
- return clone; |
-} |
- |
- |
void SharedFunctionInfo::AddSharedCodeToOptimizedCodeMap( |
Handle<SharedFunctionInfo> shared, Handle<Code> code) { |
Isolate* isolate = shared->GetIsolate(); |