diff options
Diffstat (limited to 'deps/v8/src/objects/lookup.cc')
-rw-r--r-- | deps/v8/src/objects/lookup.cc | 52 |
1 files changed, 9 insertions, 43 deletions
diff --git a/deps/v8/src/objects/lookup.cc b/deps/v8/src/objects/lookup.cc index f0f3a21bafe..d5fbf7c894a 100644 --- a/deps/v8/src/objects/lookup.cc +++ b/deps/v8/src/objects/lookup.cc @@ -4,7 +4,6 @@ #include "src/objects/lookup.h" -#include "include/v8config.h" #include "src/deoptimizer/deoptimizer.h" #include "src/execution/isolate-inl.h" #include "src/execution/protectors-inl.h" @@ -193,21 +192,11 @@ void LookupIterator::InternalUpdateProtector(Isolate* isolate, if (!receiver_generic->IsHeapObject()) return; Handle<HeapObject> receiver = Handle<HeapObject>::cast(receiver_generic); - // Getting the native_context from the isolate as a fallback. If possible, we - // use the receiver's creation context instead. - Handle<NativeContext> native_context = isolate->native_context(); - ReadOnlyRoots roots(isolate); if (*name == roots.constructor_string()) { - // Fetching the context in here since the operation is rather expensive. - if (receiver->IsJSReceiver()) { - native_context = Handle<JSReceiver>::cast(receiver)->GetCreationContext(); - } - if (!Protectors::IsArraySpeciesLookupChainIntact(isolate) && !Protectors::IsPromiseSpeciesLookupChainIntact(isolate) && - !Protectors::IsRegExpSpeciesLookupChainProtectorIntact( - native_context) && + !Protectors::IsRegExpSpeciesLookupChainIntact(isolate) && !Protectors::IsTypedArraySpeciesLookupChainIntact(isolate)) { return; } @@ -223,12 +212,8 @@ void LookupIterator::InternalUpdateProtector(Isolate* isolate, Protectors::InvalidatePromiseSpeciesLookupChain(isolate); return; } else if (receiver->IsJSRegExp(isolate)) { - if (!Protectors::IsRegExpSpeciesLookupChainProtectorIntact( - native_context)) { - return; - } - Protectors::InvalidateRegExpSpeciesLookupChainProtector(isolate, - native_context); + if (!Protectors::IsRegExpSpeciesLookupChainIntact(isolate)) return; + Protectors::InvalidateRegExpSpeciesLookupChain(isolate); return; } else if (receiver->IsJSTypedArray(isolate)) { if (!Protectors::IsTypedArraySpeciesLookupChainIntact(isolate)) return; @@ -254,12 +239,8 @@ void LookupIterator::InternalUpdateProtector(Isolate* isolate, Protectors::InvalidatePromiseSpeciesLookupChain(isolate); } else if (isolate->IsInAnyContext(*receiver, Context::REGEXP_PROTOTYPE_INDEX)) { - if (!Protectors::IsRegExpSpeciesLookupChainProtectorIntact( - native_context)) { - return; - } - Protectors::InvalidateRegExpSpeciesLookupChainProtector(isolate, - native_context); + if (!Protectors::IsRegExpSpeciesLookupChainIntact(isolate)) return; + Protectors::InvalidateRegExpSpeciesLookupChain(isolate); } else if (isolate->IsInAnyContext( receiver->map(isolate).prototype(isolate), Context::TYPED_ARRAY_PROTOTYPE_INDEX)) { @@ -295,15 +276,9 @@ void LookupIterator::InternalUpdateProtector(Isolate* isolate, Protectors::InvalidateStringIteratorLookupChain(isolate); } } else if (*name == roots.species_symbol()) { - // Fetching the context in here since the operation is rather expensive. - if (receiver->IsJSReceiver()) { - native_context = Handle<JSReceiver>::cast(receiver)->GetCreationContext(); - } - if (!Protectors::IsArraySpeciesLookupChainIntact(isolate) && !Protectors::IsPromiseSpeciesLookupChainIntact(isolate) && - !Protectors::IsRegExpSpeciesLookupChainProtectorIntact( - native_context) && + !Protectors::IsRegExpSpeciesLookupChainIntact(isolate) && !Protectors::IsTypedArraySpeciesLookupChainIntact(isolate)) { return; } @@ -320,12 +295,8 @@ void LookupIterator::InternalUpdateProtector(Isolate* isolate, Protectors::InvalidatePromiseSpeciesLookupChain(isolate); } else if (isolate->IsInAnyContext(*receiver, Context::REGEXP_FUNCTION_INDEX)) { - if (!Protectors::IsRegExpSpeciesLookupChainProtectorIntact( - native_context)) { - return; - } - Protectors::InvalidateRegExpSpeciesLookupChainProtector(isolate, - native_context); + if (!Protectors::IsRegExpSpeciesLookupChainIntact(isolate)) return; + Protectors::InvalidateRegExpSpeciesLookupChain(isolate); } else if (IsTypedArrayFunctionInAnyContext(isolate, *receiver)) { if (!Protectors::IsTypedArraySpeciesLookupChainIntact(isolate)) return; Protectors::InvalidateTypedArraySpeciesLookupChain(isolate); @@ -943,12 +914,7 @@ Handle<Map> LookupIterator::GetFieldOwnerMap() const { isolate_); } -#if defined(__clang__) && defined(V8_OS_WIN) -// Force function alignment to work around CPU bug: https://crbug.com/968683 -__attribute__((__aligned__(32))) -#endif -FieldIndex -LookupIterator::GetFieldIndex() const { +FieldIndex LookupIterator::GetFieldIndex() const { DCHECK(has_property_); DCHECK(holder_->HasFastProperties(isolate_)); DCHECK_EQ(kField, property_details_.location()); |