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 <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #include "src/ast.h" | 9 #include "src/ast.h" |
10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 stack_frame, script_name_key, handle(script->name(), this), NONE); | 516 stack_frame, script_name_key, handle(script->name(), this), NONE); |
517 } | 517 } |
518 | 518 |
519 if (options & StackTrace::kScriptNameOrSourceURL) { | 519 if (options & StackTrace::kScriptNameOrSourceURL) { |
520 Handle<Object> result = Script::GetNameOrSourceURL(script); | 520 Handle<Object> result = Script::GetNameOrSourceURL(script); |
521 JSObject::AddProperty( | 521 JSObject::AddProperty( |
522 stack_frame, script_name_or_source_url_key, result, NONE); | 522 stack_frame, script_name_or_source_url_key, result, NONE); |
523 } | 523 } |
524 | 524 |
525 if (options & StackTrace::kFunctionName) { | 525 if (options & StackTrace::kFunctionName) { |
526 Handle<Object> fun_name(fun->shared()->name(), this); | 526 Handle<Object> fun_name(fun->shared()->DebugName(), this); |
527 if (!fun_name->BooleanValue()) { | |
528 fun_name = Handle<Object>(fun->shared()->inferred_name(), this); | |
529 } | |
530 JSObject::AddProperty(stack_frame, function_key, fun_name, NONE); | 527 JSObject::AddProperty(stack_frame, function_key, fun_name, NONE); |
531 } | 528 } |
532 | 529 |
533 if (options & StackTrace::kIsEval) { | 530 if (options & StackTrace::kIsEval) { |
534 Handle<Object> is_eval = | 531 Handle<Object> is_eval = |
535 script->compilation_type() == Script::COMPILATION_TYPE_EVAL ? | 532 script->compilation_type() == Script::COMPILATION_TYPE_EVAL ? |
536 factory()->true_value() : factory()->false_value(); | 533 factory()->true_value() : factory()->false_value(); |
537 JSObject::AddProperty(stack_frame, eval_key, is_eval, NONE); | 534 JSObject::AddProperty(stack_frame, eval_key, is_eval, NONE); |
538 } | 535 } |
539 | 536 |
(...skipping 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2358 if (prev_ && prev_->Intercept(flag)) return true; | 2355 if (prev_ && prev_->Intercept(flag)) return true; |
2359 // Then check whether this scope intercepts. | 2356 // Then check whether this scope intercepts. |
2360 if ((flag & intercept_mask_)) { | 2357 if ((flag & intercept_mask_)) { |
2361 intercepted_flags_ |= flag; | 2358 intercepted_flags_ |= flag; |
2362 return true; | 2359 return true; |
2363 } | 2360 } |
2364 return false; | 2361 return false; |
2365 } | 2362 } |
2366 | 2363 |
2367 } } // namespace v8::internal | 2364 } } // namespace v8::internal |
OLD | NEW |