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

Unified Diff: src/messages.cc

Issue 2601503002: Add Object::IsNullOrUndefined(Isolate*) helper method (Closed)
Patch Set: fixing merge conflicts Created 3 years, 11 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 | « src/inspector/string-util.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/messages.cc
diff --git a/src/messages.cc b/src/messages.cc
index 801678bbae0e978947d2c899af515d46c80e8eef..25753d247d19dd2395015776231e53764c0d14bc 100644
--- a/src/messages.cc
+++ b/src/messages.cc
@@ -371,7 +371,7 @@ Handle<Object> JSStackFrame::GetScriptNameOrSourceUrl() {
}
Handle<Object> JSStackFrame::GetMethodName() {
- if (receiver_->IsNull(isolate_) || receiver_->IsUndefined(isolate_)) {
+ if (receiver_->IsNullOrUndefined(isolate_)) {
return isolate_->factory()->null_value();
}
@@ -428,7 +428,7 @@ Handle<Object> JSStackFrame::GetTypeName() {
// TODO(jgruber): Check for strict/constructor here as in
// CallSitePrototypeGetThis.
- if (receiver_->IsNull(isolate_) || receiver_->IsUndefined(isolate_))
+ if (receiver_->IsNullOrUndefined(isolate_))
return isolate_->factory()->null_value();
if (receiver_->IsJSProxy()) return isolate_->factory()->Proxy_string();
@@ -457,8 +457,7 @@ bool JSStackFrame::IsNative() {
}
bool JSStackFrame::IsToplevel() {
- return receiver_->IsJSGlobalProxy() || receiver_->IsNull(isolate_) ||
- receiver_->IsUndefined(isolate_);
+ return receiver_->IsJSGlobalProxy() || receiver_->IsNullOrUndefined(isolate_);
}
bool JSStackFrame::IsConstructor() {
« no previous file with comments | « src/inspector/string-util.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698