Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 74af575afbfc8f0d3b32f65e040e7670d67753e4..158de1452bd2b50e4e081950a0f1d276091cffc8 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -7533,16 +7533,13 @@ MaybeObject* JSFunction::SetPrototype(Object* value) { |
} |
-Object* JSFunction::RemovePrototype() { |
+void JSFunction::RemovePrototype() { |
Context* native_context = context()->native_context(); |
Map* no_prototype_map = shared()->is_classic_mode() |
? native_context->function_without_prototype_map() |
: native_context->strict_mode_function_without_prototype_map(); |
- if (map() == no_prototype_map) { |
- // Be idempotent. |
- return this; |
- } |
+ if (map() == no_prototype_map) return; |
ASSERT(map() == (shared()->is_classic_mode() |
? native_context->function_map() |
@@ -7550,13 +7547,11 @@ Object* JSFunction::RemovePrototype() { |
set_map(no_prototype_map); |
set_prototype_or_initial_map(no_prototype_map->GetHeap()->the_hole_value()); |
- return this; |
} |
-Object* JSFunction::SetInstanceClassName(String* name) { |
+void JSFunction::SetInstanceClassName(String* name) { |
shared()->set_instance_class_name(name); |
- return this; |
} |