Chromium Code Reviews| Index: src/messages.cc |
| diff --git a/src/messages.cc b/src/messages.cc |
| index 908ee08e4bc7793cd4d5ed5fd91fcfb08f9f3e39..ef6b01108f9e7ecfcaf6c708f3eb2ee951be9d2b 100644 |
| --- a/src/messages.cc |
| +++ b/src/messages.cc |
| @@ -33,17 +33,20 @@ void MessageHandler::DefaultMessageReport(Isolate* isolate, |
| Handle<JSMessageObject> MessageHandler::MakeMessageObject( |
| - Isolate* isolate, MessageTemplate::Template message, MessageLocation* loc, |
| - Handle<Object> argument, Handle<JSArray> stack_frames) { |
| + Isolate* isolate, MessageTemplate::Template message, |
| + MessageLocation* location, Handle<Object> argument, |
| + Handle<JSArray> stack_frames) { |
| Factory* factory = isolate->factory(); |
| int start = 0; |
| int end = 0; |
| Handle<Object> script_handle = factory->undefined_value(); |
| - if (loc) { |
| - start = loc->start_pos(); |
| - end = loc->end_pos(); |
| - script_handle = Script::GetWrapper(loc->script()); |
| + if (location != NULL) { |
| + start = location->start_pos(); |
| + end = location->end_pos(); |
| + script_handle = Script::GetWrapper(location->script()); |
| + } else { |
| + script_handle = Script::GetWrapper(isolate->factory()->empty_script()); |
|
Camillo Bruni
2015/08/21 12:12:21
The case used to default to end=-1 and start=-1 fo
|
| } |
| Handle<Object> stack_frames_handle = stack_frames.is_null() |