| 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 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 | 935 |
| 936 | 936 |
| 937 /** | 937 /** |
| 938 * The origin, within a file, of a script. | 938 * The origin, within a file, of a script. |
| 939 */ | 939 */ |
| 940 class ScriptOrigin { | 940 class ScriptOrigin { |
| 941 public: | 941 public: |
| 942 V8_INLINE(ScriptOrigin( | 942 V8_INLINE(ScriptOrigin( |
| 943 Handle<Value> resource_name, | 943 Handle<Value> resource_name, |
| 944 Handle<Integer> resource_line_offset = Handle<Integer>(), | 944 Handle<Integer> resource_line_offset = Handle<Integer>(), |
| 945 Handle<Integer> resource_column_offset = Handle<Integer>())) | 945 Handle<Integer> resource_column_offset = Handle<Integer>(), |
| 946 Handle<Boolean> resource_is_shared_cross_origin = Handle<Boolean>())) |
| 946 : resource_name_(resource_name), | 947 : resource_name_(resource_name), |
| 947 resource_line_offset_(resource_line_offset), | 948 resource_line_offset_(resource_line_offset), |
| 948 resource_column_offset_(resource_column_offset) { } | 949 resource_column_offset_(resource_column_offset), |
| 950 resource_is_shared_cross_origin_(resource_is_shared_cross_origin) { } |
| 949 V8_INLINE(Handle<Value> ResourceName() const); | 951 V8_INLINE(Handle<Value> ResourceName() const); |
| 950 V8_INLINE(Handle<Integer> ResourceLineOffset() const); | 952 V8_INLINE(Handle<Integer> ResourceLineOffset() const); |
| 951 V8_INLINE(Handle<Integer> ResourceColumnOffset() const); | 953 V8_INLINE(Handle<Integer> ResourceColumnOffset() const); |
| 954 V8_INLINE(Handle<Boolean> ResourceIsSharedCrossOrigin() const); |
| 952 private: | 955 private: |
| 953 Handle<Value> resource_name_; | 956 Handle<Value> resource_name_; |
| 954 Handle<Integer> resource_line_offset_; | 957 Handle<Integer> resource_line_offset_; |
| 955 Handle<Integer> resource_column_offset_; | 958 Handle<Integer> resource_column_offset_; |
| 959 Handle<Boolean> resource_is_shared_cross_origin_; |
| 956 }; | 960 }; |
| 957 | 961 |
| 958 | 962 |
| 959 /** | 963 /** |
| 960 * A compiled JavaScript script. | 964 * A compiled JavaScript script. |
| 961 */ | 965 */ |
| 962 class V8EXPORT Script { | 966 class V8EXPORT Script { |
| 963 public: | 967 public: |
| 964 /** | 968 /** |
| 965 * Compiles the specified script (context-independent). | 969 * Compiles the specified script (context-independent). |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1123 * the error occurred. | 1127 * the error occurred. |
| 1124 */ | 1128 */ |
| 1125 int GetStartColumn() const; | 1129 int GetStartColumn() const; |
| 1126 | 1130 |
| 1127 /** | 1131 /** |
| 1128 * Returns the index within the line of the last character where | 1132 * Returns the index within the line of the last character where |
| 1129 * the error occurred. | 1133 * the error occurred. |
| 1130 */ | 1134 */ |
| 1131 int GetEndColumn() const; | 1135 int GetEndColumn() const; |
| 1132 | 1136 |
| 1137 /** |
| 1138 * Passes on the value set by the embedder when it fed the script from which |
| 1139 * this Message was generated to V8. |
| 1140 */ |
| 1141 bool IsSharedCrossOrigin() const; |
| 1142 |
| 1133 // TODO(1245381): Print to a string instead of on a FILE. | 1143 // TODO(1245381): Print to a string instead of on a FILE. |
| 1134 static void PrintCurrentStackTrace(FILE* out); | 1144 static void PrintCurrentStackTrace(FILE* out); |
| 1135 | 1145 |
| 1136 static const int kNoLineNumberInfo = 0; | 1146 static const int kNoLineNumberInfo = 0; |
| 1137 static const int kNoColumnInfo = 0; | 1147 static const int kNoColumnInfo = 0; |
| 1138 }; | 1148 }; |
| 1139 | 1149 |
| 1140 | 1150 |
| 1141 /** | 1151 /** |
| 1142 * Representation of a JavaScript stack trace. The information collected is a | 1152 * Representation of a JavaScript stack trace. The information collected is a |
| (...skipping 4846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5989 | 5999 |
| 5990 Handle<Integer> ScriptOrigin::ResourceLineOffset() const { | 6000 Handle<Integer> ScriptOrigin::ResourceLineOffset() const { |
| 5991 return resource_line_offset_; | 6001 return resource_line_offset_; |
| 5992 } | 6002 } |
| 5993 | 6003 |
| 5994 | 6004 |
| 5995 Handle<Integer> ScriptOrigin::ResourceColumnOffset() const { | 6005 Handle<Integer> ScriptOrigin::ResourceColumnOffset() const { |
| 5996 return resource_column_offset_; | 6006 return resource_column_offset_; |
| 5997 } | 6007 } |
| 5998 | 6008 |
| 6009 Handle<Boolean> ScriptOrigin::ResourceIsSharedCrossOrigin() const { |
| 6010 return resource_is_shared_cross_origin_; |
| 6011 } |
| 6012 |
| 5999 | 6013 |
| 6000 Handle<Boolean> Boolean::New(bool value) { | 6014 Handle<Boolean> Boolean::New(bool value) { |
| 6001 return value ? True() : False(); | 6015 return value ? True() : False(); |
| 6002 } | 6016 } |
| 6003 | 6017 |
| 6004 | 6018 |
| 6005 void Template::Set(const char* name, v8::Handle<Data> value) { | 6019 void Template::Set(const char* name, v8::Handle<Data> value) { |
| 6006 Set(v8::String::New(name), value); | 6020 Set(v8::String::New(name), value); |
| 6007 } | 6021 } |
| 6008 | 6022 |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6501 | 6515 |
| 6502 | 6516 |
| 6503 } // namespace v8 | 6517 } // namespace v8 |
| 6504 | 6518 |
| 6505 | 6519 |
| 6506 #undef V8EXPORT | 6520 #undef V8EXPORT |
| 6507 #undef TYPE_CHECK | 6521 #undef TYPE_CHECK |
| 6508 | 6522 |
| 6509 | 6523 |
| 6510 #endif // V8_H_ | 6524 #endif // V8_H_ |
| OLD | NEW |