fix PerformCastCheck on v8::Data
PerformCheckCast<Data>() itself should not invoke Data::Cast(), since there is no such method and every publicly available value can be casted to it anyway. This is an issue in e.g. GetDataFromSnapshotOnce<Data>(). Change-Id: I5d9ee89657c31bc0ca1fb16e704df58911c85f6c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2383030 Commit-Queue: Gus Caplan <snek@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#69622}
This commit is contained in:
parent
136670652c
commit
61216077be
@ -414,7 +414,8 @@ void CastCheck<false>::Perform(T* data) {}
|
||||
|
||||
template <class T>
|
||||
V8_INLINE void PerformCastCheck(T* data) {
|
||||
CastCheck<std::is_base_of<Data, T>::value>::Perform(data);
|
||||
CastCheck<std::is_base_of<Data, T>::value &&
|
||||
!std::is_same<Data, std::remove_cv<T>>::value>::Perform(data);
|
||||
}
|
||||
|
||||
// A base class for backing stores, which is needed due to vagaries of
|
||||
|
Loading…
Reference in New Issue
Block a user