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,
65 int resource_line_offset = 0,
66 int resource_column_offset = 0,
67 bool resource_is_shared_cross_origin =
false,
70 bool resource_is_opaque =
false,
bool is_wasm =
false,
71 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();
96 void VerifyHostDefinedOptions()
const;
99 int resource_line_offset_;
100 int resource_column_offset_;
194 static const int kNoLineNumberInfo = 0;
195 static const int kNoColumnInfo = 0;
196 static const int kNoScriptIdInfo = 0;
197 static const int kNoWasmFunctionIndexInfo = -1;
203 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 ScriptOrigin(Isolate *isolate, 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 > SourceMapUrl() const
V8_INLINE int ColumnOffset() const
V8_INLINE Local< Data > GetHostDefinedOptions() const
V8_INLINE int LineOffset() const
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