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 1775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1786 } else if (!function->IsBuiltin()) { | 1786 } else if (!function->IsBuiltin()) { |
1787 // Don't allow step into functions in the native context. | 1787 // Don't allow step into functions in the native context. |
1788 if (function->shared()->code() == | 1788 if (function->shared()->code() == |
1789 isolate->builtins()->builtin(Builtins::kFunctionApply) || | 1789 isolate->builtins()->builtin(Builtins::kFunctionApply) || |
1790 function->shared()->code() == | 1790 function->shared()->code() == |
1791 isolate->builtins()->builtin(Builtins::kFunctionCall)) { | 1791 isolate->builtins()->builtin(Builtins::kFunctionCall)) { |
1792 // Handle function.apply and function.call separately to flood the | 1792 // Handle function.apply and function.call separately to flood the |
1793 // function to be called and not the code for Builtins::FunctionApply or | 1793 // function to be called and not the code for Builtins::FunctionApply or |
1794 // Builtins::FunctionCall. The receiver of call/apply is the target | 1794 // Builtins::FunctionCall. The receiver of call/apply is the target |
1795 // function. | 1795 // function. |
1796 if (!holder.is_null() && holder->IsJSFunction()) { | 1796 if (!holder.is_null() && holder->IsJSFunction() && |
| 1797 !JSFunction::cast(*holder)->IsBuiltin()) { |
1797 Handle<JSFunction> js_function = Handle<JSFunction>::cast(holder); | 1798 Handle<JSFunction> js_function = Handle<JSFunction>::cast(holder); |
1798 if (!js_function->IsBuiltin()) { | 1799 Debug::FloodWithOneShot(js_function); |
1799 Debug::FloodWithOneShot(js_function); | |
1800 } else if (js_function->shared()->bound()) { | |
1801 // Handle Function.prototype.bind | |
1802 Debug::FloodBoundFunctionWithOneShot(js_function); | |
1803 } | |
1804 } | 1800 } |
1805 } else { | 1801 } else { |
1806 Debug::FloodWithOneShot(function); | 1802 Debug::FloodWithOneShot(function); |
1807 } | 1803 } |
1808 } | 1804 } |
1809 } | 1805 } |
1810 } | 1806 } |
1811 | 1807 |
1812 | 1808 |
1813 void Debug::ClearStepping() { | 1809 void Debug::ClearStepping() { |
(...skipping 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3852 { | 3848 { |
3853 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); | 3849 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); |
3854 isolate_->debugger()->CallMessageDispatchHandler(); | 3850 isolate_->debugger()->CallMessageDispatchHandler(); |
3855 } | 3851 } |
3856 } | 3852 } |
3857 } | 3853 } |
3858 | 3854 |
3859 #endif // ENABLE_DEBUGGER_SUPPORT | 3855 #endif // ENABLE_DEBUGGER_SUPPORT |
3860 | 3856 |
3861 } } // namespace v8::internal | 3857 } } // namespace v8::internal |
OLD | NEW |