OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1123 thread_local_top()->pending_message_start_pos_ = location->start_pos(); | 1123 thread_local_top()->pending_message_start_pos_ = location->start_pos(); |
1124 thread_local_top()->pending_message_end_pos_ = location->end_pos(); | 1124 thread_local_top()->pending_message_end_pos_ = location->end_pos(); |
1125 } | 1125 } |
1126 } else if (location != NULL && !location->script().is_null()) { | 1126 } else if (location != NULL && !location->script().is_null()) { |
1127 // We are bootstrapping and caught an error where the location is set | 1127 // We are bootstrapping and caught an error where the location is set |
1128 // and we have a script for the location. | 1128 // and we have a script for the location. |
1129 // In this case we could have an extension (or an internal error | 1129 // In this case we could have an extension (or an internal error |
1130 // somewhere) and we print out the line number at which the error occured | 1130 // somewhere) and we print out the line number at which the error occured |
1131 // to the console for easier debugging. | 1131 // to the console for easier debugging. |
1132 int line_number = GetScriptLineNumberSafe(location->script(), | 1132 int line_number = GetScriptLineNumberSafe(location->script(), |
1133 location->start_pos()); | 1133 location->start_pos()) + 1; |
Michael Starzinger
2012/07/10 10:57:48
For consistency I would prefer to have the "+1" in
| |
1134 if (exception->IsString()) { | 1134 if (exception->IsString()) { |
1135 OS::PrintError( | 1135 OS::PrintError( |
1136 "Extension or internal compilation error: %s in %s at line %d.\n", | 1136 "Extension or internal compilation error: %s in %s at line %d.\n", |
1137 *String::cast(exception)->ToCString(), | 1137 *String::cast(exception)->ToCString(), |
1138 *String::cast(location->script()->name())->ToCString(), | 1138 *String::cast(location->script()->name())->ToCString(), |
1139 line_number); | 1139 line_number); |
1140 } else { | 1140 } else { |
1141 OS::PrintError( | 1141 OS::PrintError( |
1142 "Extension or internal compilation error in %s at line %d.\n", | 1142 "Extension or internal compilation error in %s at line %d.\n", |
1143 *String::cast(location->script()->name())->ToCString(), | 1143 *String::cast(location->script()->name())->ToCString(), |
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1991 | 1991 |
1992 #ifdef DEBUG | 1992 #ifdef DEBUG |
1993 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 1993 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
1994 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 1994 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
1995 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 1995 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
1996 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 1996 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
1997 #undef ISOLATE_FIELD_OFFSET | 1997 #undef ISOLATE_FIELD_OFFSET |
1998 #endif | 1998 #endif |
1999 | 1999 |
2000 } } // namespace v8::internal | 2000 } } // namespace v8::internal |
OLD | NEW |