OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/api.h" | 7 #include "src/api.h" |
8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1192 | 1192 |
1193 // Remove all debug info. | 1193 // Remove all debug info. |
1194 while (debug_info_list_ != NULL) { | 1194 while (debug_info_list_ != NULL) { |
1195 RemoveDebugInfoAndClearFromShared(debug_info_list_->debug_info()); | 1195 RemoveDebugInfoAndClearFromShared(debug_info_list_->debug_info()); |
1196 } | 1196 } |
1197 } | 1197 } |
1198 | 1198 |
1199 | 1199 |
1200 void Debug::FloodWithOneShot(Handle<JSFunction> function, | 1200 void Debug::FloodWithOneShot(Handle<JSFunction> function, |
1201 BreakLocatorType type) { | 1201 BreakLocatorType type) { |
1202 // Do not ever break in native functions. | |
1203 if (function->IsFromNativeScript()) return; | |
arv (Not doing code reviews)
2014/11/18 18:51:08
Maybe this should have been a DCHECK instead. I th
aandrey
2014/11/19 11:41:27
Nope, only two places out of 7-8 in this file. One
| |
1204 | |
1202 PrepareForBreakPoints(); | 1205 PrepareForBreakPoints(); |
1203 | 1206 |
1204 // Make sure the function is compiled and has set up the debug info. | 1207 // Make sure the function is compiled and has set up the debug info. |
1205 Handle<SharedFunctionInfo> shared(function->shared()); | 1208 Handle<SharedFunctionInfo> shared(function->shared()); |
1206 if (!EnsureDebugInfo(shared, function)) { | 1209 if (!EnsureDebugInfo(shared, function)) { |
1207 // Return if we failed to retrieve the debug info. | 1210 // Return if we failed to retrieve the debug info. |
1208 return; | 1211 return; |
1209 } | 1212 } |
1210 | 1213 |
1211 // Flood the function with break points. | 1214 // Flood the function with break points. |
(...skipping 30 matching lines...) Expand all Loading... | |
1242 FloodWithOneShotGeneric(function_proto); | 1245 FloodWithOneShotGeneric(function_proto); |
1243 } | 1246 } |
1244 | 1247 |
1245 | 1248 |
1246 void Debug::FloodWithOneShotGeneric(Handle<JSFunction> function, | 1249 void Debug::FloodWithOneShotGeneric(Handle<JSFunction> function, |
1247 Handle<Object> holder) { | 1250 Handle<Object> holder) { |
1248 if (function->shared()->bound()) { | 1251 if (function->shared()->bound()) { |
1249 FloodBoundFunctionWithOneShot(function); | 1252 FloodBoundFunctionWithOneShot(function); |
1250 } else if (function->shared()->is_default_constructor()) { | 1253 } else if (function->shared()->is_default_constructor()) { |
1251 FloodDefaultConstructorWithOneShot(function); | 1254 FloodDefaultConstructorWithOneShot(function); |
1252 } else if (!function->IsFromNativeScript()) { | 1255 } else { |
1253 Isolate* isolate = function->GetIsolate(); | 1256 Isolate* isolate = function->GetIsolate(); |
1254 // Don't allow step into functions in the native context. | 1257 // Don't allow step into functions in the native context. |
1255 if (function->shared()->code() == | 1258 if (function->shared()->code() == |
1256 isolate->builtins()->builtin(Builtins::kFunctionApply) || | 1259 isolate->builtins()->builtin(Builtins::kFunctionApply) || |
1257 function->shared()->code() == | 1260 function->shared()->code() == |
1258 isolate->builtins()->builtin(Builtins::kFunctionCall)) { | 1261 isolate->builtins()->builtin(Builtins::kFunctionCall)) { |
1259 // Handle function.apply and function.call separately to flood the | 1262 // Handle function.apply and function.call separately to flood the |
1260 // function to be called and not the code for Builtins::FunctionApply or | 1263 // function to be called and not the code for Builtins::FunctionApply or |
1261 // Builtins::FunctionCall. The receiver of call/apply is the target | 1264 // Builtins::FunctionCall. The receiver of call/apply is the target |
1262 // function. | 1265 // function. |
(...skipping 2173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3436 logger_->DebugEvent("Put", message.text()); | 3439 logger_->DebugEvent("Put", message.text()); |
3437 } | 3440 } |
3438 | 3441 |
3439 | 3442 |
3440 void LockingCommandMessageQueue::Clear() { | 3443 void LockingCommandMessageQueue::Clear() { |
3441 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 3444 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
3442 queue_.Clear(); | 3445 queue_.Clear(); |
3443 } | 3446 } |
3444 | 3447 |
3445 } } // namespace v8::internal | 3448 } } // namespace v8::internal |
OLD | NEW |