5#ifndef INCLUDE_V8_MESSAGE_H_
6#define INCLUDE_V8_MESSAGE_H_
31 bool is_opaque =
false,
bool is_wasm =
false,
32 bool is_module =
false)
33 : flags_((is_shared_cross_origin ? kIsSharedCrossOrigin : 0) |
34 (is_wasm ? kIsWasm : 0) | (is_opaque ? kIsOpaque : 0) |
35 (is_module ? kIsModule : 0)) {}
38 (kIsSharedCrossOrigin | kIsOpaque | kIsWasm | kIsModule)) {}
41 return (flags_ & kIsSharedCrossOrigin) != 0;
43 bool IsOpaque()
const {
return (flags_ & kIsOpaque) != 0; }
44 bool IsWasm()
const {
return (flags_ & kIsWasm) != 0; }
45 bool IsModule()
const {
return (flags_ & kIsModule) != 0; }
47 int Flags()
const {
return flags_; }
51 kIsSharedCrossOrigin = 1,
66 int resource_line_offset = 0,
67 int resource_column_offset = 0,
68 bool resource_is_shared_cross_origin = false,
71 bool resource_is_opaque = false,
bool is_wasm = false,
72 bool is_module = false,
74 : resource_name_(resource_name),
75 resource_line_offset_(resource_line_offset),
76 resource_column_offset_(resource_column_offset),
77 options_(resource_is_shared_cross_origin, resource_is_opaque, is_wasm,
79 script_id_(script_id),
80 source_map_url_(source_map_url),
81 host_defined_options_(host_defined_options) {
82 VerifyHostDefinedOptions();
86 int resource_line_offset = 0,
87 int resource_column_offset = 0,
88 bool resource_is_shared_cross_origin =
false,
91 bool resource_is_opaque =
false,
bool is_wasm =
false,
92 bool is_module =
false,
94 : resource_name_(resource_name),
95 resource_line_offset_(resource_line_offset),
96 resource_column_offset_(resource_column_offset),
97 options_(resource_is_shared_cross_origin, resource_is_opaque, is_wasm,
99 script_id_(script_id),
100 source_map_url_(source_map_url),
101 host_defined_options_(host_defined_options) {
102 VerifyHostDefinedOptions();
114 void VerifyHostDefinedOptions()
const;
116 int resource_line_offset_;
117 int resource_column_offset_;
211 static const int kNoLineNumberInfo = 0;
212 static const int kNoColumnInfo = 0;
213 static const int kNoScriptIdInfo = 0;
214 static const int kNoWasmFunctionIndexInfo = -1;
220 return host_defined_options_;
Local< StackTrace > GetStackTrace() const
int GetEndPosition() const
Isolate * GetIsolate() const
V8_WARN_UNUSED_RESULT MaybeLocal< String > GetSourceLine(Local< Context > context) const
int GetWasmFunctionIndex() const
V8_WARN_UNUSED_RESULT Maybe< int > GetStartColumn(Local< Context > context) const
V8_WARN_UNUSED_RESULT Maybe< int > GetLineNumber(Local< Context > context) const
ScriptOrigin GetScriptOrigin() const
int GetStartColumn() const
V8_WARN_UNUSED_RESULT MaybeLocal< String > GetSource(Local< Context > context) const
V8_WARN_UNUSED_RESULT Maybe< int > GetEndColumn(Local< Context > context) const
Local< Value > GetScriptResourceName() const
Local< String > Get() const
static void PrintCurrentStackTrace(Isolate *isolate, std::ostream &out)
bool IsSharedCrossOrigin() const
int GetStartPosition() const
V8_INLINE Local< Value > SourceMapUrl() const
V8_INLINE int ColumnOffset() const
V8_INLINE Local< Data > GetHostDefinedOptions() const
V8_INLINE int LineOffset() const
V8_INLINE ScriptOriginOptions Options() const
V8_INLINE ScriptOrigin(Local< Value > resource_name, int resource_line_offset=0, int resource_column_offset=0, bool resource_is_shared_cross_origin=false, int script_id=-1, Local< Value > source_map_url=Local< Value >(), bool resource_is_opaque=false, bool is_wasm=false, bool is_module=false, Local< Data > host_defined_options=Local< Data >())
V8_INLINE Local< Value > ResourceName() const
V8_INLINE int ScriptId() const
V8_INLINE ScriptOriginOptions(int flags)
bool IsSharedCrossOrigin() const
V8_INLINE ScriptOriginOptions(bool is_shared_cross_origin=false, bool is_opaque=false, bool is_wasm=false, bool is_module=false)
#define V8_DEPRECATE_SOON(message)
#define V8_WARN_UNUSED_RESULT