| Index: src/debug/debug.cc
|
| diff --git a/src/debug/debug.cc b/src/debug/debug.cc
|
| index 948cf41f0373c7f7142564e4fece13c9114a57f0..d41491e64b5e38037c0f2c90c920232bfb852df1 100644
|
| --- a/src/debug/debug.cc
|
| +++ b/src/debug/debug.cc
|
| @@ -588,14 +588,14 @@ void Debug::Break(JavaScriptFrame* frame) {
|
| // Return if we failed to retrieve the debug info.
|
| return;
|
| }
|
| - Handle<DebugInfo> debug_info(shared->GetDebugInfo());
|
| + Handle<DebugInfo> debug_info(shared->GetDebugInfo(), isolate_);
|
|
|
| // Find the break location where execution has stopped.
|
| BreakLocation location = BreakLocation::FromFrame(debug_info, frame);
|
|
|
| // Find actual break points, if any, and trigger debug break event.
|
| Handle<Object> break_points_hit = CheckBreakPoints(&location);
|
| - if (!break_points_hit->IsUndefined()) {
|
| + if (!break_points_hit->IsUndefined(isolate_)) {
|
| // Clear all current stepping setup.
|
| ClearStepping();
|
| // Notify the debug event listeners.
|
| @@ -666,7 +666,7 @@ Handle<Object> Debug::CheckBreakPoints(BreakLocation* location,
|
| // they are in a FixedArray.
|
| Handle<FixedArray> break_points_hit;
|
| int break_points_hit_count = 0;
|
| - DCHECK(!break_point_objects->IsUndefined());
|
| + DCHECK(!break_point_objects->IsUndefined(isolate_));
|
| if (break_point_objects->IsFixedArray()) {
|
| Handle<FixedArray> array(FixedArray::cast(*break_point_objects));
|
| break_points_hit = factory->NewFixedArray(array->length());
|
| @@ -714,7 +714,7 @@ bool Debug::IsMutedAtCurrentLocation(JavaScriptFrame* frame) {
|
| Handle<Object> check_result =
|
| CheckBreakPoints(&break_locations[i], &has_break_points);
|
| has_break_points_at_all |= has_break_points;
|
| - if (has_break_points && !check_result->IsUndefined()) return false;
|
| + if (has_break_points && !check_result->IsUndefined(isolate_)) return false;
|
| }
|
| return has_break_points_at_all;
|
| }
|
| @@ -795,7 +795,7 @@ bool Debug::SetBreakPointForScript(Handle<Script> script,
|
| // Obtain shared function info for the function.
|
| Handle<Object> result =
|
| FindSharedFunctionInfoInScript(script, *source_position);
|
| - if (result->IsUndefined()) return false;
|
| + if (result->IsUndefined(isolate_)) return false;
|
|
|
| // Make sure the function has set up the debug info.
|
| Handle<SharedFunctionInfo> shared = Handle<SharedFunctionInfo>::cast(result);
|
| @@ -842,7 +842,7 @@ void Debug::ClearBreakPoint(Handle<Object> break_point_object) {
|
| while (node != NULL) {
|
| Handle<Object> result =
|
| DebugInfo::FindBreakPointInfo(node->debug_info(), break_point_object);
|
| - if (!result->IsUndefined()) {
|
| + if (!result->IsUndefined(isolate_)) {
|
| // Get information in the break point.
|
| Handle<BreakPointInfo> break_point_info =
|
| Handle<BreakPointInfo>::cast(result);
|
| @@ -1105,19 +1105,18 @@ Handle<Object> Debug::GetSourceBreakLocations(
|
| Handle<SharedFunctionInfo> shared,
|
| BreakPositionAlignment position_alignment) {
|
| Isolate* isolate = shared->GetIsolate();
|
| - Heap* heap = isolate->heap();
|
| if (!shared->HasDebugInfo()) {
|
| - return Handle<Object>(heap->undefined_value(), isolate);
|
| + return isolate->factory()->undefined_value();
|
| }
|
| Handle<DebugInfo> debug_info(shared->GetDebugInfo());
|
| if (debug_info->GetBreakPointCount() == 0) {
|
| - return Handle<Object>(heap->undefined_value(), isolate);
|
| + return isolate->factory()->undefined_value();
|
| }
|
| Handle<FixedArray> locations =
|
| isolate->factory()->NewFixedArray(debug_info->GetBreakPointCount());
|
| int count = 0;
|
| for (int i = 0; i < debug_info->break_points()->length(); ++i) {
|
| - if (!debug_info->break_points()->get(i)->IsUndefined()) {
|
| + if (!debug_info->break_points()->get(i)->IsUndefined(isolate)) {
|
| BreakPointInfo* break_point_info =
|
| BreakPointInfo::cast(debug_info->break_points()->get(i));
|
| int break_points = break_point_info->GetBreakPointCount();
|
| @@ -1746,7 +1745,7 @@ void Debug::OnPromiseReject(Handle<JSObject> promise, Handle<Object> value) {
|
| HandleScope scope(isolate_);
|
| // Check whether the promise has been marked as having triggered a message.
|
| Handle<Symbol> key = isolate_->factory()->promise_debug_marker_symbol();
|
| - if (JSReceiver::GetDataProperty(promise, key)->IsUndefined()) {
|
| + if (JSReceiver::GetDataProperty(promise, key)->IsUndefined(isolate_)) {
|
| OnException(value, promise);
|
| }
|
| }
|
| @@ -2072,7 +2071,7 @@ void Debug::NotifyMessageHandler(v8::DebugEvent event,
|
| request_args, &maybe_exception);
|
|
|
| if (maybe_result.ToHandle(&answer_value)) {
|
| - if (answer_value->IsUndefined()) {
|
| + if (answer_value->IsUndefined(isolate_)) {
|
| answer = isolate_->factory()->empty_string();
|
| } else {
|
| answer = Handle<String>::cast(answer_value);
|
| @@ -2123,7 +2122,7 @@ void Debug::SetEventListener(Handle<Object> callback,
|
| event_listener_data_ = Handle<Object>();
|
|
|
| // Set new entry.
|
| - if (!callback->IsUndefined() && !callback->IsNull()) {
|
| + if (!callback->IsUndefined(isolate_) && !callback->IsNull()) {
|
| event_listener_ = global_handles->Create(*callback);
|
| if (data.is_null()) data = isolate_->factory()->undefined_value();
|
| event_listener_data_ = global_handles->Create(*data);
|
|
|