Index: src/debug.cc |
diff --git a/src/debug.cc b/src/debug.cc |
index 587bade70492007724df177d1577a3136c2e1668..8940edd15ae88cf6448ab0f0a1bec3cf1a4fa4a1 100644 |
--- a/src/debug.cc |
+++ b/src/debug.cc |
@@ -778,8 +778,11 @@ bool Debug::CompileDebuggerScript(int index) { |
factory->NewFunctionFromSharedFunctionInfo(function_info, context); |
Handle<Object> exception = |
- Execution::TryCall(function, Handle<Object>(context->global_object()), |
- 0, NULL, &caught_exception); |
+ Execution::TryCall(function, |
+ Handle<Object>(context->global_object(), isolate), |
+ 0, |
+ NULL, |
+ &caught_exception); |
// Check for caught exceptions. |
if (caught_exception) { |
@@ -844,8 +847,11 @@ bool Debug::Load() { |
Handle<GlobalObject> global = Handle<GlobalObject>(context->global_object()); |
RETURN_IF_EMPTY_HANDLE_VALUE( |
isolate_, |
- JSReceiver::SetProperty(global, key, Handle<Object>(global->builtins()), |
- NONE, kNonStrictMode), |
+ JSReceiver::SetProperty(global, |
+ key, |
+ Handle<Object>(global->builtins(), isolate_), |
+ NONE, |
+ kNonStrictMode), |
false); |
// Compile the JavaScript for the debugger in the debugger context. |
@@ -950,10 +956,10 @@ Object* Debug::Break(Arguments args) { |
// If there is one or more real break points check whether any of these are |
// triggered. |
- Handle<Object> break_points_hit(heap->undefined_value()); |
+ Handle<Object> break_points_hit(heap->undefined_value(), isolate_); |
if (break_location_iterator.HasBreakPoint()) { |
Handle<Object> break_point_objects = |
- Handle<Object>(break_location_iterator.BreakPointObjects()); |
+ Handle<Object>(break_location_iterator.BreakPointObjects(), isolate_); |
break_points_hit = CheckBreakPoints(break_point_objects); |
} |
@@ -1071,7 +1077,7 @@ Handle<Object> Debug::CheckBreakPoints(Handle<Object> break_point_objects) { |
Handle<FixedArray> array(FixedArray::cast(*break_point_objects)); |
break_points_hit = factory->NewFixedArray(array->length()); |
for (int i = 0; i < array->length(); i++) { |
- Handle<Object> o(array->get(i)); |
+ Handle<Object> o(array->get(i), isolate_); |
if (CheckBreakPoint(o)) { |
break_points_hit->set(break_points_hit_count++, *o); |
} |
@@ -1294,7 +1300,8 @@ void Debug::FloodWithOneShot(Handle<JSFunction> function) { |
void Debug::FloodBoundFunctionWithOneShot(Handle<JSFunction> function) { |
Handle<FixedArray> new_bindings(function->function_bindings()); |
- Handle<Object> bindee(new_bindings->get(JSFunction::kBoundFunctionIndex)); |
+ Handle<Object> bindee(new_bindings->get(JSFunction::kBoundFunctionIndex), |
+ isolate_); |
if (!bindee.is_null() && bindee->IsJSFunction() && |
!JSFunction::cast(*bindee)->IsBuiltin()) { |
@@ -1492,7 +1499,8 @@ void Debug::PrepareStep(StepAction step_action, int step_count) { |
// from the code object. |
Handle<Object> obj( |
isolate_->heap()->code_stubs()->SlowReverseLookup( |
- *call_function_stub)); |
+ *call_function_stub), |
+ isolate_); |
ASSERT(!obj.is_null()); |
ASSERT(!(*obj)->IsUndefined()); |
ASSERT(obj->IsSmi()); |
@@ -1665,10 +1673,12 @@ Handle<Object> Debug::GetSourceBreakLocations( |
Handle<SharedFunctionInfo> shared) { |
Isolate* isolate = Isolate::Current(); |
Heap* heap = isolate->heap(); |
- if (!HasDebugInfo(shared)) return Handle<Object>(heap->undefined_value()); |
+ if (!HasDebugInfo(shared)) { |
+ return Handle<Object>(heap->undefined_value(), isolate); |
+ } |
Handle<DebugInfo> debug_info = GetDebugInfo(shared); |
if (debug_info->GetBreakPointCount() == 0) { |
- return Handle<Object>(heap->undefined_value()); |
+ return Handle<Object>(heap->undefined_value(), isolate); |
} |
Handle<FixedArray> locations = |
isolate->factory()->NewFixedArray(debug_info->GetBreakPointCount()); |
@@ -2434,8 +2444,8 @@ void Debug::ClearMirrorCache() { |
Handle<String> function_name = isolate_->factory()->LookupOneByteSymbol( |
STATIC_ASCII_VECTOR("ClearMirrorCache")); |
Handle<Object> fun( |
- Isolate::Current()->global_object()->GetPropertyNoExceptionThrown( |
- *function_name)); |
+ isolate_->global_object()->GetPropertyNoExceptionThrown(*function_name), |
+ isolate_); |
ASSERT(fun->IsJSFunction()); |
bool caught_exception; |
Execution::TryCall(Handle<JSFunction>::cast(fun), |
@@ -2562,8 +2572,8 @@ Handle<Object> Debugger::MakeJSObject(Vector<const char> constructor_name, |
Handle<String> constructor_str = |
isolate_->factory()->LookupUtf8Symbol(constructor_name); |
Handle<Object> constructor( |
- isolate_->global_object()->GetPropertyNoExceptionThrown( |
- *constructor_str)); |
+ isolate_->global_object()->GetPropertyNoExceptionThrown(*constructor_str), |
+ isolate_); |
ASSERT(constructor->IsJSFunction()); |
if (!constructor->IsJSFunction()) { |
*caught_exception = true; |
@@ -2651,7 +2661,7 @@ Handle<Object> Debugger::MakeScriptCollectedEvent(int id, |
bool* caught_exception) { |
// Create the script collected event object. |
Handle<Object> exec_state = MakeExecutionState(caught_exception); |
- Handle<Object> id_object = Handle<Smi>(Smi::FromInt(id)); |
+ Handle<Object> id_object = Handle<Smi>(Smi::FromInt(id), isolate_); |
Handle<Object> argv[] = { exec_state, id_object }; |
return MakeJSObject(CStrVector("MakeScriptCollectedEvent"), |
@@ -2794,8 +2804,10 @@ void Debugger::OnAfterCompile(Handle<Script> script, |
isolate_->factory()->LookupOneByteSymbol( |
STATIC_ASCII_VECTOR("UpdateScriptBreakPoints")); |
Handle<Object> update_script_break_points = |
- Handle<Object>(debug->debug_context()->global_object()-> |
- GetPropertyNoExceptionThrown(*update_script_break_points_symbol)); |
+ Handle<Object>( |
+ debug->debug_context()->global_object()->GetPropertyNoExceptionThrown( |
+ *update_script_break_points_symbol), |
+ isolate_); |
if (!update_script_break_points->IsJSFunction()) { |
return; |
} |
@@ -2945,7 +2957,7 @@ void Debugger::CallJSEventCallback(v8::DebugEvent event, |
Handle<JSFunction> fun(Handle<JSFunction>::cast(event_listener_)); |
// Invoke the JavaScript debug event listener. |
- Handle<Object> argv[] = { Handle<Object>(Smi::FromInt(event)), |
+ Handle<Object> argv[] = { Handle<Object>(Smi::FromInt(event), isolate_), |
exec_state, |
event_data, |
event_listener_data_ }; |
@@ -3328,7 +3340,8 @@ Handle<Object> Debugger::Call(Handle<JSFunction> fun, |
Handle<Object> argv[] = { exec_state, data }; |
Handle<Object> result = Execution::Call( |
fun, |
- Handle<Object>(isolate_->debug()->debug_context_->global_proxy()), |
+ Handle<Object>(isolate_->debug()->debug_context_->global_proxy(), |
+ isolate_), |
ARRAY_SIZE(argv), |
argv, |
pending_exception); |