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/isolate.h" | 5 #include "src/isolate.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include <fstream> // NOLINT(readability/streams) | 9 #include <fstream> // NOLINT(readability/streams) |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
322 static bool IsVisibleInStackTrace(JSFunction* fun, | 322 static bool IsVisibleInStackTrace(JSFunction* fun, |
323 Object* caller, | 323 Object* caller, |
324 Object* receiver, | 324 Object* receiver, |
325 bool* seen_caller) { | 325 bool* seen_caller) { |
326 if ((fun == caller) && !(*seen_caller)) { | 326 if ((fun == caller) && !(*seen_caller)) { |
327 *seen_caller = true; | 327 *seen_caller = true; |
328 return false; | 328 return false; |
329 } | 329 } |
330 // Skip all frames until we've seen the caller. | 330 // Skip all frames until we've seen the caller. |
331 if (!(*seen_caller)) return false; | 331 if (!(*seen_caller)) return false; |
332 | |
332 // Functions defined in native scripts are not visible unless directly | 333 // Functions defined in native scripts are not visible unless directly |
333 // exposed, in which case the native flag is set. | 334 // exposed, in which case the native flag is set. |
334 // The --builtins-in-stack-traces command line flag allows including | 335 // The --builtins-in-stack-traces command line flag allows including |
335 // internal call sites in the stack trace for debugging purposes. | 336 // internal call sites in the stack trace for debugging purposes. |
336 if (!FLAG_builtins_in_stack_traces && fun->shared()->IsBuiltin()) { | 337 if (!FLAG_builtins_in_stack_traces && fun->shared()->IsBuiltin()) { |
337 return fun->shared()->native(); | 338 return fun->shared()->native(); |
338 } | 339 } |
340 | |
341 // Async function wrappers are not visible in stack trace | |
342 if (IsAsyncFunction(fun->shared()->kind())) return false; | |
caitp (gmail)
2016/04/26 22:01:30
not needed anymore in Option C
| |
343 | |
339 return true; | 344 return true; |
340 } | 345 } |
341 | 346 |
342 static Handle<FixedArray> MaybeGrow(Isolate* isolate, | 347 static Handle<FixedArray> MaybeGrow(Isolate* isolate, |
343 Handle<FixedArray> elements, | 348 Handle<FixedArray> elements, |
344 int cur_position, int new_size) { | 349 int cur_position, int new_size) { |
345 if (new_size > elements->length()) { | 350 if (new_size > elements->length()) { |
346 int new_capacity = JSObject::NewElementsCapacity(elements->length()); | 351 int new_capacity = JSObject::NewElementsCapacity(elements->length()); |
347 Handle<FixedArray> new_elements = | 352 Handle<FixedArray> new_elements = |
348 isolate->factory()->NewFixedArrayWithHoles(new_capacity); | 353 isolate->factory()->NewFixedArrayWithHoles(new_capacity); |
(...skipping 2630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2979 // Then check whether this scope intercepts. | 2984 // Then check whether this scope intercepts. |
2980 if ((flag & intercept_mask_)) { | 2985 if ((flag & intercept_mask_)) { |
2981 intercepted_flags_ |= flag; | 2986 intercepted_flags_ |= flag; |
2982 return true; | 2987 return true; |
2983 } | 2988 } |
2984 return false; | 2989 return false; |
2985 } | 2990 } |
2986 | 2991 |
2987 } // namespace internal | 2992 } // namespace internal |
2988 } // namespace v8 | 2993 } // namespace v8 |
OLD | NEW |