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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 if (data->IsString()) | 44 if (data->IsString()) |
45 data_str = Handle<String>::cast(data)->ToCString(DISALLOW_NULLS); | 45 data_str = Handle<String>::cast(data)->ToCString(DISALLOW_NULLS); |
46 PrintF("%s:%i: %s\n", data_str.get() ? data_str.get() : "<unknown>", | 46 PrintF("%s:%i: %s\n", data_str.get() ? data_str.get() : "<unknown>", |
47 loc->start_pos(), str.get()); | 47 loc->start_pos(), str.get()); |
48 } | 48 } |
49 } | 49 } |
50 | 50 |
51 Handle<JSMessageObject> MessageHandler::MakeMessageObject( | 51 Handle<JSMessageObject> MessageHandler::MakeMessageObject( |
52 Isolate* isolate, MessageTemplate::Template message, | 52 Isolate* isolate, MessageTemplate::Template message, |
53 const MessageLocation* location, Handle<Object> argument, | 53 const MessageLocation* location, Handle<Object> argument, |
54 Handle<JSArray> stack_frames) { | 54 Handle<FixedArray> stack_frames) { |
55 Factory* factory = isolate->factory(); | 55 Factory* factory = isolate->factory(); |
56 | 56 |
57 int start = -1; | 57 int start = -1; |
58 int end = -1; | 58 int end = -1; |
59 Handle<Object> script_handle = factory->undefined_value(); | 59 Handle<Object> script_handle = factory->undefined_value(); |
60 if (location != NULL) { | 60 if (location != NULL) { |
61 start = location->start_pos(); | 61 start = location->start_pos(); |
62 end = location->end_pos(); | 62 end = location->end_pos(); |
63 script_handle = Script::GetWrapper(location->script()); | 63 script_handle = Script::GetWrapper(location->script()); |
64 } else { | 64 } else { |
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1246 DCHECK(mode != SKIP_UNTIL_SEEN); | 1246 DCHECK(mode != SKIP_UNTIL_SEEN); |
1247 | 1247 |
1248 Handle<Object> no_caller; | 1248 Handle<Object> no_caller; |
1249 Handle<String> msg = FormatMessage(isolate, template_index, arg0, arg1, arg2); | 1249 Handle<String> msg = FormatMessage(isolate, template_index, arg0, arg1, arg2); |
1250 return ErrorUtils::Construct(isolate, constructor, constructor, msg, mode, | 1250 return ErrorUtils::Construct(isolate, constructor, constructor, msg, mode, |
1251 no_caller, false); | 1251 no_caller, false); |
1252 } | 1252 } |
1253 | 1253 |
1254 } // namespace internal | 1254 } // namespace internal |
1255 } // namespace v8 | 1255 } // namespace v8 |
OLD | NEW |