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

Side by Side Diff: include/v8.h

Issue 363553005: Add ScriptID field into ScriptOrigin class. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 6 years, 5 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 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 909
910 /** 910 /**
911 * The origin, within a file, of a script. 911 * The origin, within a file, of a script.
912 */ 912 */
913 class ScriptOrigin { 913 class ScriptOrigin {
914 public: 914 public:
915 V8_INLINE ScriptOrigin( 915 V8_INLINE ScriptOrigin(
916 Handle<Value> resource_name, 916 Handle<Value> resource_name,
917 Handle<Integer> resource_line_offset = Handle<Integer>(), 917 Handle<Integer> resource_line_offset = Handle<Integer>(),
918 Handle<Integer> resource_column_offset = Handle<Integer>(), 918 Handle<Integer> resource_column_offset = Handle<Integer>(),
919 Handle<Boolean> resource_is_shared_cross_origin = Handle<Boolean>()) 919 Handle<Boolean> resource_is_shared_cross_origin = Handle<Boolean>(),
920 Handle<Integer> script_id = Handle<Integer>())
920 : resource_name_(resource_name), 921 : resource_name_(resource_name),
921 resource_line_offset_(resource_line_offset), 922 resource_line_offset_(resource_line_offset),
922 resource_column_offset_(resource_column_offset), 923 resource_column_offset_(resource_column_offset),
923 resource_is_shared_cross_origin_(resource_is_shared_cross_origin) { } 924 resource_is_shared_cross_origin_(resource_is_shared_cross_origin),
925 script_id_(script_id) { }
924 V8_INLINE Handle<Value> ResourceName() const; 926 V8_INLINE Handle<Value> ResourceName() const;
925 V8_INLINE Handle<Integer> ResourceLineOffset() const; 927 V8_INLINE Handle<Integer> ResourceLineOffset() const;
926 V8_INLINE Handle<Integer> ResourceColumnOffset() const; 928 V8_INLINE Handle<Integer> ResourceColumnOffset() const;
927 V8_INLINE Handle<Boolean> ResourceIsSharedCrossOrigin() const; 929 V8_INLINE Handle<Boolean> ResourceIsSharedCrossOrigin() const;
930 V8_INLINE Handle<Integer> ScriptID() const;
928 private: 931 private:
929 Handle<Value> resource_name_; 932 Handle<Value> resource_name_;
930 Handle<Integer> resource_line_offset_; 933 Handle<Integer> resource_line_offset_;
931 Handle<Integer> resource_column_offset_; 934 Handle<Integer> resource_column_offset_;
932 Handle<Boolean> resource_is_shared_cross_origin_; 935 Handle<Boolean> resource_is_shared_cross_origin_;
936 Handle<Integer> script_id_;
933 }; 937 };
934 938
935 939
936 /** 940 /**
937 * A compiled JavaScript script, not yet tied to a Context. 941 * A compiled JavaScript script, not yet tied to a Context.
938 */ 942 */
939 class V8_EXPORT UnboundScript { 943 class V8_EXPORT UnboundScript {
940 public: 944 public:
941 /** 945 /**
942 * Binds the script to the currently entered context. 946 * Binds the script to the currently entered context.
(...skipping 5169 matching lines...) Expand 10 before | Expand all | Expand 10 after
6112 6116
6113 Handle<Integer> ScriptOrigin::ResourceLineOffset() const { 6117 Handle<Integer> ScriptOrigin::ResourceLineOffset() const {
6114 return resource_line_offset_; 6118 return resource_line_offset_;
6115 } 6119 }
6116 6120
6117 6121
6118 Handle<Integer> ScriptOrigin::ResourceColumnOffset() const { 6122 Handle<Integer> ScriptOrigin::ResourceColumnOffset() const {
6119 return resource_column_offset_; 6123 return resource_column_offset_;
6120 } 6124 }
6121 6125
6126
6122 Handle<Boolean> ScriptOrigin::ResourceIsSharedCrossOrigin() const { 6127 Handle<Boolean> ScriptOrigin::ResourceIsSharedCrossOrigin() const {
6123 return resource_is_shared_cross_origin_; 6128 return resource_is_shared_cross_origin_;
6124 } 6129 }
6125 6130
6126 6131
6132 Handle<Integer> ScriptOrigin::ScriptID() const {
6133 return script_id_;
6134 }
6135
6136
6127 ScriptCompiler::Source::Source(Local<String> string, const ScriptOrigin& origin, 6137 ScriptCompiler::Source::Source(Local<String> string, const ScriptOrigin& origin,
6128 CachedData* data) 6138 CachedData* data)
6129 : source_string(string), 6139 : source_string(string),
6130 resource_name(origin.ResourceName()), 6140 resource_name(origin.ResourceName()),
6131 resource_line_offset(origin.ResourceLineOffset()), 6141 resource_line_offset(origin.ResourceLineOffset()),
6132 resource_column_offset(origin.ResourceColumnOffset()), 6142 resource_column_offset(origin.ResourceColumnOffset()),
6133 resource_is_shared_cross_origin(origin.ResourceIsSharedCrossOrigin()), 6143 resource_is_shared_cross_origin(origin.ResourceIsSharedCrossOrigin()),
6134 cached_data(data) {} 6144 cached_data(data) {}
6135 6145
6136 6146
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
6702 */ 6712 */
6703 6713
6704 6714
6705 } // namespace v8 6715 } // namespace v8
6706 6716
6707 6717
6708 #undef TYPE_CHECK 6718 #undef TYPE_CHECK
6709 6719
6710 6720
6711 #endif // V8_H_ 6721 #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