| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 9939927222578657e4f83921efb374506f39175f..0f9ea21d378b541e211b3939028ffeac31b49f37 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -3107,8 +3107,10 @@ MaybeHandle<Object> Object::AddDataProperty(LookupIterator* it,
|
| StrictMode strict_mode,
|
| StoreFromKeyed store_mode) {
|
| ASSERT(!it->GetReceiver()->IsJSProxy());
|
| - // Transitions to data properties of value wrappers are not observable.
|
| - if (!it->GetReceiver()->IsJSObject()) return value;
|
| + if (!it->GetReceiver()->IsJSObject()) {
|
| + // TODO(verwaest): Throw a TypeError with a more specific message.
|
| + return WriteToReadOnlyProperty(it, value, strict_mode);
|
| + }
|
| Handle<JSObject> receiver = Handle<JSObject>::cast(it->GetReceiver());
|
|
|
| // If the receiver is a JSGlobalProxy, store on the prototype (JSGlobalObject)
|
|
|