29 DCHECK_NE(args_[index].type, kMainThreadHandle);
30 args_[
index].type = kMainThreadHandle;
31 args_[
index].js_string = isolate->heap()->NewPersistentHandle(
string);
34template <
typename IsolateT>
37 for (
int i = 0;
i < kMaxArgumentCount;
i++) {
38 switch (args_[
i].type) {
40 SetString(
i, args_[
i].ast_string->
string(), isolate);
43 case kConstCharString:
47 case kMainThreadHandle:
56 Isolate* isolate,
int index)
const {
60 switch (args_[index].type) {
61 case kMainThreadHandle:
62 return args_[
index].js_string;
65 case kConstCharString:
66 return isolate->factory()
111 MessageDetails(start_position, end_position, message, arg0, arg1);
121 MessageDetails(start_position, end_position, message, arg0, arg1, arg2);
132template <
typename IsolateT>
137 warning.Prepare(isolate);
153 isolate, warning.message(), &location, argument);
159template <
typename IsolateT>
179 isolate->StackOverflow();
195 if (
args[num_args].is_null())
break;
197 isolate->debug()->OnCompileError(script);
199 Factory* factory = isolate->factory();
202 isolate->ThrowAt(error, &location);
212 if (
args[num_args].is_null())
break;
void Internalize(IsolateT *isolate)
static V8_EXPORT_PRIVATE void ReportMessage(Isolate *isolate, const MessageLocation *loc, DirectHandle< JSMessageObject > message)
static V8_EXPORT_PRIVATE Handle< JSMessageObject > MakeMessageObject(Isolate *isolate, MessageTemplate type, const MessageLocation *location, DirectHandle< Object > argument, DirectHandle< StackTraceInfo > stack_trace=DirectHandle< StackTraceInfo >::null())
MessageArgument args_[kMaxArgumentCount]
MessageLocation GetLocation(Handle< Script > script) const
void Prepare(IsolateT *isolate)
void SetString(int index, Handle< String > string, Isolate *isolate)
DirectHandle< String > ArgString(Isolate *isolate, int index) const
MessageTemplate message() const
static constexpr int kMaxArgumentCount
void ReportWarningAt(int start_position, int end_position, MessageTemplate message, const char *arg=nullptr)
void ThrowPendingError(Isolate *isolate, Handle< Script > script) const
bool has_pending_error() const
V8_EXPORT_PRIVATE DirectHandle< String > FormatErrorMessageForTest(Isolate *isolate)
V8_EXPORT_PRIVATE void ReportErrors(Isolate *isolate, Handle< Script > script) const
bool stack_overflow() const
std::forward_list< MessageDetails > warning_messages_
MessageDetails error_details_
void ReportMessageAt(int start_position, int end_position, MessageTemplate message, const char *arg=nullptr)
void ReportWarnings(Isolate *isolate, Handle< Script > script) const
void PrepareWarnings(IsolateT *isolate)
void PrepareErrors(IsolateT *isolate, AstValueFactory *ast_value_factory)
base::Vector< const DirectHandle< Object > > args
#define EXPORT_TEMPLATE_DEFINE(export)
constexpr Vector< T > VectorOf(T *start, size_t size)
Vector< const char > CStrVector(const char *data)
template const char * string
#define DCHECK_NE(v1, v2)
#define DCHECK(condition)
#define DCHECK_LT(v1, v2)
#define V8_EXPORT_PRIVATE
Handle< String > js_string