Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index e0d5285ed699946071841b89f4498a4565f38075..76bb714d1bad5606f0cd048705c487b1b6664e1c 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -607,7 +607,7 @@ class CaptureStackTraceHelper { |
if (!function_key_.is_null()) { |
Object* wasm_object = frame->wasm_obj(); |
Handle<String> name; |
- if (!wasm_object->IsUndefined()) { |
+ if (!wasm_object->IsUndefined(isolate_)) { |
Handle<JSObject> wasm = handle(JSObject::cast(wasm_object)); |
wasm::GetWasmFunctionName(wasm, frame->function_index()) |
.ToHandle(&name); |
@@ -1392,7 +1392,8 @@ bool Isolate::ComputeLocation(MessageLocation* target) { |
if (!frame->is_java_script()) return false; |
JSFunction* fun = JavaScriptFrame::cast(frame)->function(); |
Object* script = fun->shared()->script(); |
- if (!script->IsScript() || (Script::cast(script)->source()->IsUndefined())) { |
+ if (!script->IsScript() || |
+ (Script::cast(script)->source()->IsUndefined(this))) { |
return false; |
} |
Handle<Script> casted_script(Script::cast(script)); |
@@ -1457,7 +1458,7 @@ bool Isolate::ComputeLocationFromStackTrace(MessageLocation* target, |
Object* script = fun->shared()->script(); |
if (script->IsScript() && |
- !(Script::cast(script)->source()->IsUndefined())) { |
+ !(Script::cast(script)->source()->IsUndefined(this))) { |
int pos = PositionFromStackTrace(elements, i); |
Handle<Script> casted_script(Script::cast(script)); |
*target = MessageLocation(casted_script, pos, pos + 1); |
@@ -1581,7 +1582,7 @@ void Isolate::ReportPendingMessages() { |
} |
// Actually report the pending message to all message handlers. |
- if (!message_obj->IsTheHole() && should_report_exception) { |
+ if (!message_obj->IsTheHole(this) && should_report_exception) { |
HandleScope scope(this); |
Handle<JSMessageObject> message(JSMessageObject::cast(message_obj)); |
Handle<JSValue> script_wrapper(JSValue::cast(message->script())); |
@@ -1598,7 +1599,7 @@ MessageLocation Isolate::GetMessageLocation() { |
DCHECK(has_pending_exception()); |
if (thread_local_top_.pending_exception_ != heap()->termination_exception() && |
- !thread_local_top_.pending_message_obj_->IsTheHole()) { |
+ !thread_local_top_.pending_message_obj_->IsTheHole(this)) { |
Handle<JSMessageObject> message_obj( |
JSMessageObject::cast(thread_local_top_.pending_message_obj_)); |
Handle<JSValue> script_wrapper(JSValue::cast(message_obj->script())); |
@@ -2170,7 +2171,7 @@ bool Isolate::PropagatePendingExceptionToExternalTryCatch() { |
handler->has_terminated_ = false; |
handler->exception_ = pending_exception(); |
// Propagate to the external try-catch only if we got an actual message. |
- if (thread_local_top_.pending_message_obj_->IsTheHole()) return true; |
+ if (thread_local_top_.pending_message_obj_->IsTheHole(this)) return true; |
handler->message_obj_ = thread_local_top_.pending_message_obj_; |
} |
@@ -2512,7 +2513,7 @@ Map* Isolate::get_initial_js_array_map(ElementsKind kind) { |
DisallowHeapAllocation no_gc; |
Object* const initial_js_array_map = |
context()->native_context()->get(Context::ArrayMapIndex(kind)); |
- if (!initial_js_array_map->IsUndefined()) { |
+ if (!initial_js_array_map->IsUndefined(this)) { |
return Map::cast(initial_js_array_map); |
} |
} |
@@ -2626,7 +2627,7 @@ bool Isolate::IsIsConcatSpreadableLookupChainIntact() { |
Handle<Symbol> key = factory()->is_concat_spreadable_symbol(); |
Handle<Object> value; |
LookupIterator it(array_prototype, key); |
- if (it.IsFound() && !JSReceiver::GetDataProperty(&it)->IsUndefined()) { |
+ if (it.IsFound() && !JSReceiver::GetDataProperty(&it)->IsUndefined(this)) { |
// TODO(cbruni): Currently we do not revert if we unset the |
// @@isConcatSpreadable property on Array.prototype or Object.prototype |
// hence the reverse implication doesn't hold. |
@@ -2832,7 +2833,7 @@ void Isolate::EnqueueMicrotask(Handle<Object> microtask) { |
queue = factory()->CopyFixedArrayAndGrow(queue, num_tasks); |
heap()->set_microtask_queue(*queue); |
} |
- DCHECK(queue->get(num_tasks)->IsUndefined()); |
+ DCHECK(queue->get(num_tasks)->IsUndefined(this)); |
queue->set(num_tasks, *microtask); |
set_pending_microtask_count(num_tasks + 1); |
} |