Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Unified Diff: src/objects.cc

Issue 1366063002: [es6] Remove left-overs from Function.prototype.toMethod. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « src/objects.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698