Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 9ef4b5d6d9352e22b4f954bcb58af0d825d4666f..4459db8107b849ce41faa5f3e239a80372493156 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -4951,7 +4951,7 @@ HInstruction* HGraphBuilder::BuildStoreNamedField(HValue* object, |
// If the property does not exist yet, we have to check that it wasn't made |
// readonly or turned into a setter by some meanwhile modifications on the |
// prototype chain. |
- if (!lookup->IsProperty()) { |
+ if (!lookup->IsProperty() && type->prototype()->IsJSReceiver()) { |
Object* proto = type->prototype(); |
// First check that the prototype chain isn't affected already. |
LookupResult proto_result(isolate()); |