| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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/messages.h" | 5 #include "src/messages.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "src/api.h" | 9 #include "src/api.h" |
| 10 #include "src/execution.h" | 10 #include "src/execution.h" |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 builder.AppendString(str); | 360 builder.AppendString(str); |
| 361 } else { | 361 } else { |
| 362 DCHECK(eval_from_script->compilation_type() != | 362 DCHECK(eval_from_script->compilation_type() != |
| 363 Script::COMPILATION_TYPE_EVAL); | 363 Script::COMPILATION_TYPE_EVAL); |
| 364 // eval script originated from "real" source. | 364 // eval script originated from "real" source. |
| 365 Handle<Object> name_obj = handle(eval_from_script->name(), isolate); | 365 Handle<Object> name_obj = handle(eval_from_script->name(), isolate); |
| 366 if (eval_from_script->name()->IsString()) { | 366 if (eval_from_script->name()->IsString()) { |
| 367 builder.AppendString(Handle<String>::cast(name_obj)); | 367 builder.AppendString(Handle<String>::cast(name_obj)); |
| 368 | 368 |
| 369 Script::PositionInfo info; | 369 Script::PositionInfo info; |
| 370 if (eval_from_script->GetPositionInfo(script->GetEvalPosition(), &info, | 370 if (Script::GetPositionInfo(eval_from_script, script->GetEvalPosition(), |
| 371 Script::NO_OFFSET)) { | 371 &info, Script::NO_OFFSET)) { |
| 372 builder.AppendCString(":"); | 372 builder.AppendCString(":"); |
| 373 | 373 |
| 374 Handle<String> str = isolate->factory()->NumberToString( | 374 Handle<String> str = isolate->factory()->NumberToString( |
| 375 handle(Smi::FromInt(info.line + 1), isolate)); | 375 handle(Smi::FromInt(info.line + 1), isolate)); |
| 376 builder.AppendString(str); | 376 builder.AppendString(str); |
| 377 | 377 |
| 378 builder.AppendCString(":"); | 378 builder.AppendCString(":"); |
| 379 | 379 |
| 380 str = isolate->factory()->NumberToString( | 380 str = isolate->factory()->NumberToString( |
| 381 handle(Smi::FromInt(info.column + 1), isolate)); | 381 handle(Smi::FromInt(info.column + 1), isolate)); |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1180 DCHECK(mode != SKIP_UNTIL_SEEN); | 1180 DCHECK(mode != SKIP_UNTIL_SEEN); |
| 1181 | 1181 |
| 1182 Handle<Object> no_caller; | 1182 Handle<Object> no_caller; |
| 1183 Handle<String> msg = FormatMessage(isolate, template_index, arg0, arg1, arg2); | 1183 Handle<String> msg = FormatMessage(isolate, template_index, arg0, arg1, arg2); |
| 1184 return ErrorUtils::Construct(isolate, constructor, constructor, msg, mode, | 1184 return ErrorUtils::Construct(isolate, constructor, constructor, msg, mode, |
| 1185 no_caller, false); | 1185 no_caller, false); |
| 1186 } | 1186 } |
| 1187 | 1187 |
| 1188 } // namespace internal | 1188 } // namespace internal |
| 1189 } // namespace v8 | 1189 } // namespace v8 |
| OLD | NEW |