OLD | NEW |
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 4887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4898 if (!callback->IsJSFunction() || JSFunction::cast(callback)->IsBuiltin()) { | 4898 if (!callback->IsJSFunction() || JSFunction::cast(callback)->IsBuiltin()) { |
4899 return isolate->heap()->false_value(); | 4899 return isolate->heap()->false_value(); |
4900 } | 4900 } |
4901 return isolate->heap()->true_value(); | 4901 return isolate->heap()->true_value(); |
4902 } | 4902 } |
4903 | 4903 |
4904 | 4904 |
4905 // Set one shot breakpoints for the callback function that is passed to a | 4905 // Set one shot breakpoints for the callback function that is passed to a |
4906 // built-in function such as Array.forEach to enable stepping into the callback. | 4906 // built-in function such as Array.forEach to enable stepping into the callback. |
4907 RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugPrepareStepInIfStepping) { | 4907 RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugPrepareStepInIfStepping) { |
| 4908 #ifdef ENABLE_DEBUGGER_SUPPORT |
4908 Debug* debug = isolate->debug(); | 4909 Debug* debug = isolate->debug(); |
4909 if (!debug->IsStepping()) return NULL; | 4910 if (!debug->IsStepping()) return NULL; |
4910 CONVERT_ARG_HANDLE_CHECKED(JSFunction, callback, 0); | 4911 CONVERT_ARG_HANDLE_CHECKED(JSFunction, callback, 0); |
4911 HandleScope scope(isolate); | 4912 HandleScope scope(isolate); |
4912 // When leaving the callback, step out has been activated, but not performed | 4913 // When leaving the callback, step out has been activated, but not performed |
4913 // if we do not leave the builtin. To be able to step into the callback | 4914 // if we do not leave the builtin. To be able to step into the callback |
4914 // again, we need to clear the step out at this point. | 4915 // again, we need to clear the step out at this point. |
4915 debug->ClearStepOut(); | 4916 debug->ClearStepOut(); |
4916 debug->FloodWithOneShot(callback); | 4917 debug->FloodWithOneShot(callback); |
| 4918 #endif |
4917 return NULL; | 4919 return NULL; |
4918 } | 4920 } |
4919 | 4921 |
4920 | 4922 |
4921 // Set a local property, even if it is READ_ONLY. If the property does not | 4923 // Set a local property, even if it is READ_ONLY. If the property does not |
4922 // exist, it will be added with attributes NONE. | 4924 // exist, it will be added with attributes NONE. |
4923 RUNTIME_FUNCTION(MaybeObject*, Runtime_IgnoreAttributesAndSetProperty) { | 4925 RUNTIME_FUNCTION(MaybeObject*, Runtime_IgnoreAttributesAndSetProperty) { |
4924 NoHandleAllocation ha; | 4926 NoHandleAllocation ha; |
4925 RUNTIME_ASSERT(args.length() == 3 || args.length() == 4); | 4927 RUNTIME_ASSERT(args.length() == 3 || args.length() == 4); |
4926 CONVERT_ARG_CHECKED(JSObject, object, 0); | 4928 CONVERT_ARG_CHECKED(JSObject, object, 0); |
(...skipping 8778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13705 // Handle last resort GC and make sure to allow future allocations | 13707 // Handle last resort GC and make sure to allow future allocations |
13706 // to grow the heap without causing GCs (if possible). | 13708 // to grow the heap without causing GCs (if possible). |
13707 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13709 isolate->counters()->gc_last_resort_from_js()->Increment(); |
13708 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13710 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
13709 "Runtime::PerformGC"); | 13711 "Runtime::PerformGC"); |
13710 } | 13712 } |
13711 } | 13713 } |
13712 | 13714 |
13713 | 13715 |
13714 } } // namespace v8::internal | 13716 } } // namespace v8::internal |
OLD | NEW |