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

Side by Side Diff: include/v8.h

Issue 879553002: [V8] Added Script::is_debugger_script flag for embedders (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/accessors.h » ('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 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 /** 969 /**
970 * The origin, within a file, of a script. 970 * The origin, within a file, of a script.
971 */ 971 */
972 class ScriptOrigin { 972 class ScriptOrigin {
973 public: 973 public:
974 V8_INLINE ScriptOrigin( 974 V8_INLINE ScriptOrigin(
975 Handle<Value> resource_name, 975 Handle<Value> resource_name,
976 Handle<Integer> resource_line_offset = Handle<Integer>(), 976 Handle<Integer> resource_line_offset = Handle<Integer>(),
977 Handle<Integer> resource_column_offset = Handle<Integer>(), 977 Handle<Integer> resource_column_offset = Handle<Integer>(),
978 Handle<Boolean> resource_is_shared_cross_origin = Handle<Boolean>(), 978 Handle<Boolean> resource_is_shared_cross_origin = Handle<Boolean>(),
979 Handle<Integer> script_id = Handle<Integer>()) 979 Handle<Integer> script_id = Handle<Integer>(),
980 Handle<Boolean> resource_is_embedder_debug_script = Handle<Boolean>())
980 : resource_name_(resource_name), 981 : resource_name_(resource_name),
981 resource_line_offset_(resource_line_offset), 982 resource_line_offset_(resource_line_offset),
982 resource_column_offset_(resource_column_offset), 983 resource_column_offset_(resource_column_offset),
984 resource_is_embedder_debug_script_(resource_is_embedder_debug_script),
983 resource_is_shared_cross_origin_(resource_is_shared_cross_origin), 985 resource_is_shared_cross_origin_(resource_is_shared_cross_origin),
984 script_id_(script_id) { } 986 script_id_(script_id) {}
985 V8_INLINE Handle<Value> ResourceName() const; 987 V8_INLINE Handle<Value> ResourceName() const;
986 V8_INLINE Handle<Integer> ResourceLineOffset() const; 988 V8_INLINE Handle<Integer> ResourceLineOffset() const;
987 V8_INLINE Handle<Integer> ResourceColumnOffset() const; 989 V8_INLINE Handle<Integer> ResourceColumnOffset() const;
990 /**
991 * Returns true for embedder's debugger scripts
992 */
993 V8_INLINE Handle<Boolean> ResourceIsEmbedderDebugScript() const;
988 V8_INLINE Handle<Boolean> ResourceIsSharedCrossOrigin() const; 994 V8_INLINE Handle<Boolean> ResourceIsSharedCrossOrigin() const;
989 V8_INLINE Handle<Integer> ScriptID() const; 995 V8_INLINE Handle<Integer> ScriptID() const;
996
990 private: 997 private:
991 Handle<Value> resource_name_; 998 Handle<Value> resource_name_;
992 Handle<Integer> resource_line_offset_; 999 Handle<Integer> resource_line_offset_;
993 Handle<Integer> resource_column_offset_; 1000 Handle<Integer> resource_column_offset_;
1001 Handle<Boolean> resource_is_embedder_debug_script_;
994 Handle<Boolean> resource_is_shared_cross_origin_; 1002 Handle<Boolean> resource_is_shared_cross_origin_;
995 Handle<Integer> script_id_; 1003 Handle<Integer> script_id_;
996 }; 1004 };
997 1005
998 1006
999 /** 1007 /**
1000 * A compiled JavaScript script, not yet tied to a Context. 1008 * A compiled JavaScript script, not yet tied to a Context.
1001 */ 1009 */
1002 class V8_EXPORT UnboundScript { 1010 class V8_EXPORT UnboundScript {
1003 public: 1011 public:
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 // Prevent copying. Not implemented. 1137 // Prevent copying. Not implemented.
1130 Source(const Source&); 1138 Source(const Source&);
1131 Source& operator=(const Source&); 1139 Source& operator=(const Source&);
1132 1140
1133 Local<String> source_string; 1141 Local<String> source_string;
1134 1142
1135 // Origin information 1143 // Origin information
1136 Handle<Value> resource_name; 1144 Handle<Value> resource_name;
1137 Handle<Integer> resource_line_offset; 1145 Handle<Integer> resource_line_offset;
1138 Handle<Integer> resource_column_offset; 1146 Handle<Integer> resource_column_offset;
1147 Handle<Boolean> resource_is_embedder_debug_script;
1139 Handle<Boolean> resource_is_shared_cross_origin; 1148 Handle<Boolean> resource_is_shared_cross_origin;
1140 1149
1141 // Cached data from previous compilation (if a kConsume*Cache flag is 1150 // Cached data from previous compilation (if a kConsume*Cache flag is
1142 // set), or hold newly generated cache data (kProduce*Cache flags) are 1151 // set), or hold newly generated cache data (kProduce*Cache flags) are
1143 // set when calling a compile method. 1152 // set when calling a compile method.
1144 CachedData* cached_data; 1153 CachedData* cached_data;
1145 }; 1154 };
1146 1155
1147 /** 1156 /**
1148 * For streaming incomplete script data to V8. The embedder should implement a 1157 * For streaming incomplete script data to V8. The embedder should implement a
(...skipping 5570 matching lines...) Expand 10 before | Expand all | Expand 10 after
6719 Handle<Integer> ScriptOrigin::ResourceLineOffset() const { 6728 Handle<Integer> ScriptOrigin::ResourceLineOffset() const {
6720 return resource_line_offset_; 6729 return resource_line_offset_;
6721 } 6730 }
6722 6731
6723 6732
6724 Handle<Integer> ScriptOrigin::ResourceColumnOffset() const { 6733 Handle<Integer> ScriptOrigin::ResourceColumnOffset() const {
6725 return resource_column_offset_; 6734 return resource_column_offset_;
6726 } 6735 }
6727 6736
6728 6737
6738 Handle<Boolean> ScriptOrigin::ResourceIsEmbedderDebugScript() const {
6739 return resource_is_embedder_debug_script_;
6740 }
6741
6742
6729 Handle<Boolean> ScriptOrigin::ResourceIsSharedCrossOrigin() const { 6743 Handle<Boolean> ScriptOrigin::ResourceIsSharedCrossOrigin() const {
6730 return resource_is_shared_cross_origin_; 6744 return resource_is_shared_cross_origin_;
6731 } 6745 }
6732 6746
6733 6747
6734 Handle<Integer> ScriptOrigin::ScriptID() const { 6748 Handle<Integer> ScriptOrigin::ScriptID() const {
6735 return script_id_; 6749 return script_id_;
6736 } 6750 }
6737 6751
6738 6752
6739 ScriptCompiler::Source::Source(Local<String> string, const ScriptOrigin& origin, 6753 ScriptCompiler::Source::Source(Local<String> string, const ScriptOrigin& origin,
6740 CachedData* data) 6754 CachedData* data)
6741 : source_string(string), 6755 : source_string(string),
6742 resource_name(origin.ResourceName()), 6756 resource_name(origin.ResourceName()),
6743 resource_line_offset(origin.ResourceLineOffset()), 6757 resource_line_offset(origin.ResourceLineOffset()),
6744 resource_column_offset(origin.ResourceColumnOffset()), 6758 resource_column_offset(origin.ResourceColumnOffset()),
6759 resource_is_embedder_debug_script(origin.ResourceIsEmbedderDebugScript()),
6745 resource_is_shared_cross_origin(origin.ResourceIsSharedCrossOrigin()), 6760 resource_is_shared_cross_origin(origin.ResourceIsSharedCrossOrigin()),
6746 cached_data(data) {} 6761 cached_data(data) {}
6747 6762
6748 6763
6749 ScriptCompiler::Source::Source(Local<String> string, 6764 ScriptCompiler::Source::Source(Local<String> string,
6750 CachedData* data) 6765 CachedData* data)
6751 : source_string(string), cached_data(data) {} 6766 : source_string(string), cached_data(data) {}
6752 6767
6753 6768
6754 ScriptCompiler::Source::~Source() { 6769 ScriptCompiler::Source::~Source() {
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
7472 */ 7487 */
7473 7488
7474 7489
7475 } // namespace v8 7490 } // namespace v8
7476 7491
7477 7492
7478 #undef TYPE_CHECK 7493 #undef TYPE_CHECK
7479 7494
7480 7495
7481 #endif // V8_H_ 7496 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/accessors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698