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

Unified Diff: src/ic/ic.cc

Issue 2043183003: Replace all remaining Oddball checks with new function (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: simplifying checks Created 4 years, 6 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/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index 8036a6ede1d6618e07235f0e2dcb2ea6ba491971..1bf4d62d2d34cc848531d44e4e279744f71a4a57 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -305,7 +305,7 @@ void IC::UpdateState(Handle<Object> receiver, Handle<Object> name) {
update_receiver_map(receiver);
if (!name->IsString()) return;
if (state() != MONOMORPHIC && state() != POLYMORPHIC) return;
- if (receiver->IsUndefined(isolate()) || receiver->IsNull()) return;
+ if (receiver->IsUndefined(isolate()) || receiver->IsNull(isolate())) return;
// Remove the target from the code cache if it became invalid
// because of changes in the prototype chain to avoid hitting it
@@ -589,7 +589,7 @@ void IC::ConfigureVectorState(MapHandleList* maps,
MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<Name> name) {
// If the object is undefined or null it's illegal to try to get any
// of its properties; throw a TypeError in that case.
- if (object->IsUndefined(isolate()) || object->IsNull()) {
+ if (object->IsUndefined(isolate()) || object->IsNull(isolate())) {
return TypeError(MessageTemplate::kNonObjectPropertyLoad, object, name);
}
@@ -1526,7 +1526,7 @@ MaybeHandle<Object> StoreIC::Store(Handle<Object> object, Handle<Name> name,
// If the object is undefined or null it's illegal to try to set any
// properties on it; throw a TypeError in that case.
- if (object->IsUndefined(isolate()) || object->IsNull()) {
+ if (object->IsUndefined(isolate()) || object->IsNull(isolate())) {
return TypeError(MessageTemplate::kNonObjectPropertyStore, object, name);
}
« no previous file with comments | « src/ic/handler-compiler.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698