| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 9d20f6c503a68917fc94a134d0191ccc311aa969..c75544c090485139e9a257d1afb1e9d5170b26d6 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -7451,7 +7451,7 @@ bool JSFunction::IsInlineable() {
|
|
|
|
|
| MaybeObject* JSFunction::SetInstancePrototype(Object* value) {
|
| - ASSERT(value->IsJSObject());
|
| + ASSERT(value->IsJSReceiver());
|
| Heap* heap = GetHeap();
|
| if (has_initial_map()) {
|
| // If the function has allocated the initial map
|
| @@ -7478,11 +7478,11 @@ MaybeObject* JSFunction::SetPrototype(Object* value) {
|
| ASSERT(should_have_prototype());
|
| Object* construct_prototype = value;
|
|
|
| - // If the value is not a JSObject, store the value in the map's
|
| + // If the value is not a JSReceiver, store the value in the map's
|
| // constructor field so it can be accessed. Also, set the prototype
|
| // used for constructing objects to the original object prototype.
|
| // See ECMA-262 13.2.2.
|
| - if (!value->IsJSObject()) {
|
| + if (!value->IsJSReceiver()) {
|
| // Copy the map so this does not affect unrelated functions.
|
| // Remove map transitions because they point to maps with a
|
| // different prototype.
|
|
|