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

Side by Side Diff: src/runtime.cc

Issue 10698123: Fix Debug::Break crash. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/execution.cc ('k') | test/cctest/test-debug.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 4875 matching lines...) Expand 10 before | Expand all | Expand 10 after
4886 object_array->set(store_index, *value); 4886 object_array->set(store_index, *value);
4887 } 4887 }
4888 return *object; 4888 return *object;
4889 } 4889 }
4890 4890
4891 4891
4892 // Check whether debugger and is about to step into the callback that is passed 4892 // Check whether debugger and is about to step into the callback that is passed
4893 // to a built-in function such as Array.forEach. 4893 // to a built-in function such as Array.forEach.
4894 RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugCallbackSupportsStepping) { 4894 RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugCallbackSupportsStepping) {
4895 #ifdef ENABLE_DEBUGGER_SUPPORT 4895 #ifdef ENABLE_DEBUGGER_SUPPORT
4896 if (!isolate->IsDebuggerActive()) return isolate->heap()->false_value(); 4896 if (!isolate->IsDebuggerActive() || !isolate->debug()->StepInActive()) {
4897 return isolate->heap()->false_value();
4898 }
4897 CONVERT_ARG_CHECKED(Object, callback, 0); 4899 CONVERT_ARG_CHECKED(Object, callback, 0);
4898 // We do not step into the callback if it's a builtin or not even a function. 4900 // We do not step into the callback if it's a builtin or not even a function.
4899 if (!callback->IsJSFunction() || JSFunction::cast(callback)->IsBuiltin()) { 4901 if (!callback->IsJSFunction() || JSFunction::cast(callback)->IsBuiltin()) {
4900 return isolate->heap()->false_value(); 4902 return isolate->heap()->false_value();
4901 } 4903 }
4902 return isolate->heap()->true_value(); 4904 return isolate->heap()->true_value();
4903 #else 4905 #else
4904 return isolate->heap()->false_value(); 4906 return isolate->heap()->false_value();
4905 #endif // ENABLE_DEBUGGER_SUPPORT 4907 #endif // ENABLE_DEBUGGER_SUPPORT
4906 } 4908 }
(...skipping 8809 matching lines...) Expand 10 before | Expand all | Expand 10 after
13716 // Handle last resort GC and make sure to allow future allocations 13718 // Handle last resort GC and make sure to allow future allocations
13717 // to grow the heap without causing GCs (if possible). 13719 // to grow the heap without causing GCs (if possible).
13718 isolate->counters()->gc_last_resort_from_js()->Increment(); 13720 isolate->counters()->gc_last_resort_from_js()->Increment();
13719 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13721 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13720 "Runtime::PerformGC"); 13722 "Runtime::PerformGC");
13721 } 13723 }
13722 } 13724 }
13723 13725
13724 13726
13725 } } // namespace v8::internal 13727 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/execution.cc ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698