| OLD | NEW | 
|---|
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without | 
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are | 
| 4 // met: | 4 // met: | 
| 5 // | 5 // | 
| 6 //     * Redistributions of source code must retain the above copyright | 6 //     * Redistributions of source code must retain the above copyright | 
| 7 //       notice, this list of conditions and the following disclaimer. | 7 //       notice, this list of conditions and the following disclaimer. | 
| 8 //     * Redistributions in binary form must reproduce the above | 8 //     * Redistributions in binary form must reproduce the above | 
| 9 //       copyright notice, this list of conditions and the following | 9 //       copyright notice, this list of conditions and the following | 
| 10 //       disclaimer in the documentation and/or other materials provided | 10 //       disclaimer in the documentation and/or other materials provided | 
| (...skipping 9030 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 9041     // Fill the details. | 9041     // Fill the details. | 
| 9042     details->set(kThreadDetailsCurrentThreadIndex, Heap::false_value()); | 9042     details->set(kThreadDetailsCurrentThreadIndex, Heap::false_value()); | 
| 9043     details->set(kThreadDetailsThreadIdIndex, Smi::FromInt(thread->id())); | 9043     details->set(kThreadDetailsThreadIdIndex, Smi::FromInt(thread->id())); | 
| 9044   } | 9044   } | 
| 9045 | 9045 | 
| 9046   // Convert to JS array and return. | 9046   // Convert to JS array and return. | 
| 9047   return *Factory::NewJSArrayWithElements(details); | 9047   return *Factory::NewJSArrayWithElements(details); | 
| 9048 } | 9048 } | 
| 9049 | 9049 | 
| 9050 | 9050 | 
|  | 9051 // Sets the disable break state | 
|  | 9052 // args[0]: disable break state | 
|  | 9053 static Object* Runtime_SetDisableBreak(Arguments args) { | 
|  | 9054   HandleScope scope; | 
|  | 9055   ASSERT(args.length() == 1); | 
|  | 9056   CONVERT_BOOLEAN_CHECKED(disable_break, args[0]); | 
|  | 9057   Debug::set_disable_break(disable_break); | 
|  | 9058   return  Heap::undefined_value(); | 
|  | 9059 } | 
|  | 9060 | 
|  | 9061 | 
| 9051 static Object* Runtime_GetBreakLocations(Arguments args) { | 9062 static Object* Runtime_GetBreakLocations(Arguments args) { | 
| 9052   HandleScope scope; | 9063   HandleScope scope; | 
| 9053   ASSERT(args.length() == 1); | 9064   ASSERT(args.length() == 1); | 
| 9054 | 9065 | 
| 9055   CONVERT_ARG_CHECKED(JSFunction, fun, 0); | 9066   CONVERT_ARG_CHECKED(JSFunction, fun, 0); | 
| 9056   Handle<SharedFunctionInfo> shared(fun->shared()); | 9067   Handle<SharedFunctionInfo> shared(fun->shared()); | 
| 9057   // Find the number of break points | 9068   // Find the number of break points | 
| 9058   Handle<Object> break_locations = Debug::GetSourceBreakLocations(shared); | 9069   Handle<Object> break_locations = Debug::GetSourceBreakLocations(shared); | 
| 9059   if (break_locations->IsUndefined()) return Heap::undefined_value(); | 9070   if (break_locations->IsUndefined()) return Heap::undefined_value(); | 
| 9060   // Return array as JS array | 9071   // Return array as JS array | 
| (...skipping 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 10395   } else { | 10406   } else { | 
| 10396     // Handle last resort GC and make sure to allow future allocations | 10407     // Handle last resort GC and make sure to allow future allocations | 
| 10397     // to grow the heap without causing GCs (if possible). | 10408     // to grow the heap without causing GCs (if possible). | 
| 10398     Counters::gc_last_resort_from_js.Increment(); | 10409     Counters::gc_last_resort_from_js.Increment(); | 
| 10399     Heap::CollectAllGarbage(false); | 10410     Heap::CollectAllGarbage(false); | 
| 10400   } | 10411   } | 
| 10401 } | 10412 } | 
| 10402 | 10413 | 
| 10403 | 10414 | 
| 10404 } }  // namespace v8::internal | 10415 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|