Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(720)

Side by Side Diff: include/v8.h

Issue 20646006: Pipe a script's CORS status through V8 during compilation. (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@master
Patch Set: . Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698