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

Unified Diff: src/elements.cc

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixing wrongly wrapped lines Created 4 years, 7 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
Index: src/elements.cc
diff --git a/src/elements.cc b/src/elements.cc
index 6814197662e771a2ce9454ff12726763aa87c3af..ee72806b535761291297d1cfc020f0b671d150cb 100644
--- a/src/elements.cc
+++ b/src/elements.cc
@@ -1256,7 +1256,7 @@ class DictionaryElementsAccessor
DisallowHeapAllocation no_gc;
SeededNumberDictionary* dict = SeededNumberDictionary::cast(store);
Object* index = dict->KeyAt(entry);
- return !index->IsTheHole();
+ return !index->IsTheHole(dict->GetIsolate());
}
static uint32_t GetIndexForEntryImpl(FixedArrayBase* store, uint32_t entry) {
@@ -1820,7 +1820,7 @@ class FastElementsAccessor : public ElementsAccessorBase<Subclass, KindTraits> {
}
Subclass::SetLengthImpl(isolate, receiver, new_length, backing_store);
- if (IsHoleyElementsKind(kind) && result->IsTheHole()) {
+ if (IsHoleyElementsKind(kind) && result->IsTheHole(isolate)) {
return isolate->factory()->undefined_value();
}
return result;
@@ -2427,7 +2427,7 @@ class SloppyArgumentsElementsAccessor
uint32_t length = parameter_map->length() - 2;
for (uint32_t i = 0; i < length; ++i) {
- if (parameter_map->get(i + 2)->IsTheHole()) continue;
+ if (parameter_map->get(i + 2)->IsTheHole(isolate)) continue;
if (convert == GetKeysConversion::kConvertToString) {
Handle<String> index_string = isolate->factory()->Uint32ToString(i);
list->set(insertion_index, *index_string);

Powered by Google App Engine
This is Rietveld 408576698