Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(776)

Unified Diff: src/lookup.cc

Issue 1025433002: Add debug checks to catch PropertyCell::cast failures. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/lookup-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lookup.cc
diff --git a/src/lookup.cc b/src/lookup.cc
index e5eecce234116e1098c8bd23e5c2fdc6fc1bb9d0..2b69aa67959f957a0fc283a6b4d30892257ec081 100644
--- a/src/lookup.cc
+++ b/src/lookup.cc
@@ -256,6 +256,7 @@ Handle<Object> LookupIterator::FetchValue() const {
if (holder_map_->is_dictionary_map()) {
result = holder->property_dictionary()->ValueAt(number_);
if (holder_map_->IsGlobalObjectMap()) {
+ DCHECK(result->IsPropertyCell());
result = PropertyCell::cast(result)->value();
}
} else if (property_details_.type() == v8::internal::DATA) {
@@ -310,6 +311,7 @@ Handle<PropertyCell> LookupIterator::GetPropertyCell() const {
Handle<JSObject> holder = GetHolder<JSObject>();
Handle<GlobalObject> global = Handle<GlobalObject>::cast(holder);
Object* value = global->property_dictionary()->ValueAt(dictionary_entry());
+ DCHECK(value->IsPropertyCell());
return Handle<PropertyCell>(PropertyCell::cast(value));
}
« no previous file with comments | « no previous file | src/lookup-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698