Index: src/messages.cc |
diff --git a/src/messages.cc b/src/messages.cc |
index 908ee08e4bc7793cd4d5ed5fd91fcfb08f9f3e39..fd10d45d4a02c59f9c43dc5b1a9c7f4c446bf289 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; |
+ int start = -1; |
+ int end = -1; |
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()); |
} |
Handle<Object> stack_frames_handle = stack_frames.is_null() |