| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 9cda2baf0d44476c6aeef51b8deb600a5fe35395..a544c8686563fd84109f18eec414bc215f78d138 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -5507,8 +5507,11 @@ static void FreezeDictionary(Dictionary* dictionary) {
|
| PropertyDetails details = dictionary->DetailsAt(i);
|
| int attrs = DONT_DELETE;
|
| // READ_ONLY is an invalid attribute for JS setters/getters.
|
| - if (details.type() != CALLBACKS ||
|
| - !dictionary->ValueAt(i)->IsAccessorPair()) {
|
| + if (details.type() == CALLBACKS) {
|
| + Object* v = dictionary->ValueAt(i);
|
| + if (v->IsPropertyCell()) v = PropertyCell::cast(v)->value();
|
| + if (!v->IsAccessorPair()) attrs |= READ_ONLY;
|
| + } else {
|
| attrs |= READ_ONLY;
|
| }
|
| details = details.CopyAddAttributes(
|
|
|