OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/v8.h" | 10 #include "src/v8.h" |
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 base::OS::PrintError( | 930 base::OS::PrintError( |
931 "Extension or internal compilation error: %s in %s at line %d.\n", | 931 "Extension or internal compilation error: %s in %s at line %d.\n", |
932 String::cast(*exception)->ToCString().get(), | 932 String::cast(*exception)->ToCString().get(), |
933 String::cast(location->script()->name())->ToCString().get(), | 933 String::cast(location->script()->name())->ToCString().get(), |
934 line_number); | 934 line_number); |
935 } else if (location->script()->name()->IsString()) { | 935 } else if (location->script()->name()->IsString()) { |
936 base::OS::PrintError( | 936 base::OS::PrintError( |
937 "Extension or internal compilation error in %s at line %d.\n", | 937 "Extension or internal compilation error in %s at line %d.\n", |
938 String::cast(location->script()->name())->ToCString().get(), | 938 String::cast(location->script()->name())->ToCString().get(), |
939 line_number); | 939 line_number); |
| 940 } else if (exception->IsString()) { |
| 941 base::OS::PrintError("Extension or internal compilation error: %s.\n", |
| 942 String::cast(*exception)->ToCString().get()); |
940 } else { | 943 } else { |
941 base::OS::PrintError("Extension or internal compilation error.\n"); | 944 base::OS::PrintError("Extension or internal compilation error.\n"); |
942 } | 945 } |
943 #ifdef OBJECT_PRINT | 946 #ifdef OBJECT_PRINT |
944 // Since comments and empty lines have been stripped from the source of | 947 // Since comments and empty lines have been stripped from the source of |
945 // builtins, print the actual source here so that line numbers match. | 948 // builtins, print the actual source here so that line numbers match. |
946 if (location->script()->source()->IsString()) { | 949 if (location->script()->source()->IsString()) { |
947 Handle<String> src(String::cast(location->script()->source())); | 950 Handle<String> src(String::cast(location->script()->source())); |
948 PrintF("Failing script:\n"); | 951 PrintF("Failing script:\n"); |
949 int len = src->length(); | 952 int len = src->length(); |
(...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2791 // Then check whether this scope intercepts. | 2794 // Then check whether this scope intercepts. |
2792 if ((flag & intercept_mask_)) { | 2795 if ((flag & intercept_mask_)) { |
2793 intercepted_flags_ |= flag; | 2796 intercepted_flags_ |= flag; |
2794 return true; | 2797 return true; |
2795 } | 2798 } |
2796 return false; | 2799 return false; |
2797 } | 2800 } |
2798 | 2801 |
2799 } // namespace internal | 2802 } // namespace internal |
2800 } // namespace v8 | 2803 } // namespace v8 |
OLD | NEW |