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

Unified Diff: src/messages.cc

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase master 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
« no previous file with comments | « src/lookup.cc ('k') | src/mips/code-stubs-mips.cc » ('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 7228ba215110a0fd87bcb817419f35dd2ef2334b..c9b585405af265b07b0481e83dfb65e1182bf37a 100644
--- a/src/messages.cc
+++ b/src/messages.cc
@@ -130,7 +130,7 @@ void MessageHandler::ReportMessage(Isolate* isolate, MessageLocation* loc,
} else {
for (int i = 0; i < global_length; i++) {
HandleScope scope(isolate);
- if (global_listeners.get(i)->IsUndefined()) continue;
+ if (global_listeners.get(i)->IsUndefined(isolate)) continue;
v8::NeanderObject listener(JSObject::cast(global_listeners.get(i)));
Handle<Foreign> callback_obj(Foreign::cast(listener.get(0)));
v8::MessageCallback callback =
@@ -139,7 +139,7 @@ void MessageHandler::ReportMessage(Isolate* isolate, MessageLocation* loc,
{
// Do not allow exceptions to propagate.
v8::TryCatch try_catch(reinterpret_cast<v8::Isolate*>(isolate));
- callback(api_message_obj, callback_data->IsUndefined()
+ callback(api_message_obj, callback_data->IsUndefined(isolate)
? api_exception_obj
: v8::Utils::ToLocal(callback_data));
}
@@ -251,7 +251,8 @@ bool CheckMethodName(Isolate* isolate, Handle<JSObject> obj, Handle<Name> name,
Handle<Object> CallSite::GetMethodName() {
- if (!IsJavaScript() || receiver_->IsNull() || receiver_->IsUndefined()) {
+ if (!IsJavaScript() || receiver_->IsNull() ||
+ receiver_->IsUndefined(isolate_)) {
return isolate_->factory()->null_value();
}
Handle<JSReceiver> receiver =
@@ -344,7 +345,7 @@ bool CallSite::IsNative() {
bool CallSite::IsToplevel() {
if (IsWasm()) return false;
return receiver_->IsJSGlobalProxy() || receiver_->IsNull() ||
- receiver_->IsUndefined();
+ receiver_->IsUndefined(isolate_);
}
« no previous file with comments | « src/lookup.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698