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

Side by Side Diff: include/v8.h

Issue 983603003: Allow passing sourceMapUrl when compiling scripts (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 5 years, 9 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 // 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 /** \mainpage V8 API Reference Guide 5 /** \mainpage V8 API Reference Guide
6 * 6 *
7 * V8 is Google's open source JavaScript engine. 7 * V8 is Google's open source JavaScript engine.
8 * 8 *
9 * This set of documents provides reference material generated from the 9 * This set of documents provides reference material generated from the
10 * V8 header file, include/v8.h. 10 * V8 header file, include/v8.h.
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 * The origin, within a file, of a script. 984 * The origin, within a file, of a script.
985 */ 985 */
986 class ScriptOrigin { 986 class ScriptOrigin {
987 public: 987 public:
988 V8_INLINE ScriptOrigin( 988 V8_INLINE ScriptOrigin(
989 Handle<Value> resource_name, 989 Handle<Value> resource_name,
990 Handle<Integer> resource_line_offset = Handle<Integer>(), 990 Handle<Integer> resource_line_offset = Handle<Integer>(),
991 Handle<Integer> resource_column_offset = Handle<Integer>(), 991 Handle<Integer> resource_column_offset = Handle<Integer>(),
992 Handle<Boolean> resource_is_shared_cross_origin = Handle<Boolean>(), 992 Handle<Boolean> resource_is_shared_cross_origin = Handle<Boolean>(),
993 Handle<Integer> script_id = Handle<Integer>(), 993 Handle<Integer> script_id = Handle<Integer>(),
994 Handle<Boolean> resource_is_embedder_debug_script = Handle<Boolean>()) 994 Handle<Boolean> resource_is_embedder_debug_script = Handle<Boolean>(),
995 Handle<Value> source_map_url = Handle<Value>())
995 : resource_name_(resource_name), 996 : resource_name_(resource_name),
996 resource_line_offset_(resource_line_offset), 997 resource_line_offset_(resource_line_offset),
997 resource_column_offset_(resource_column_offset), 998 resource_column_offset_(resource_column_offset),
998 resource_is_embedder_debug_script_(resource_is_embedder_debug_script), 999 resource_is_embedder_debug_script_(resource_is_embedder_debug_script),
999 resource_is_shared_cross_origin_(resource_is_shared_cross_origin), 1000 resource_is_shared_cross_origin_(resource_is_shared_cross_origin),
1000 script_id_(script_id) {} 1001 script_id_(script_id),
1002 source_map_url_(source_map_url) {}
1001 V8_INLINE Handle<Value> ResourceName() const; 1003 V8_INLINE Handle<Value> ResourceName() const;
1002 V8_INLINE Handle<Integer> ResourceLineOffset() const; 1004 V8_INLINE Handle<Integer> ResourceLineOffset() const;
1003 V8_INLINE Handle<Integer> ResourceColumnOffset() const; 1005 V8_INLINE Handle<Integer> ResourceColumnOffset() const;
1004 /** 1006 /**
1005 * Returns true for embedder's debugger scripts 1007 * Returns true for embedder's debugger scripts
1006 */ 1008 */
1007 V8_INLINE Handle<Boolean> ResourceIsEmbedderDebugScript() const; 1009 V8_INLINE Handle<Boolean> ResourceIsEmbedderDebugScript() const;
1008 V8_INLINE Handle<Boolean> ResourceIsSharedCrossOrigin() const; 1010 V8_INLINE Handle<Boolean> ResourceIsSharedCrossOrigin() const;
1009 V8_INLINE Handle<Integer> ScriptID() const; 1011 V8_INLINE Handle<Integer> ScriptID() const;
1012 V8_INLINE Handle<Value> SourceMapUrl() const;
1010 1013
1011 private: 1014 private:
1012 Handle<Value> resource_name_; 1015 Handle<Value> resource_name_;
1013 Handle<Integer> resource_line_offset_; 1016 Handle<Integer> resource_line_offset_;
1014 Handle<Integer> resource_column_offset_; 1017 Handle<Integer> resource_column_offset_;
1015 Handle<Boolean> resource_is_embedder_debug_script_; 1018 Handle<Boolean> resource_is_embedder_debug_script_;
1016 Handle<Boolean> resource_is_shared_cross_origin_; 1019 Handle<Boolean> resource_is_shared_cross_origin_;
1017 Handle<Integer> script_id_; 1020 Handle<Integer> script_id_;
1021 Handle<Value> source_map_url_;
1018 }; 1022 };
1019 1023
1020 1024
1021 /** 1025 /**
1022 * A compiled JavaScript script, not yet tied to a Context. 1026 * A compiled JavaScript script, not yet tied to a Context.
1023 */ 1027 */
1024 class V8_EXPORT UnboundScript { 1028 class V8_EXPORT UnboundScript {
1025 public: 1029 public:
1026 /** 1030 /**
1027 * Binds the script to the currently entered context. 1031 * Binds the script to the currently entered context.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 Source& operator=(const Source&); 1161 Source& operator=(const Source&);
1158 1162
1159 Local<String> source_string; 1163 Local<String> source_string;
1160 1164
1161 // Origin information 1165 // Origin information
1162 Handle<Value> resource_name; 1166 Handle<Value> resource_name;
1163 Handle<Integer> resource_line_offset; 1167 Handle<Integer> resource_line_offset;
1164 Handle<Integer> resource_column_offset; 1168 Handle<Integer> resource_column_offset;
1165 Handle<Boolean> resource_is_embedder_debug_script; 1169 Handle<Boolean> resource_is_embedder_debug_script;
1166 Handle<Boolean> resource_is_shared_cross_origin; 1170 Handle<Boolean> resource_is_shared_cross_origin;
1171 Handle<Value> source_map_url;
1167 1172
1168 // Cached data from previous compilation (if a kConsume*Cache flag is 1173 // Cached data from previous compilation (if a kConsume*Cache flag is
1169 // set), or hold newly generated cache data (kProduce*Cache flags) are 1174 // set), or hold newly generated cache data (kProduce*Cache flags) are
1170 // set when calling a compile method. 1175 // set when calling a compile method.
1171 CachedData* cached_data; 1176 CachedData* cached_data;
1172 }; 1177 };
1173 1178
1174 /** 1179 /**
1175 * For streaming incomplete script data to V8. The embedder should implement a 1180 * For streaming incomplete script data to V8. The embedder should implement a
1176 * subclass of this class. 1181 * subclass of this class.
(...skipping 5817 matching lines...) Expand 10 before | Expand all | Expand 10 after
6994 Handle<Boolean> ScriptOrigin::ResourceIsSharedCrossOrigin() const { 6999 Handle<Boolean> ScriptOrigin::ResourceIsSharedCrossOrigin() const {
6995 return resource_is_shared_cross_origin_; 7000 return resource_is_shared_cross_origin_;
6996 } 7001 }
6997 7002
6998 7003
6999 Handle<Integer> ScriptOrigin::ScriptID() const { 7004 Handle<Integer> ScriptOrigin::ScriptID() const {
7000 return script_id_; 7005 return script_id_;
7001 } 7006 }
7002 7007
7003 7008
7009 Handle<Value> ScriptOrigin::SourceMapUrl() const { return source_map_url_; }
7010
7011
7004 ScriptCompiler::Source::Source(Local<String> string, const ScriptOrigin& origin, 7012 ScriptCompiler::Source::Source(Local<String> string, const ScriptOrigin& origin,
7005 CachedData* data) 7013 CachedData* data)
7006 : source_string(string), 7014 : source_string(string),
7007 resource_name(origin.ResourceName()), 7015 resource_name(origin.ResourceName()),
7008 resource_line_offset(origin.ResourceLineOffset()), 7016 resource_line_offset(origin.ResourceLineOffset()),
7009 resource_column_offset(origin.ResourceColumnOffset()), 7017 resource_column_offset(origin.ResourceColumnOffset()),
7010 resource_is_embedder_debug_script(origin.ResourceIsEmbedderDebugScript()), 7018 resource_is_embedder_debug_script(origin.ResourceIsEmbedderDebugScript()),
7011 resource_is_shared_cross_origin(origin.ResourceIsSharedCrossOrigin()), 7019 resource_is_shared_cross_origin(origin.ResourceIsSharedCrossOrigin()),
7020 source_map_url(origin.SourceMapUrl()),
7012 cached_data(data) {} 7021 cached_data(data) {}
7013 7022
7014 7023
7015 ScriptCompiler::Source::Source(Local<String> string, 7024 ScriptCompiler::Source::Source(Local<String> string,
7016 CachedData* data) 7025 CachedData* data)
7017 : source_string(string), cached_data(data) {} 7026 : source_string(string), cached_data(data) {}
7018 7027
7019 7028
7020 ScriptCompiler::Source::~Source() { 7029 ScriptCompiler::Source::~Source() {
7021 delete cached_data; 7030 delete cached_data;
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
7738 */ 7747 */
7739 7748
7740 7749
7741 } // namespace v8 7750 } // namespace v8
7742 7751
7743 7752
7744 #undef TYPE_CHECK 7753 #undef TYPE_CHECK
7745 7754
7746 7755
7747 #endif // V8_H_ 7756 #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