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,
73 : resource_name_(resource_name),
74 resource_line_offset_(resource_line_offset),
75 resource_column_offset_(resource_column_offset),
76 options_(resource_is_shared_cross_origin, resource_is_opaque, is_wasm,
78 script_id_(script_id),
79 source_map_url_(source_map_url),
80 host_defined_options_(host_defined_options) {
81 VerifyHostDefinedOptions();
93 void VerifyHostDefinedOptions()
const;
95 int resource_line_offset_;
96 int resource_column_offset_;
190 static const int kNoLineNumberInfo = 0;
191 static const int kNoColumnInfo = 0;
192 static const int kNoScriptIdInfo = 0;
193 static const int kNoWasmFunctionIndexInfo = -1;
199 return host_defined_options_;
Definition: v8-isolate.h:261
Definition: v8-local-handle.h:266
Definition: v8-local-handle.h:632
Definition: v8-maybe.h:32
Definition: v8-message.h:106
ScriptOrigin GetScriptOrigin() const
int GetStartColumn() const
MaybeLocal< String > GetSourceLine(Local< Context > context) const
Local< String > Get() const
bool IsSharedCrossOrigin() const
Isolate * GetIsolate() const
Local< StackTrace > GetStackTrace() const
int GetWasmFunctionIndex() const
int GetStartPosition() const
int GetEndPosition() const
Maybe< int > GetLineNumber(Local< Context > context) const
Maybe< int > GetEndColumn(Local< Context > context) const
static void PrintCurrentStackTrace(Isolate *isolate, std::ostream &out)
MaybeLocal< String > GetSource(Local< Context > context) const
Maybe< int > GetStartColumn(Local< Context > context) const
Local< Value > GetScriptResourceName() const
Definition: v8-message.h:28
bool IsModule() const
Definition: v8-message.h:45
bool IsWasm() const
Definition: v8-message.h:44
ScriptOriginOptions(bool is_shared_cross_origin=false, bool is_opaque=false, bool is_wasm=false, bool is_module=false)
Definition: v8-message.h:30
bool IsOpaque() const
Definition: v8-message.h:43
int Flags() const
Definition: v8-message.h:47
ScriptOriginOptions(int flags)
Definition: v8-message.h:36
bool IsSharedCrossOrigin() const
Definition: v8-message.h:40
Definition: v8-message.h:62
int LineOffset() const
Definition: v8-message.h:202
int ScriptId() const
Definition: v8-message.h:206
int ColumnOffset() const
Definition: v8-message.h:204
ScriptOriginOptions Options() const
Definition: v8-message.h:90
Local< Value > ResourceName() const
Definition: v8-message.h:196
Local< Value > SourceMapUrl() const
Definition: v8-message.h:208
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 >())
Definition: v8-message.h:64
Local< Data > GetHostDefinedOptions() const
Definition: v8-message.h:198
Definition: libplatform.h:15
#define V8_EXPORT
Definition: v8config.h:793
#define V8_INLINE
Definition: v8config.h:499
#define V8_WARN_UNUSED_RESULT
Definition: v8config.h:660