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

Side by Side Diff: src/runtime.cc

Issue 2880011: Add debugger protocol request for setting global flags. (Closed)
Patch Set: After CR by Soren Created 10 years, 4 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 unified diff | Download patch
« no previous file with comments | « src/runtime.h ('k') | test/mjsunit/debug-enable-disable-breakpoints.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | test/mjsunit/debug-enable-disable-breakpoints.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698