| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1153 it.Advance(); | 1153 it.Advance(); |
| 1154 } | 1154 } |
| 1155 fp = it.frame()->fp(); | 1155 fp = it.frame()->fp(); |
| 1156 } | 1156 } |
| 1157 | 1157 |
| 1158 // Flood the function with one-shot break points if it is called from where | 1158 // Flood the function with one-shot break points if it is called from where |
| 1159 // step into was requested. | 1159 // step into was requested. |
| 1160 if (fp == Debug::step_in_fp()) { | 1160 if (fp == Debug::step_in_fp()) { |
| 1161 // Don't allow step into functions in the native context. | 1161 // Don't allow step into functions in the native context. |
| 1162 if (function->context()->global() != Top::context()->builtins()) { | 1162 if (function->context()->global() != Top::context()->builtins()) { |
| 1163 Debug::FloodWithOneShot(Handle<SharedFunctionInfo>(function->shared())); | 1163 if (function->shared()->code() == |
| 1164 Builtins::builtin(Builtins::FunctionApply)) { |
| 1165 // Handle function.apply separately to flood the function to be called |
| 1166 // and not the code for Builtins::FunctionApply. At the point of the |
| 1167 // call IC to call Builtins::FunctionApply the expression stack has the |
| 1168 // following content: |
| 1169 // symbol "apply" |
| 1170 // function apply was called on |
| 1171 // receiver for apply (first parameter to apply) |
| 1172 // arguments array for apply (second parameter to apply) |
| 1173 JavaScriptFrameIterator it; |
| 1174 ASSERT(it.frame()->fp() == fp); |
| 1175 ASSERT(it.frame()->GetExpression(1)->IsJSFunction()); |
| 1176 if (it.frame()->GetExpression(1)->IsJSFunction()) { |
| 1177 Handle<JSFunction> |
| 1178 actual_function(JSFunction::cast(it.frame()->GetExpression(1))); |
| 1179 Handle<SharedFunctionInfo> actual_shared(actual_function->shared()); |
| 1180 Debug::FloodWithOneShot(actual_shared); |
| 1181 } |
| 1182 } else { |
| 1183 Debug::FloodWithOneShot(Handle<SharedFunctionInfo>(function->shared())); |
| 1184 } |
| 1164 } | 1185 } |
| 1165 } | 1186 } |
| 1166 } | 1187 } |
| 1167 | 1188 |
| 1168 | 1189 |
| 1169 void Debug::ClearStepping() { | 1190 void Debug::ClearStepping() { |
| 1170 // Clear the various stepping setup. | 1191 // Clear the various stepping setup. |
| 1171 ClearOneShot(); | 1192 ClearOneShot(); |
| 1172 ClearStepIn(); | 1193 ClearStepIn(); |
| 1173 ClearStepNext(); | 1194 ClearStepNext(); |
| (...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2184 } | 2205 } |
| 2185 | 2206 |
| 2186 | 2207 |
| 2187 void LockingMessageQueue::Clear() { | 2208 void LockingMessageQueue::Clear() { |
| 2188 ScopedLock sl(lock_); | 2209 ScopedLock sl(lock_); |
| 2189 queue_.Clear(); | 2210 queue_.Clear(); |
| 2190 } | 2211 } |
| 2191 | 2212 |
| 2192 | 2213 |
| 2193 } } // namespace v8::internal | 2214 } } // namespace v8::internal |
| OLD | NEW |