Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index ddf62b153cb6e98dbb8291b9184a1ebe35c975e8..6ab360485979f7cba4335977eb88b4425aa169c0 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -16041,12 +16041,11 @@ MaybeHandle<JSRegExp> JSRegExp::Initialize(Handle<JSRegExp> regexp, |
Smi::FromInt(0), SKIP_WRITE_BARRIER); |
} else { |
// Map has changed, so use generic, but slower, method. |
- PropertyAttributes writable = |
- static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE); |
- JSObject::SetOwnPropertyIgnoreAttributes( |
- regexp, factory->last_index_string(), |
- Handle<Smi>(Smi::FromInt(0), isolate), writable) |
- .Check(); |
+ RETURN_ON_EXCEPTION( |
+ isolate, |
+ JSReceiver::SetProperty(regexp, factory->last_index_string(), |
+ Handle<Smi>(Smi::FromInt(0), isolate), STRICT), |
+ JSRegExp); |
} |
return regexp; |