[inspector] Capture stack trace only once for JSError objects.
When creating a new JSError object (or using the non-standard API `Error.captureStackTrace`) V8 would previously capture the "simple stack trace" (as FixedArray of CallSiteInfo instances) to be used for the non- standard `error.stack` property, and if the inspector was active also capture the "detailed stack trace" (as FixedArray of StackFrameInfo instances). This turns out to be quite a lot of overhead, both in terms of execution time as well as memory pressure, especially since the information needed for the inspector is a proper subset of the information needed by `error.stack`. So this CL addresses the above issue by capturing only the "simple stack trace" (in the common case) and computing the "detailed stack trace" from the "simple stack trace" when on demand. This is accomplished by introducing a new ErrorStackData container that is used to store the stack trace information on JSErrors when the inspector is active. When capturing stack trace for a JSError object while the inspector is active, we take the maximum of the program controlled stack trace limit and the inspector requested stack trace limit, and memorize the program controlled stack trace limit for later formatting (to ensure that the presence of the inspector is not observable by the program). On the `standalone.js` benchmark from crbug.com/1283162 (with the default max call stack size of 200) we reduce execution time by around 16% compared to ToT. And compared to V8 9.9.4 (the version prior to the regression in crbug.com/1280831), we are 6% faster now. Doc: https://bit.ly/v8-cheaper-inspector-stack-traces Bug: chromium:1280831, chromium:1278650, chromium:1258599 Bug: chromium:1280803, chromium:1280832, chromium:1280818 Fixed: chromium:1283162 Change-Id: I57dac73e0ecf7d50ea57c3eb4981067deb28133e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3366660 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/main@{#78542}
This commit is contained in:
parent
506c0cf24f
commit
765ca6a0d3
@ -767,75 +767,28 @@ Handle<AccessorInfo> Accessors::MakeBoundFunctionNameInfo(Isolate* isolate) {
|
||||
|
||||
void Accessors::ErrorStackGetter(
|
||||
v8::Local<v8::Name> key, const v8::PropertyCallbackInfo<v8::Value>& info) {
|
||||
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
|
||||
Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
|
||||
HandleScope scope(isolate);
|
||||
Handle<JSObject> holder =
|
||||
Handle<Object> formatted_stack;
|
||||
Handle<JSObject> error_object =
|
||||
Handle<JSObject>::cast(Utils::OpenHandle(*info.Holder()));
|
||||
|
||||
// Retrieve the stack trace. It can either be structured data in the form of
|
||||
// a FixedArray of CallSiteInfo objects, an already formatted stack trace
|
||||
// (string) or whatever the "prepareStackTrace" callback produced.
|
||||
|
||||
Handle<Object> stack_trace;
|
||||
Handle<Symbol> stack_trace_symbol = isolate->factory()->stack_trace_symbol();
|
||||
MaybeHandle<Object> maybe_stack_trace =
|
||||
JSObject::GetProperty(isolate, holder, stack_trace_symbol);
|
||||
if (!maybe_stack_trace.ToHandle(&stack_trace) ||
|
||||
stack_trace->IsUndefined(isolate)) {
|
||||
Handle<Object> result = isolate->factory()->undefined_value();
|
||||
info.GetReturnValue().Set(Utils::ToLocal(result));
|
||||
return;
|
||||
}
|
||||
|
||||
// Only format the stack-trace the first time around. The check for a
|
||||
// FixedArray is sufficient as the user callback can not create plain
|
||||
// FixedArrays and the result is a String in case we format the stack
|
||||
// trace ourselves.
|
||||
|
||||
if (!stack_trace->IsFixedArray()) {
|
||||
info.GetReturnValue().Set(Utils::ToLocal(stack_trace));
|
||||
return;
|
||||
}
|
||||
|
||||
Handle<Object> formatted_stack_trace;
|
||||
if (!ErrorUtils::FormatStackTrace(isolate, holder, stack_trace)
|
||||
.ToHandle(&formatted_stack_trace)) {
|
||||
if (!ErrorUtils::GetFormattedStack(isolate, error_object)
|
||||
.ToHandle(&formatted_stack)) {
|
||||
isolate->OptionalRescheduleException(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// Replace the structured stack-trace with the formatting result.
|
||||
MaybeHandle<Object> result = Object::SetProperty(
|
||||
isolate, holder, isolate->factory()->stack_trace_symbol(),
|
||||
formatted_stack_trace, StoreOrigin::kMaybeKeyed,
|
||||
Just(ShouldThrow::kThrowOnError));
|
||||
if (result.is_null()) {
|
||||
isolate->OptionalRescheduleException(false);
|
||||
return;
|
||||
}
|
||||
|
||||
v8::Local<v8::Value> value = Utils::ToLocal(formatted_stack_trace);
|
||||
info.GetReturnValue().Set(value);
|
||||
info.GetReturnValue().Set(Utils::ToLocal(formatted_stack));
|
||||
}
|
||||
|
||||
void Accessors::ErrorStackSetter(
|
||||
v8::Local<v8::Name> name, v8::Local<v8::Value> val,
|
||||
v8::Local<v8::Name> name, v8::Local<v8::Value> value,
|
||||
const v8::PropertyCallbackInfo<v8::Boolean>& info) {
|
||||
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
|
||||
Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
|
||||
HandleScope scope(isolate);
|
||||
Handle<JSObject> obj = Handle<JSObject>::cast(
|
||||
Utils::OpenHandle(*v8::Local<v8::Value>(info.This())));
|
||||
Handle<Object> value = Handle<Object>::cast(Utils::OpenHandle(*val));
|
||||
|
||||
// Store the value in the internal symbol to avoid reconfiguration to
|
||||
// a data property.
|
||||
MaybeHandle<Object> result = Object::SetProperty(
|
||||
isolate, obj, isolate->factory()->stack_trace_symbol(), value,
|
||||
StoreOrigin::kMaybeKeyed, Just(ShouldThrow::kThrowOnError));
|
||||
if (result.is_null()) {
|
||||
isolate->OptionalRescheduleException(false);
|
||||
return;
|
||||
}
|
||||
Handle<JSObject> error_object =
|
||||
Handle<JSObject>::cast(Utils::OpenHandle(*info.Holder()));
|
||||
ErrorUtils::SetFormattedStack(isolate, error_object,
|
||||
Utils::OpenHandle(*value));
|
||||
}
|
||||
|
||||
Handle<AccessorInfo> Accessors::MakeErrorStackInfo(Isolate* isolate) {
|
||||
|
@ -44,10 +44,8 @@ BUILTIN(ErrorCaptureStackTrace) {
|
||||
|
||||
// Collect the stack trace.
|
||||
|
||||
RETURN_FAILURE_ON_EXCEPTION(isolate,
|
||||
isolate->CaptureAndSetDetailedStackTrace(object));
|
||||
RETURN_FAILURE_ON_EXCEPTION(
|
||||
isolate, isolate->CaptureAndSetSimpleStackTrace(object, mode, caller));
|
||||
isolate, isolate->CaptureAndSetErrorStack(object, mode, caller));
|
||||
|
||||
// Add the stack accessors.
|
||||
|
||||
|
@ -1806,6 +1806,12 @@ void StackFrameInfo::StackFrameInfoVerify(Isolate* isolate) {
|
||||
TorqueGeneratedClassVerifiers::StackFrameInfoVerify(*this, isolate);
|
||||
}
|
||||
|
||||
void ErrorStackData::ErrorStackDataVerify(Isolate* isolate) {
|
||||
TorqueGeneratedClassVerifiers::ErrorStackDataVerify(*this, isolate);
|
||||
CHECK_IMPLIES(!call_site_infos_or_formatted_stack().IsFixedArray(),
|
||||
limit_or_stack_frame_infos().IsFixedArray());
|
||||
}
|
||||
|
||||
// Helper class for verifying the string table.
|
||||
class StringTableVerifier : public RootVisitor {
|
||||
public:
|
||||
|
@ -895,7 +895,7 @@ class CallSiteBuilder {
|
||||
};
|
||||
|
||||
bool GetStackTraceLimit(Isolate* isolate, int* result) {
|
||||
DCHECK(!FLAG_correctness_fuzzer_suppressions);
|
||||
if (FLAG_correctness_fuzzer_suppressions) return false;
|
||||
Handle<JSObject> error = isolate->error_function();
|
||||
|
||||
Handle<String> key = isolate->factory()->stackTraceLimit_string();
|
||||
@ -1129,11 +1129,9 @@ void VisitStack(Isolate* isolate, Visitor* visitor,
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Handle<FixedArray> Isolate::CaptureSimpleStackTrace(int limit,
|
||||
FrameSkipMode mode,
|
||||
Handle<Object> caller) {
|
||||
Handle<FixedArray> CaptureSimpleStackTrace(Isolate* isolate, int limit,
|
||||
FrameSkipMode mode,
|
||||
Handle<Object> caller) {
|
||||
TRACE_EVENT_BEGIN1(TRACE_DISABLED_BY_DEFAULT("v8.stack_trace"), __func__,
|
||||
"maxFrameCount", limit);
|
||||
|
||||
@ -1141,14 +1139,14 @@ Handle<FixedArray> Isolate::CaptureSimpleStackTrace(int limit,
|
||||
wasm::WasmCodeRefScope code_ref_scope;
|
||||
#endif // V8_ENABLE_WEBASSEMBLY
|
||||
|
||||
CallSiteBuilder builder(this, mode, limit, caller);
|
||||
VisitStack(this, &builder);
|
||||
CallSiteBuilder builder(isolate, mode, limit, caller);
|
||||
VisitStack(isolate, &builder);
|
||||
|
||||
// If --async-stack-traces are enabled and the "current microtask" is a
|
||||
// PromiseReactionJobTask, we try to enrich the stack trace with async
|
||||
// frames.
|
||||
if (FLAG_async_stack_traces) {
|
||||
CaptureAsyncStackTrace(this, &builder);
|
||||
CaptureAsyncStackTrace(isolate, &builder);
|
||||
}
|
||||
|
||||
Handle<FixedArray> stack_trace = builder.Build();
|
||||
@ -1157,57 +1155,105 @@ Handle<FixedArray> Isolate::CaptureSimpleStackTrace(int limit,
|
||||
return stack_trace;
|
||||
}
|
||||
|
||||
MaybeHandle<JSReceiver> Isolate::CaptureAndSetDetailedStackTrace(
|
||||
Handle<JSReceiver> error_object) {
|
||||
if (capture_stack_trace_for_uncaught_exceptions_) {
|
||||
// Capture stack trace for a detailed exception message.
|
||||
Handle<Name> key = factory()->detailed_stack_trace_symbol();
|
||||
Handle<FixedArray> stack_trace = CaptureDetailedStackTrace(
|
||||
stack_trace_for_uncaught_exceptions_frame_limit_,
|
||||
stack_trace_for_uncaught_exceptions_options_);
|
||||
RETURN_ON_EXCEPTION(
|
||||
this,
|
||||
Object::SetProperty(this, error_object, key, stack_trace,
|
||||
StoreOrigin::kMaybeKeyed,
|
||||
Just(ShouldThrow::kThrowOnError)),
|
||||
JSReceiver);
|
||||
}
|
||||
return error_object;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
MaybeHandle<JSReceiver> Isolate::CaptureAndSetSimpleStackTrace(
|
||||
Handle<JSReceiver> error_object, FrameSkipMode mode,
|
||||
Handle<Object> caller) {
|
||||
// Capture stack trace for simple stack trace string formatting.
|
||||
Handle<Name> key = factory()->stack_trace_symbol();
|
||||
Handle<Object> stack_trace = factory()->undefined_value();
|
||||
int limit;
|
||||
if (!FLAG_correctness_fuzzer_suppressions &&
|
||||
GetStackTraceLimit(this, &limit)) {
|
||||
stack_trace = CaptureSimpleStackTrace(limit, mode, caller);
|
||||
MaybeHandle<JSObject> Isolate::CaptureAndSetErrorStack(
|
||||
Handle<JSObject> error_object, FrameSkipMode mode, Handle<Object> caller) {
|
||||
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.stack_trace"), __func__);
|
||||
Handle<Object> error_stack = factory()->undefined_value();
|
||||
|
||||
// Capture the "simple stack trace" for the error.stack property,
|
||||
// which can be disabled by setting Error.stackTraceLimit to a non
|
||||
// number value or simply deleting the property. If the inspector
|
||||
// is active, and requests more stack frames than the JavaScript
|
||||
// program itself, we collect up to the maximum.
|
||||
int stack_trace_limit = 0;
|
||||
if (GetStackTraceLimit(this, &stack_trace_limit)) {
|
||||
int limit = stack_trace_limit;
|
||||
if (capture_stack_trace_for_uncaught_exceptions_ &&
|
||||
!(stack_trace_for_uncaught_exceptions_options_ &
|
||||
StackTrace::kExposeFramesAcrossSecurityOrigins)) {
|
||||
// Collect up to the maximum of what the JavaScript program and
|
||||
// the inspector want. There's a special case here where the API
|
||||
// can ask the stack traces to also include cross-origin frames,
|
||||
// in which case we collect a separate trace below. Note that
|
||||
// the inspector doesn't use this option, so we could as well
|
||||
// just deprecate this in the future.
|
||||
if (limit < stack_trace_for_uncaught_exceptions_frame_limit_) {
|
||||
limit = stack_trace_for_uncaught_exceptions_frame_limit_;
|
||||
}
|
||||
}
|
||||
error_stack = CaptureSimpleStackTrace(this, limit, mode, caller);
|
||||
}
|
||||
RETURN_ON_EXCEPTION(this,
|
||||
Object::SetProperty(this, error_object, key, stack_trace,
|
||||
StoreOrigin::kMaybeKeyed,
|
||||
Just(ShouldThrow::kThrowOnError)),
|
||||
JSReceiver);
|
||||
|
||||
// Next is the inspector part: Depending on whether we got a "simple
|
||||
// stack trace" above and whether that's usable (meaning the API
|
||||
// didn't request to include cross-origin frames), we remember the
|
||||
// cap for the stack trace (either a positive limit indicating that
|
||||
// the Error.stackTraceLimit value was below what was requested via
|
||||
// the API, or a negative limit to indicate the opposite), or we
|
||||
// collect a "detailed stack trace" eagerly and stash that away.
|
||||
if (capture_stack_trace_for_uncaught_exceptions_) {
|
||||
Handle<Object> limit_or_stack_frame_infos;
|
||||
if (error_stack->IsUndefined(this) ||
|
||||
(stack_trace_for_uncaught_exceptions_options_ &
|
||||
StackTrace::kExposeFramesAcrossSecurityOrigins)) {
|
||||
limit_or_stack_frame_infos = CaptureDetailedStackTrace(
|
||||
stack_trace_for_uncaught_exceptions_frame_limit_,
|
||||
stack_trace_for_uncaught_exceptions_options_);
|
||||
} else {
|
||||
int limit =
|
||||
stack_trace_limit > stack_trace_for_uncaught_exceptions_frame_limit_
|
||||
? -stack_trace_for_uncaught_exceptions_frame_limit_
|
||||
: stack_trace_limit;
|
||||
limit_or_stack_frame_infos = handle(Smi::FromInt(limit), this);
|
||||
}
|
||||
error_stack =
|
||||
factory()->NewErrorStackData(error_stack, limit_or_stack_frame_infos);
|
||||
}
|
||||
|
||||
RETURN_ON_EXCEPTION(
|
||||
this,
|
||||
JSObject::SetProperty(this, error_object, factory()->error_stack_symbol(),
|
||||
error_stack, StoreOrigin::kMaybeKeyed,
|
||||
Just(ShouldThrow::kThrowOnError)),
|
||||
JSObject);
|
||||
return error_object;
|
||||
}
|
||||
|
||||
Handle<FixedArray> Isolate::GetDetailedStackTrace(
|
||||
Handle<JSReceiver> error_object) {
|
||||
Handle<Name> key = factory()->detailed_stack_trace_symbol();
|
||||
Handle<Object> result = JSReceiver::GetDataProperty(error_object, key);
|
||||
if (result->IsFixedArray()) return Handle<FixedArray>::cast(result);
|
||||
return Handle<FixedArray>();
|
||||
Handle<Object> error_stack = JSReceiver::GetDataProperty(
|
||||
error_object, factory()->error_stack_symbol());
|
||||
if (!error_stack->IsErrorStackData()) {
|
||||
return Handle<FixedArray>();
|
||||
}
|
||||
Handle<ErrorStackData> error_stack_data =
|
||||
Handle<ErrorStackData>::cast(error_stack);
|
||||
ErrorStackData::EnsureStackFrameInfos(this, error_stack_data);
|
||||
if (!error_stack_data->limit_or_stack_frame_infos().IsFixedArray()) {
|
||||
return Handle<FixedArray>();
|
||||
}
|
||||
return handle(
|
||||
FixedArray::cast(error_stack_data->limit_or_stack_frame_infos()), this);
|
||||
}
|
||||
|
||||
Handle<FixedArray> Isolate::GetSimpleStackTrace(
|
||||
Handle<JSReceiver> error_object) {
|
||||
Handle<Name> key = factory()->stack_trace_symbol();
|
||||
Handle<Object> result = JSReceiver::GetDataProperty(error_object, key);
|
||||
if (result->IsFixedArray()) return Handle<FixedArray>::cast(result);
|
||||
return factory()->empty_fixed_array();
|
||||
Handle<Object> error_stack = JSReceiver::GetDataProperty(
|
||||
error_object, factory()->error_stack_symbol());
|
||||
if (error_stack->IsFixedArray()) {
|
||||
return Handle<FixedArray>::cast(error_stack);
|
||||
}
|
||||
if (!error_stack->IsErrorStackData()) {
|
||||
return factory()->empty_fixed_array();
|
||||
}
|
||||
Handle<ErrorStackData> error_stack_data =
|
||||
Handle<ErrorStackData>::cast(error_stack);
|
||||
if (!error_stack_data->HasCallSiteInfos()) {
|
||||
return factory()->empty_fixed_array();
|
||||
}
|
||||
return handle(error_stack_data->call_site_infos(), this);
|
||||
}
|
||||
|
||||
Address Isolate::GetAbstractPC(int* line, int* column) {
|
||||
@ -1457,7 +1503,7 @@ Object Isolate::StackOverflow() {
|
||||
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
||||
this, exception,
|
||||
ErrorUtils::Construct(this, fun, fun, msg, options, SKIP_NONE, no_caller,
|
||||
ErrorUtils::StackTraceCollection::kSimple));
|
||||
ErrorUtils::StackTraceCollection::kEnabled));
|
||||
JSObject::AddProperty(this, exception, factory()->wasm_uncatchable_symbol(),
|
||||
factory()->true_value(), NONE);
|
||||
|
||||
@ -2212,7 +2258,7 @@ Object Isolate::PromoteScheduledException() {
|
||||
|
||||
void Isolate::PrintCurrentStackTrace(std::ostream& out) {
|
||||
Handle<FixedArray> frames = CaptureSimpleStackTrace(
|
||||
FixedArray::kMaxLength, SKIP_NONE, factory()->undefined_value());
|
||||
this, FixedArray::kMaxLength, SKIP_NONE, factory()->undefined_value());
|
||||
|
||||
IncrementalStringBuilder builder(this);
|
||||
for (int i = 0; i < frames->length(); ++i) {
|
||||
@ -2282,15 +2328,17 @@ bool Isolate::ComputeLocationFromException(MessageLocation* target,
|
||||
|
||||
bool Isolate::ComputeLocationFromStackTrace(MessageLocation* target,
|
||||
Handle<Object> exception) {
|
||||
if (!exception->IsJSObject()) return false;
|
||||
Handle<Name> key = factory()->stack_trace_symbol();
|
||||
Handle<Object> property =
|
||||
JSReceiver::GetDataProperty(Handle<JSObject>::cast(exception), key);
|
||||
if (!property->IsFixedArray()) return false;
|
||||
Handle<FixedArray> stack = Handle<FixedArray>::cast(property);
|
||||
for (int i = 0; i < stack->length(); i++) {
|
||||
Handle<CallSiteInfo> frame(CallSiteInfo::cast(stack->get(i)), this);
|
||||
if (CallSiteInfo::ComputeLocation(frame, target)) return true;
|
||||
if (!exception->IsJSReceiver()) {
|
||||
return false;
|
||||
}
|
||||
Handle<FixedArray> call_site_infos =
|
||||
GetSimpleStackTrace(Handle<JSReceiver>::cast(exception));
|
||||
for (int i = 0; i < call_site_infos->length(); ++i) {
|
||||
Handle<CallSiteInfo> call_site_info(
|
||||
CallSiteInfo::cast(call_site_infos->get(i)), this);
|
||||
if (CallSiteInfo::ComputeLocation(call_site_info, target)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -900,13 +900,9 @@ class V8_EXPORT_PRIVATE Isolate final : private HiddenFactory {
|
||||
void* ptr5 = nullptr, void* ptr6 = nullptr);
|
||||
Handle<FixedArray> CaptureDetailedStackTrace(
|
||||
int limit, StackTrace::StackTraceOptions options);
|
||||
Handle<FixedArray> CaptureSimpleStackTrace(int limit, FrameSkipMode mode,
|
||||
Handle<Object> caller);
|
||||
MaybeHandle<JSReceiver> CaptureAndSetDetailedStackTrace(
|
||||
Handle<JSReceiver> error_object);
|
||||
MaybeHandle<JSReceiver> CaptureAndSetSimpleStackTrace(
|
||||
Handle<JSReceiver> error_object, FrameSkipMode mode,
|
||||
Handle<Object> caller);
|
||||
MaybeHandle<JSObject> CaptureAndSetErrorStack(Handle<JSObject> error_object,
|
||||
FrameSkipMode mode,
|
||||
Handle<Object> caller);
|
||||
Handle<FixedArray> GetDetailedStackTrace(Handle<JSReceiver> error_object);
|
||||
Handle<FixedArray> GetSimpleStackTrace(Handle<JSReceiver> error_object);
|
||||
|
||||
|
@ -499,7 +499,7 @@ MaybeHandle<JSObject> ErrorUtils::Construct(Isolate* isolate,
|
||||
|
||||
return ErrorUtils::Construct(isolate, target, new_target, message, options,
|
||||
mode, caller,
|
||||
ErrorUtils::StackTraceCollection::kDetailed);
|
||||
ErrorUtils::StackTraceCollection::kEnabled);
|
||||
}
|
||||
|
||||
MaybeHandle<JSObject> ErrorUtils::Construct(
|
||||
@ -575,16 +575,12 @@ MaybeHandle<JSObject> ErrorUtils::Construct(
|
||||
}
|
||||
|
||||
switch (stack_trace_collection) {
|
||||
case StackTraceCollection::kDetailed:
|
||||
RETURN_ON_EXCEPTION(
|
||||
isolate, isolate->CaptureAndSetDetailedStackTrace(err), JSObject);
|
||||
V8_FALLTHROUGH;
|
||||
case StackTraceCollection::kSimple:
|
||||
RETURN_ON_EXCEPTION(
|
||||
isolate, isolate->CaptureAndSetSimpleStackTrace(err, mode, caller),
|
||||
JSObject);
|
||||
case StackTraceCollection::kEnabled:
|
||||
RETURN_ON_EXCEPTION(isolate,
|
||||
isolate->CaptureAndSetErrorStack(err, mode, caller),
|
||||
JSObject);
|
||||
break;
|
||||
case StackTraceCollection::kNone:
|
||||
case StackTraceCollection::kDisabled:
|
||||
break;
|
||||
}
|
||||
return err;
|
||||
@ -710,7 +706,7 @@ Handle<JSObject> ErrorUtils::MakeGenericError(
|
||||
// The call below can't fail because constructor is a builtin.
|
||||
DCHECK(constructor->shared().HasBuiltinId());
|
||||
return ErrorUtils::Construct(isolate, constructor, constructor, msg, options,
|
||||
mode, no_caller, StackTraceCollection::kDetailed)
|
||||
mode, no_caller, StackTraceCollection::kEnabled)
|
||||
.ToHandleChecked();
|
||||
}
|
||||
|
||||
@ -994,5 +990,69 @@ Object ErrorUtils::ThrowLoadFromNullOrUndefined(Isolate* isolate,
|
||||
return ReadOnlyRoots(isolate).exception();
|
||||
}
|
||||
|
||||
// static
|
||||
MaybeHandle<Object> ErrorUtils::GetFormattedStack(
|
||||
Isolate* isolate, Handle<JSObject> error_object) {
|
||||
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.stack_trace"), __func__);
|
||||
|
||||
Handle<Object> error_stack = JSReceiver::GetDataProperty(
|
||||
error_object, isolate->factory()->error_stack_symbol());
|
||||
if (error_stack->IsErrorStackData()) {
|
||||
Handle<ErrorStackData> error_stack_data =
|
||||
Handle<ErrorStackData>::cast(error_stack);
|
||||
if (error_stack_data->HasFormattedStack()) {
|
||||
return handle(error_stack_data->formatted_stack(), isolate);
|
||||
}
|
||||
ErrorStackData::EnsureStackFrameInfos(isolate, error_stack_data);
|
||||
Handle<Object> formatted_stack;
|
||||
ASSIGN_RETURN_ON_EXCEPTION(
|
||||
isolate, formatted_stack,
|
||||
FormatStackTrace(isolate, error_object,
|
||||
handle(error_stack_data->call_site_infos(), isolate)),
|
||||
Object);
|
||||
error_stack_data->set_formatted_stack(*formatted_stack);
|
||||
return formatted_stack;
|
||||
}
|
||||
|
||||
if (error_stack->IsFixedArray()) {
|
||||
Handle<Object> formatted_stack;
|
||||
ASSIGN_RETURN_ON_EXCEPTION(
|
||||
isolate, formatted_stack,
|
||||
FormatStackTrace(isolate, error_object,
|
||||
Handle<FixedArray>::cast(error_stack)),
|
||||
Object);
|
||||
RETURN_ON_EXCEPTION(
|
||||
isolate,
|
||||
JSObject::SetProperty(isolate, error_object,
|
||||
isolate->factory()->error_stack_symbol(),
|
||||
formatted_stack, StoreOrigin::kMaybeKeyed,
|
||||
Just(ShouldThrow::kThrowOnError)),
|
||||
Object);
|
||||
return formatted_stack;
|
||||
}
|
||||
|
||||
return error_stack;
|
||||
}
|
||||
|
||||
// static
|
||||
void ErrorUtils::SetFormattedStack(Isolate* isolate,
|
||||
Handle<JSObject> error_object,
|
||||
Handle<Object> formatted_stack) {
|
||||
Handle<Object> error_stack = JSReceiver::GetDataProperty(
|
||||
error_object, isolate->factory()->error_stack_symbol());
|
||||
if (error_stack->IsErrorStackData()) {
|
||||
Handle<ErrorStackData> error_stack_data =
|
||||
Handle<ErrorStackData>::cast(error_stack);
|
||||
ErrorStackData::EnsureStackFrameInfos(isolate, error_stack_data);
|
||||
error_stack_data->set_formatted_stack(*formatted_stack);
|
||||
} else {
|
||||
JSObject::SetProperty(isolate, error_object,
|
||||
isolate->factory()->error_stack_symbol(),
|
||||
formatted_stack, StoreOrigin::kMaybeKeyed,
|
||||
Just(ShouldThrow::kThrowOnError))
|
||||
.Check();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
@ -72,9 +72,9 @@ enum FrameSkipMode {
|
||||
|
||||
class ErrorUtils : public AllStatic {
|
||||
public:
|
||||
// |kNone| is useful when you don't need the stack information at all, for
|
||||
// |kDisabled| is useful when you don't need the stack information at all, for
|
||||
// example when creating a deserialized error.
|
||||
enum class StackTraceCollection { kDetailed, kSimple, kNone };
|
||||
enum class StackTraceCollection { kEnabled, kDisabled };
|
||||
static MaybeHandle<JSObject> Construct(Isolate* isolate,
|
||||
Handle<JSFunction> target,
|
||||
Handle<Object> new_target,
|
||||
@ -112,6 +112,11 @@ class ErrorUtils : public AllStatic {
|
||||
static Object ThrowLoadFromNullOrUndefined(Isolate* isolate,
|
||||
Handle<Object> object,
|
||||
MaybeHandle<Object> key);
|
||||
|
||||
static MaybeHandle<Object> GetFormattedStack(Isolate* isolate,
|
||||
Handle<JSObject> error_object);
|
||||
static void SetFormattedStack(Isolate* isolate, Handle<JSObject> error_object,
|
||||
Handle<Object> formatted_stack);
|
||||
};
|
||||
|
||||
class MessageFormatter {
|
||||
|
@ -1367,6 +1367,19 @@ Handle<AccessorInfo> Factory::NewAccessorInfo() {
|
||||
return handle(info, isolate());
|
||||
}
|
||||
|
||||
Handle<ErrorStackData> Factory::NewErrorStackData(
|
||||
Handle<Object> call_site_infos_or_formatted_stack,
|
||||
Handle<Object> limit_or_stack_frame_infos) {
|
||||
ErrorStackData error_stack_data = NewStructInternal<ErrorStackData>(
|
||||
ERROR_STACK_DATA_TYPE, AllocationType::kYoung);
|
||||
DisallowGarbageCollection no_gc;
|
||||
error_stack_data.set_call_site_infos_or_formatted_stack(
|
||||
*call_site_infos_or_formatted_stack, SKIP_WRITE_BARRIER);
|
||||
error_stack_data.set_limit_or_stack_frame_infos(*limit_or_stack_frame_infos,
|
||||
SKIP_WRITE_BARRIER);
|
||||
return handle(error_stack_data, isolate());
|
||||
}
|
||||
|
||||
void Factory::AddToScriptList(Handle<Script> script) {
|
||||
Handle<WeakArrayList> scripts = script_list();
|
||||
scripts = WeakArrayList::Append(isolate(), scripts,
|
||||
@ -2139,7 +2152,7 @@ Handle<JSObject> Factory::NewError(Handle<JSFunction> constructor,
|
||||
Handle<Object> no_caller;
|
||||
return ErrorUtils::Construct(isolate(), constructor, constructor, message,
|
||||
undefined_value(), SKIP_NONE, no_caller,
|
||||
ErrorUtils::StackTraceCollection::kDetailed)
|
||||
ErrorUtils::StackTraceCollection::kEnabled)
|
||||
.ToHandleChecked();
|
||||
}
|
||||
|
||||
|
@ -391,6 +391,10 @@ class V8_EXPORT_PRIVATE Factory : public FactoryBase<Factory> {
|
||||
|
||||
Handle<AccessorInfo> NewAccessorInfo();
|
||||
|
||||
Handle<ErrorStackData> NewErrorStackData(
|
||||
Handle<Object> call_site_infos_or_formatted_stack,
|
||||
Handle<Object> limit_or_stack_frame_infos);
|
||||
|
||||
Handle<Script> CloneScript(Handle<Script> script);
|
||||
|
||||
Handle<BreakPointInfo> NewBreakPointInfo(int source_position);
|
||||
|
@ -426,10 +426,10 @@
|
||||
V(_, console_context_name_symbol) \
|
||||
V(_, class_fields_symbol) \
|
||||
V(_, class_positions_symbol) \
|
||||
V(_, detailed_stack_trace_symbol) \
|
||||
V(_, elements_transition_symbol) \
|
||||
V(_, error_end_pos_symbol) \
|
||||
V(_, error_script_symbol) \
|
||||
V(_, error_stack_symbol) \
|
||||
V(_, error_start_pos_symbol) \
|
||||
V(_, frozen_symbol) \
|
||||
V(_, interpreter_trampoline_symbol) \
|
||||
@ -446,7 +446,6 @@
|
||||
V(_, regexp_result_regexp_input_symbol) \
|
||||
V(_, regexp_result_regexp_last_index_symbol) \
|
||||
V(_, sealed_symbol) \
|
||||
V(_, stack_trace_symbol) \
|
||||
V(_, strict_function_transition_symbol) \
|
||||
V(_, wasm_exception_tag_symbol) \
|
||||
V(_, wasm_exception_values_symbol) \
|
||||
|
@ -9,6 +9,10 @@
|
||||
#include "src/objects/shared-function-info.h"
|
||||
#include "src/strings/string-builder-inl.h"
|
||||
|
||||
#if V8_ENABLE_WEBASSEMBLY
|
||||
#include "src/debug/debug-wasm-objects.h"
|
||||
#endif // V8_ENABLE_WEBASSEMBLY
|
||||
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
@ -278,6 +282,24 @@ Handle<PrimitiveHeapObject> CallSiteInfo::GetFunctionName(
|
||||
return isolate->factory()->null_value();
|
||||
}
|
||||
|
||||
// static
|
||||
Handle<String> CallSiteInfo::GetFunctionDebugName(Handle<CallSiteInfo> info) {
|
||||
Isolate* isolate = info->GetIsolate();
|
||||
#if V8_ENABLE_WEBASSEMBLY
|
||||
if (info->IsWasm()) {
|
||||
return GetWasmFunctionDebugName(isolate,
|
||||
handle(info->GetWasmInstance(), isolate),
|
||||
info->GetWasmFunctionIndex());
|
||||
}
|
||||
#endif // V8_ENABLE_WEBASSEMBLY
|
||||
Handle<JSFunction> function(JSFunction::cast(info->function()), isolate);
|
||||
Handle<String> name = JSFunction::GetDebugName(function);
|
||||
if (name->length() == 0 && info->IsEval()) {
|
||||
name = isolate->factory()->eval_string();
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
PrimitiveHeapObject InferMethodNameFromFastObject(Isolate* isolate,
|
||||
|
@ -36,6 +36,7 @@ class CallSiteInfo : public TorqueGeneratedCallSiteInfo<CallSiteInfo, Struct> {
|
||||
inline bool IsAsync() const;
|
||||
bool IsEval() const;
|
||||
bool IsUserJavaScript() const;
|
||||
bool IsSubjectToDebugging() const;
|
||||
bool IsMethodCall() const;
|
||||
bool IsToplevel() const;
|
||||
bool IsPromiseAll() const;
|
||||
@ -69,6 +70,7 @@ class CallSiteInfo : public TorqueGeneratedCallSiteInfo<CallSiteInfo, Struct> {
|
||||
static Handle<PrimitiveHeapObject> GetEvalOrigin(Handle<CallSiteInfo> info);
|
||||
V8_EXPORT_PRIVATE static Handle<PrimitiveHeapObject> GetFunctionName(
|
||||
Handle<CallSiteInfo> info);
|
||||
static Handle<String> GetFunctionDebugName(Handle<CallSiteInfo> info);
|
||||
static Handle<Object> GetMethodName(Handle<CallSiteInfo> info);
|
||||
static Handle<Object> GetTypeName(Handle<CallSiteInfo> info);
|
||||
|
||||
|
@ -68,6 +68,23 @@ BIT_FIELD_ACCESSORS(StackFrameInfo, flags, bytecode_offset_or_source_position,
|
||||
BIT_FIELD_ACCESSORS(StackFrameInfo, flags, is_constructor,
|
||||
StackFrameInfo::IsConstructorBit)
|
||||
|
||||
NEVER_READ_ONLY_SPACE_IMPL(ErrorStackData)
|
||||
TQ_OBJECT_CONSTRUCTORS_IMPL(ErrorStackData)
|
||||
|
||||
bool ErrorStackData::HasFormattedStack() const {
|
||||
return !call_site_infos_or_formatted_stack().IsFixedArray();
|
||||
}
|
||||
|
||||
ACCESSORS_RELAXED_CHECKED(ErrorStackData, formatted_stack, Object,
|
||||
kCallSiteInfosOrFormattedStackOffset,
|
||||
!limit_or_stack_frame_infos().IsSmi())
|
||||
|
||||
bool ErrorStackData::HasCallSiteInfos() const { return !HasFormattedStack(); }
|
||||
|
||||
ACCESSORS_RELAXED_CHECKED(ErrorStackData, call_site_infos, FixedArray,
|
||||
kCallSiteInfosOrFormattedStackOffset,
|
||||
!HasFormattedStack())
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "src/base/platform/mutex.h"
|
||||
#include "src/debug/debug-evaluate.h"
|
||||
#include "src/handles/handles-inl.h"
|
||||
#include "src/objects/call-site-info-inl.h"
|
||||
#include "src/objects/debug-objects-inl.h"
|
||||
#include "src/utils/ostreams.h"
|
||||
|
||||
@ -411,5 +412,50 @@ int StackFrameInfo::GetSourcePosition(Handle<StackFrameInfo> info) {
|
||||
return source_position;
|
||||
}
|
||||
|
||||
// static
|
||||
void ErrorStackData::EnsureStackFrameInfos(Isolate* isolate,
|
||||
Handle<ErrorStackData> error_stack) {
|
||||
if (!error_stack->limit_or_stack_frame_infos().IsSmi()) {
|
||||
return;
|
||||
}
|
||||
int limit = Smi::cast(error_stack->limit_or_stack_frame_infos()).value();
|
||||
Handle<FixedArray> call_site_infos(error_stack->call_site_infos(), isolate);
|
||||
Handle<FixedArray> stack_frame_infos =
|
||||
isolate->factory()->NewFixedArray(call_site_infos->length());
|
||||
int index = 0;
|
||||
for (int i = 0; i < call_site_infos->length(); ++i) {
|
||||
Handle<CallSiteInfo> call_site_info(
|
||||
CallSiteInfo::cast(call_site_infos->get(i)), isolate);
|
||||
if (call_site_info->IsAsync()) {
|
||||
break;
|
||||
}
|
||||
Handle<Script> script;
|
||||
if (!CallSiteInfo::GetScript(isolate, call_site_info).ToHandle(&script) ||
|
||||
!script->IsSubjectToDebugging()) {
|
||||
continue;
|
||||
}
|
||||
Handle<StackFrameInfo> stack_frame_info =
|
||||
isolate->factory()->NewStackFrameInfo(
|
||||
script, CallSiteInfo::GetSourcePosition(call_site_info),
|
||||
CallSiteInfo::GetFunctionDebugName(call_site_info),
|
||||
call_site_info->IsConstructor());
|
||||
stack_frame_infos->set(index++, *stack_frame_info);
|
||||
}
|
||||
stack_frame_infos =
|
||||
FixedArray::ShrinkOrEmpty(isolate, stack_frame_infos, index);
|
||||
if (limit < 0 && -limit < index) {
|
||||
// Negative limit encodes cap to be applied to |stack_frame_infos|.
|
||||
stack_frame_infos =
|
||||
FixedArray::ShrinkOrEmpty(isolate, stack_frame_infos, -limit);
|
||||
} else if (limit >= 0 && limit < call_site_infos->length()) {
|
||||
// Positive limit means we need to cap the |call_site_infos|
|
||||
// to that number before exposing them to the world.
|
||||
call_site_infos =
|
||||
FixedArray::ShrinkOrEmpty(isolate, call_site_infos, limit);
|
||||
error_stack->set_call_site_infos(*call_site_infos);
|
||||
}
|
||||
error_stack->set_limit_or_stack_frame_infos(*stack_frame_infos);
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
@ -231,6 +231,26 @@ class StackFrameInfo
|
||||
TQ_OBJECT_CONSTRUCTORS(StackFrameInfo)
|
||||
};
|
||||
|
||||
class ErrorStackData
|
||||
: public TorqueGeneratedErrorStackData<ErrorStackData, Struct> {
|
||||
public:
|
||||
NEVER_READ_ONLY_SPACE
|
||||
|
||||
inline bool HasFormattedStack() const;
|
||||
DECL_ACCESSORS(formatted_stack, Object)
|
||||
inline bool HasCallSiteInfos() const;
|
||||
DECL_ACCESSORS(call_site_infos, FixedArray)
|
||||
|
||||
static void EnsureStackFrameInfos(Isolate* isolate,
|
||||
Handle<ErrorStackData> error_stack);
|
||||
|
||||
DECL_VERIFIER(ErrorStackData)
|
||||
|
||||
using BodyDescriptor = StructBodyDescriptor;
|
||||
|
||||
TQ_OBJECT_CONSTRUCTORS(ErrorStackData)
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
||||
|
@ -84,3 +84,46 @@ extern class StackFrameInfo extends Struct {
|
||||
function_name: String;
|
||||
flags: SmiTagged<StackFrameInfoFlags>;
|
||||
}
|
||||
|
||||
// This struct is used by V8 as error_data_symbol on JSError
|
||||
// instances when the inspector asks V8 to keep (detailed)
|
||||
// stack traces in addition to the (simple) stack traces that
|
||||
// are collected by V8 for error.stack.
|
||||
//
|
||||
// This can have one of the following forms:
|
||||
//
|
||||
// (1) A pair of FixedArray<CallSiteInfo> and positive limit
|
||||
// if the stack information is not formatted yet and the
|
||||
// inspector did not yet request any information about the
|
||||
// error's stack trace. The positive limit specifies the cap
|
||||
// for the number of call sites exposed to error.stack.
|
||||
// (2) A pair of FixedArray<CallSiteInfo> and negative limit
|
||||
// is similar to the above, except that the limit should be
|
||||
// applied to the inspector StackFrameInfo list once computed
|
||||
// rather than the number of call sites exposed to error.stack.
|
||||
// (3) A FixedArray<CallSiteInfo> and FixedArray<StackFrameInfo>
|
||||
// pair indicates that the inspector already asked for the
|
||||
// detailed stack information, but the error.stack property
|
||||
// was not yet formatted. If any limit (negative or positive)
|
||||
// was stored in the second field before, it was applied to the
|
||||
// appropriate FixedArray now.
|
||||
// (4) A valid JavaScript object and FixedArray<StackFrameInfo>
|
||||
// once error.stack was accessed.
|
||||
//
|
||||
// Memorizing the limits is important to ensure that the fact that
|
||||
// the inspector is active doesn't influence the script execution
|
||||
// (i.e. the observable limit of call sites in error.stack is the
|
||||
// same independent of whether the inspector is active or not).
|
||||
extern class ErrorStackData extends Struct {
|
||||
// This holds either the FixedArray of CallSiteInfo instances or
|
||||
// the formatted stack value (usually a string) that's returned
|
||||
// from the error.stack property.
|
||||
call_site_infos_or_formatted_stack: FixedArray|JSAny;
|
||||
// This holds either the FixedArray of StackFrameInfo instances
|
||||
// for the inspector stack trace or a stack trace limit, which
|
||||
// if positive specifies how many of the CallSiteInfo instances
|
||||
// in the first field are to be revealed via error.stack or if
|
||||
// negative specifies the (negated) limit for the inspector
|
||||
// stack traces.
|
||||
limit_or_stack_frame_infos: Smi|FixedArray;
|
||||
}
|
||||
|
@ -144,6 +144,7 @@ namespace internal {
|
||||
V(_, CLASS_POSITIONS_TYPE, ClassPositions, class_positions) \
|
||||
V(_, DEBUG_INFO_TYPE, DebugInfo, debug_info) \
|
||||
V(_, ENUM_CACHE_TYPE, EnumCache, enum_cache) \
|
||||
V(_, ERROR_STACK_DATA_TYPE, ErrorStackData, error_stack_data) \
|
||||
V(_, FUNCTION_TEMPLATE_RARE_DATA_TYPE, FunctionTemplateRareData, \
|
||||
function_template_rare_data) \
|
||||
V(_, INTERCEPTOR_INFO_TYPE, InterceptorInfo, interceptor_info) \
|
||||
|
@ -427,7 +427,7 @@ namespace {
|
||||
|
||||
bool IsErrorObject(Isolate* isolate, Handle<Object> object) {
|
||||
if (!object->IsJSReceiver()) return false;
|
||||
Handle<Symbol> symbol = isolate->factory()->stack_trace_symbol();
|
||||
Handle<Symbol> symbol = isolate->factory()->error_stack_symbol();
|
||||
return JSReceiver::HasOwnProperty(Handle<JSReceiver>::cast(object), symbol)
|
||||
.FromMaybe(false);
|
||||
}
|
||||
@ -4812,6 +4812,17 @@ bool Script::GetPositionInfo(Handle<Script> script, int position,
|
||||
return script->GetPositionInfo(position, info, offset_flag);
|
||||
}
|
||||
|
||||
bool Script::IsSubjectToDebugging() const {
|
||||
switch (type()) {
|
||||
case TYPE_NORMAL:
|
||||
#if V8_ENABLE_WEBASSEMBLY
|
||||
case TYPE_WASM:
|
||||
#endif // V8_ENABLE_WEBASSEMBLY
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Script::IsUserJavaScript() const { return type() == Script::TYPE_NORMAL; }
|
||||
|
||||
#if V8_ENABLE_WEBASSEMBLY
|
||||
|
@ -191,6 +191,13 @@ class Script : public TorqueGeneratedScript<Script, Struct> {
|
||||
V8_EXPORT_PRIVATE bool GetPositionInfo(int position, PositionInfo* info,
|
||||
OffsetFlag offset_flag) const;
|
||||
|
||||
// Tells whether this script should be subject to debugging, e.g. for
|
||||
// - scope inspection
|
||||
// - internal break points
|
||||
// - coverage and type profile
|
||||
// - error stack trace
|
||||
bool IsSubjectToDebugging() const;
|
||||
|
||||
bool IsUserJavaScript() const;
|
||||
|
||||
// Wrappers for GetPositionInfo
|
||||
|
@ -1978,20 +1978,15 @@ MaybeHandle<Object> ValueDeserializer::ReadJSError() {
|
||||
}
|
||||
}
|
||||
|
||||
Handle<Object> error;
|
||||
Handle<JSObject> error;
|
||||
if (!ErrorUtils::Construct(isolate_, constructor, constructor, message,
|
||||
options, SKIP_NONE, no_caller,
|
||||
ErrorUtils::StackTraceCollection::kNone)
|
||||
ErrorUtils::StackTraceCollection::kDisabled)
|
||||
.ToHandle(&error)) {
|
||||
return MaybeHandle<Object>();
|
||||
}
|
||||
|
||||
if (Object::SetProperty(
|
||||
isolate_, error, isolate_->factory()->stack_trace_symbol(), stack,
|
||||
StoreOrigin::kMaybeKeyed, Just(ShouldThrow::kThrowOnError))
|
||||
.is_null()) {
|
||||
return MaybeHandle<Object>();
|
||||
}
|
||||
ErrorUtils::SetFormattedStack(isolate_, error, stack);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
@ -3558,12 +3558,8 @@ void DetailedErrorStackTraceTest(const char* src,
|
||||
CHECK(try_catch.HasCaught());
|
||||
Handle<Object> exception = v8::Utils::OpenHandle(*try_catch.Exception());
|
||||
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
Handle<Name> key = isolate->factory()->stack_trace_symbol();
|
||||
|
||||
Handle<FixedArray> stack_trace(Handle<FixedArray>::cast(
|
||||
Object::GetProperty(isolate, exception, key).ToHandleChecked()));
|
||||
test(stack_trace);
|
||||
test(CcTest::i_isolate()->GetSimpleStackTrace(
|
||||
Handle<JSReceiver>::cast(exception)));
|
||||
}
|
||||
|
||||
FixedArray ParametersOf(Handle<FixedArray> stack_trace, int frame_index) {
|
||||
@ -5211,7 +5207,7 @@ TEST(PreprocessStackTrace) {
|
||||
CHECK(try_catch.HasCaught());
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
Handle<Object> exception = v8::Utils::OpenHandle(*try_catch.Exception());
|
||||
Handle<Name> key = isolate->factory()->stack_trace_symbol();
|
||||
Handle<Name> key = isolate->factory()->error_stack_symbol();
|
||||
Handle<Object> stack_trace =
|
||||
Object::GetProperty(isolate, exception, key).ToHandleChecked();
|
||||
Handle<Object> code =
|
||||
|
@ -48,8 +48,7 @@ void CheckExceptionInfos(v8::internal::Isolate* isolate, Handle<Object> exc,
|
||||
|
||||
exc->Print();
|
||||
// Extract stack frame from the exception.
|
||||
auto stack = Handle<FixedArray>::cast(JSReceiver::GetDataProperty(
|
||||
Handle<JSObject>::cast(exc), isolate->factory()->stack_trace_symbol()));
|
||||
auto stack = isolate->GetSimpleStackTrace(Handle<JSObject>::cast(exc));
|
||||
CHECK_EQ(N, stack->length());
|
||||
|
||||
for (int i = 0; i < N; ++i) {
|
||||
|
420
test/inspector/runtime/error-stack-expected.txt
Normal file
420
test/inspector/runtime/error-stack-expected.txt
Normal file
@ -0,0 +1,420 @@
|
||||
Checks that error.stack works correctly
|
||||
|
||||
Running test: testErrorStackWithRuntimeDisabled
|
||||
{
|
||||
id : <messageId>
|
||||
result : {
|
||||
exceptionDetails : {
|
||||
columnNumber : 4
|
||||
exception : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo! at test.js:9:11 at recurse (test.js:4:10) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23)
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
exceptionId : <exceptionId>
|
||||
lineNumber : 8
|
||||
scriptId : <scriptId>
|
||||
text : Uncaught
|
||||
}
|
||||
result : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo! at test.js:9:11 at recurse (test.js:4:10) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23)
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Running test: testErrorStackWithRuntimeEnabled
|
||||
{
|
||||
id : <messageId>
|
||||
result : {
|
||||
exceptionDetails : {
|
||||
columnNumber : 4
|
||||
exception : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo! at test.js:9:11 at recurse (test.js:4:10) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23)
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
exceptionId : <exceptionId>
|
||||
lineNumber : 8
|
||||
scriptId : <scriptId>
|
||||
stackTrace : {
|
||||
callFrames : [
|
||||
[0] : {
|
||||
columnNumber : 10
|
||||
functionName :
|
||||
lineNumber : 8
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[1] : {
|
||||
columnNumber : 9
|
||||
functionName : recurse
|
||||
lineNumber : 3
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[2] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[3] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[4] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[5] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[6] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[7] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[8] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[9] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[10] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[11] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[12] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[13] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[14] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[15] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[16] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[17] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[18] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[19] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[20] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[21] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[22] : {
|
||||
columnNumber : 2
|
||||
functionName : foo
|
||||
lineNumber : 7
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[23] : {
|
||||
columnNumber : 0
|
||||
functionName :
|
||||
lineNumber : 0
|
||||
scriptId : <scriptId>
|
||||
url :
|
||||
}
|
||||
]
|
||||
}
|
||||
text : Uncaught
|
||||
}
|
||||
result : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo! at test.js:9:11 at recurse (test.js:4:10) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23)
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
id : <messageId>
|
||||
result : {
|
||||
exceptionDetails : {
|
||||
columnNumber : 4
|
||||
exception : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo! at test.js:9:11 at recurse (test.js:4:10) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23)
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
exceptionId : <exceptionId>
|
||||
lineNumber : 8
|
||||
scriptId : <scriptId>
|
||||
text : Uncaught
|
||||
}
|
||||
result : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo! at test.js:9:11 at recurse (test.js:4:10) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23)
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
id : <messageId>
|
||||
result : {
|
||||
exceptionDetails : {
|
||||
columnNumber : 4
|
||||
exception : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo! at test.js:9:11 at recurse (test.js:4:10) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23)
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
exceptionId : <exceptionId>
|
||||
lineNumber : 8
|
||||
scriptId : <scriptId>
|
||||
stackTrace : {
|
||||
callFrames : [
|
||||
[0] : {
|
||||
columnNumber : 10
|
||||
functionName :
|
||||
lineNumber : 8
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[1] : {
|
||||
columnNumber : 9
|
||||
functionName : recurse
|
||||
lineNumber : 3
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[2] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[3] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[4] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
]
|
||||
}
|
||||
text : Uncaught
|
||||
}
|
||||
result : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo! at test.js:9:11 at recurse (test.js:4:10) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23)
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
id : <messageId>
|
||||
result : {
|
||||
exceptionDetails : {
|
||||
columnNumber : 4
|
||||
exception : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo! at test.js:9:11 at recurse (test.js:4:10) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23)
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
exceptionId : <exceptionId>
|
||||
lineNumber : 8
|
||||
scriptId : <scriptId>
|
||||
stackTrace : {
|
||||
callFrames : [
|
||||
[0] : {
|
||||
columnNumber : 10
|
||||
functionName :
|
||||
lineNumber : 8
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[1] : {
|
||||
columnNumber : 9
|
||||
functionName : recurse
|
||||
lineNumber : 3
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[2] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[3] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[4] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[5] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[6] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[7] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[8] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[9] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
]
|
||||
}
|
||||
text : Uncaught
|
||||
}
|
||||
result : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo! at test.js:9:11 at recurse (test.js:4:10) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23)
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
}
|
||||
}
|
820
test/inspector/runtime/error-stack-trace-limit-expected.txt
Normal file
820
test/inspector/runtime/error-stack-trace-limit-expected.txt
Normal file
@ -0,0 +1,820 @@
|
||||
Checks that Error.stackTraceLimit works correctly
|
||||
|
||||
Running test: testErrorStackTraceLimitWithRuntimeDisabled
|
||||
{
|
||||
id : <messageId>
|
||||
result : {
|
||||
exceptionDetails : {
|
||||
columnNumber : 4
|
||||
exception : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo! at test.js:9:11 at recurse (test.js:4:10)
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
exceptionId : <exceptionId>
|
||||
lineNumber : 8
|
||||
scriptId : <scriptId>
|
||||
text : Uncaught
|
||||
}
|
||||
result : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo! at test.js:9:11 at recurse (test.js:4:10)
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Running test: testErrorStackTraceLimitWithRuntimeEnabled
|
||||
{
|
||||
id : <messageId>
|
||||
result : {
|
||||
exceptionDetails : {
|
||||
columnNumber : 4
|
||||
exception : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo! at test.js:9:11 at recurse (test.js:4:10)
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
exceptionId : <exceptionId>
|
||||
lineNumber : 8
|
||||
scriptId : <scriptId>
|
||||
stackTrace : {
|
||||
callFrames : [
|
||||
[0] : {
|
||||
columnNumber : 10
|
||||
functionName :
|
||||
lineNumber : 8
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[1] : {
|
||||
columnNumber : 9
|
||||
functionName : recurse
|
||||
lineNumber : 3
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[2] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[3] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[4] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[5] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[6] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[7] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[8] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[9] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[10] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[11] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[12] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[13] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[14] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[15] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[16] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[17] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[18] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[19] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[20] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[21] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[22] : {
|
||||
columnNumber : 2
|
||||
functionName : foo
|
||||
lineNumber : 7
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[23] : {
|
||||
columnNumber : 0
|
||||
functionName :
|
||||
lineNumber : 0
|
||||
scriptId : <scriptId>
|
||||
url :
|
||||
}
|
||||
]
|
||||
}
|
||||
text : Uncaught
|
||||
}
|
||||
result : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo! at test.js:9:11 at recurse (test.js:4:10)
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
id : <messageId>
|
||||
result : {
|
||||
exceptionDetails : {
|
||||
columnNumber : 4
|
||||
exception : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo!
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
exceptionId : <exceptionId>
|
||||
lineNumber : 8
|
||||
scriptId : <scriptId>
|
||||
text : Uncaught
|
||||
}
|
||||
result : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo!
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
id : <messageId>
|
||||
result : {
|
||||
exceptionDetails : {
|
||||
columnNumber : 4
|
||||
exception : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo! at test.js:9:11 at recurse (test.js:4:10) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23)
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
exceptionId : <exceptionId>
|
||||
lineNumber : 8
|
||||
scriptId : <scriptId>
|
||||
stackTrace : {
|
||||
callFrames : [
|
||||
[0] : {
|
||||
columnNumber : 10
|
||||
functionName :
|
||||
lineNumber : 8
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[1] : {
|
||||
columnNumber : 9
|
||||
functionName : recurse
|
||||
lineNumber : 3
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[2] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[3] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[4] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
]
|
||||
}
|
||||
text : Uncaught
|
||||
}
|
||||
result : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo! at test.js:9:11 at recurse (test.js:4:10) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23)
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
id : <messageId>
|
||||
result : {
|
||||
exceptionDetails : {
|
||||
columnNumber : 4
|
||||
exception : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo! at test.js:9:11 at recurse (test.js:4:10) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23)
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
exceptionId : <exceptionId>
|
||||
lineNumber : 8
|
||||
scriptId : <scriptId>
|
||||
stackTrace : {
|
||||
callFrames : [
|
||||
[0] : {
|
||||
columnNumber : 10
|
||||
functionName :
|
||||
lineNumber : 8
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[1] : {
|
||||
columnNumber : 9
|
||||
functionName : recurse
|
||||
lineNumber : 3
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[2] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[3] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[4] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[5] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[6] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[7] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[8] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[9] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
]
|
||||
}
|
||||
text : Uncaught
|
||||
}
|
||||
result : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo! at test.js:9:11 at recurse (test.js:4:10) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23) at recurse (test.js:3:23)
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Running test: testErrorStackTraceLimitNonNumber
|
||||
{
|
||||
id : <messageId>
|
||||
result : {
|
||||
exceptionDetails : {
|
||||
columnNumber : 4
|
||||
exception : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo!
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
exceptionId : <exceptionId>
|
||||
lineNumber : 8
|
||||
scriptId : <scriptId>
|
||||
stackTrace : {
|
||||
callFrames : [
|
||||
[0] : {
|
||||
columnNumber : 10
|
||||
functionName :
|
||||
lineNumber : 8
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[1] : {
|
||||
columnNumber : 9
|
||||
functionName : recurse
|
||||
lineNumber : 3
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[2] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[3] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[4] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[5] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[6] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[7] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[8] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[9] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[10] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[11] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[12] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[13] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[14] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[15] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[16] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[17] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[18] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[19] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[20] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[21] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[22] : {
|
||||
columnNumber : 2
|
||||
functionName : foo
|
||||
lineNumber : 7
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[23] : {
|
||||
columnNumber : 0
|
||||
functionName :
|
||||
lineNumber : 0
|
||||
scriptId : <scriptId>
|
||||
url :
|
||||
}
|
||||
]
|
||||
}
|
||||
text : Uncaught
|
||||
}
|
||||
result : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo!
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Running test: testErrorStackTraceLimitDeleted
|
||||
{
|
||||
id : <messageId>
|
||||
result : {
|
||||
exceptionDetails : {
|
||||
columnNumber : 4
|
||||
exception : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo!
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
exceptionId : <exceptionId>
|
||||
lineNumber : 8
|
||||
scriptId : <scriptId>
|
||||
stackTrace : {
|
||||
callFrames : [
|
||||
[0] : {
|
||||
columnNumber : 10
|
||||
functionName :
|
||||
lineNumber : 8
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[1] : {
|
||||
columnNumber : 9
|
||||
functionName : recurse
|
||||
lineNumber : 3
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[2] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[3] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[4] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[5] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[6] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[7] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[8] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[9] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[10] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[11] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[12] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[13] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[14] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[15] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[16] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[17] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[18] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[19] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[20] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[21] : {
|
||||
columnNumber : 22
|
||||
functionName : recurse
|
||||
lineNumber : 2
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[22] : {
|
||||
columnNumber : 2
|
||||
functionName : foo
|
||||
lineNumber : 7
|
||||
scriptId : <scriptId>
|
||||
url : test.js
|
||||
}
|
||||
[23] : {
|
||||
columnNumber : 0
|
||||
functionName :
|
||||
lineNumber : 0
|
||||
scriptId : <scriptId>
|
||||
url :
|
||||
}
|
||||
]
|
||||
}
|
||||
text : Uncaught
|
||||
}
|
||||
result : {
|
||||
className : Error
|
||||
description : Error: Thrown from foo!
|
||||
objectId : <objectId>
|
||||
subtype : error
|
||||
type : object
|
||||
}
|
||||
}
|
||||
}
|
61
test/inspector/runtime/error-stack-trace-limit.js
Normal file
61
test/inspector/runtime/error-stack-trace-limit.js
Normal file
@ -0,0 +1,61 @@
|
||||
// Copyright 2022 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
const {session, contextGroup, Protocol} =
|
||||
InspectorTest.start('Checks that Error.stackTraceLimit works correctly');
|
||||
|
||||
contextGroup.addScript(`
|
||||
function recurse(f, n) {
|
||||
if (n-- > 0) return recurse(f, n);
|
||||
return f();
|
||||
}
|
||||
|
||||
function foo() {
|
||||
recurse(() => {
|
||||
throw new Error('Thrown from foo!');
|
||||
}, 20);
|
||||
}
|
||||
//# sourceURL=test.js
|
||||
`);
|
||||
|
||||
InspectorTest.runAsyncTestSuite([
|
||||
async function testErrorStackTraceLimitWithRuntimeDisabled() {
|
||||
await Protocol.Runtime.evaluate({expression: 'Error.stackTraceLimit = 2'});
|
||||
InspectorTest.logMessage(
|
||||
await Protocol.Runtime.evaluate({expression: 'foo()'}));
|
||||
},
|
||||
|
||||
async function testErrorStackTraceLimitWithRuntimeEnabled() {
|
||||
await Protocol.Runtime.enable();
|
||||
await Protocol.Runtime.evaluate({expression: 'Error.stackTraceLimit = 2'});
|
||||
InspectorTest.logMessage(
|
||||
await Protocol.Runtime.evaluate({expression: 'foo()'}));
|
||||
for (let size = 0; size <= 10; size += 5) {
|
||||
await Protocol.Runtime.evaluate(
|
||||
{expression: `Error.stackTraceLimit = ${size}`});
|
||||
await Protocol.Runtime.setMaxCallStackSizeToCapture({size});
|
||||
InspectorTest.logMessage(
|
||||
await Protocol.Runtime.evaluate({expression: 'foo()'}));
|
||||
}
|
||||
await Protocol.Runtime.disable();
|
||||
},
|
||||
|
||||
async function testErrorStackTraceLimitNonNumber() {
|
||||
await Protocol.Runtime.enable();
|
||||
await Protocol.Runtime.evaluate(
|
||||
{expression: 'Error.stackTraceLimit = "Invalid"'});
|
||||
InspectorTest.logMessage(
|
||||
await Protocol.Runtime.evaluate({expression: 'foo()'}));
|
||||
await Protocol.Runtime.disable();
|
||||
},
|
||||
|
||||
async function testErrorStackTraceLimitDeleted() {
|
||||
await Protocol.Runtime.enable();
|
||||
await Protocol.Runtime.evaluate(
|
||||
{expression: 'delete Error.stackTraceLimit'});
|
||||
InspectorTest.logMessage(
|
||||
await Protocol.Runtime.evaluate({expression: 'foo()'}));
|
||||
await Protocol.Runtime.disable();
|
||||
}
|
||||
]);
|
39
test/inspector/runtime/error-stack.js
Normal file
39
test/inspector/runtime/error-stack.js
Normal file
@ -0,0 +1,39 @@
|
||||
// Copyright 2022 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
const {session, contextGroup, Protocol} =
|
||||
InspectorTest.start('Checks that error.stack works correctly');
|
||||
|
||||
contextGroup.addScript(`
|
||||
function recurse(f, n) {
|
||||
if (n-- > 0) return recurse(f, n);
|
||||
return f();
|
||||
}
|
||||
|
||||
function foo() {
|
||||
recurse(() => {
|
||||
throw new Error('Thrown from foo!');
|
||||
}, 20);
|
||||
}
|
||||
//# sourceURL=test.js
|
||||
`);
|
||||
|
||||
InspectorTest.runAsyncTestSuite([
|
||||
async function testErrorStackWithRuntimeDisabled() {
|
||||
InspectorTest.logMessage(
|
||||
await Protocol.Runtime.evaluate({expression: 'foo()'}));
|
||||
},
|
||||
|
||||
async function testErrorStackWithRuntimeEnabled() {
|
||||
await Protocol.Runtime.enable();
|
||||
InspectorTest.logMessage(
|
||||
await Protocol.Runtime.evaluate({expression: 'foo()'}));
|
||||
for (let size = 0; size <= 10; size += 5) {
|
||||
await Protocol.Runtime.setMaxCallStackSizeToCapture({size});
|
||||
InspectorTest.logMessage(
|
||||
await Protocol.Runtime.evaluate({expression: 'foo()'}));
|
||||
}
|
||||
await Protocol.Runtime.disable();
|
||||
},
|
||||
]);
|
@ -59,52 +59,52 @@ INSTANCE_TYPES = {
|
||||
155: "CLASS_POSITIONS_TYPE",
|
||||
156: "DEBUG_INFO_TYPE",
|
||||
157: "ENUM_CACHE_TYPE",
|
||||
158: "FEEDBACK_CELL_TYPE",
|
||||
159: "FUNCTION_TEMPLATE_RARE_DATA_TYPE",
|
||||
160: "INTERCEPTOR_INFO_TYPE",
|
||||
161: "INTERPRETER_DATA_TYPE",
|
||||
162: "MODULE_REQUEST_TYPE",
|
||||
163: "PROMISE_CAPABILITY_TYPE",
|
||||
164: "PROMISE_REACTION_TYPE",
|
||||
165: "PROPERTY_DESCRIPTOR_OBJECT_TYPE",
|
||||
166: "PROTOTYPE_INFO_TYPE",
|
||||
167: "REG_EXP_BOILERPLATE_DESCRIPTION_TYPE",
|
||||
168: "SCRIPT_TYPE",
|
||||
169: "SCRIPT_OR_MODULE_TYPE",
|
||||
170: "SOURCE_TEXT_MODULE_INFO_ENTRY_TYPE",
|
||||
171: "STACK_FRAME_INFO_TYPE",
|
||||
172: "TEMPLATE_OBJECT_DESCRIPTION_TYPE",
|
||||
173: "TUPLE2_TYPE",
|
||||
174: "WASM_CONTINUATION_OBJECT_TYPE",
|
||||
175: "WASM_EXCEPTION_TAG_TYPE",
|
||||
176: "WASM_INDIRECT_FUNCTION_TABLE_TYPE",
|
||||
177: "FIXED_ARRAY_TYPE",
|
||||
178: "HASH_TABLE_TYPE",
|
||||
179: "EPHEMERON_HASH_TABLE_TYPE",
|
||||
180: "GLOBAL_DICTIONARY_TYPE",
|
||||
181: "NAME_DICTIONARY_TYPE",
|
||||
182: "NUMBER_DICTIONARY_TYPE",
|
||||
183: "ORDERED_HASH_MAP_TYPE",
|
||||
184: "ORDERED_HASH_SET_TYPE",
|
||||
185: "ORDERED_NAME_DICTIONARY_TYPE",
|
||||
186: "SIMPLE_NUMBER_DICTIONARY_TYPE",
|
||||
187: "CLOSURE_FEEDBACK_CELL_ARRAY_TYPE",
|
||||
188: "OBJECT_BOILERPLATE_DESCRIPTION_TYPE",
|
||||
189: "SCRIPT_CONTEXT_TABLE_TYPE",
|
||||
190: "BYTE_ARRAY_TYPE",
|
||||
191: "BYTECODE_ARRAY_TYPE",
|
||||
192: "FIXED_DOUBLE_ARRAY_TYPE",
|
||||
193: "INTERNAL_CLASS_WITH_SMI_ELEMENTS_TYPE",
|
||||
194: "SLOPPY_ARGUMENTS_ELEMENTS_TYPE",
|
||||
195: "TURBOFAN_BITSET_TYPE_TYPE",
|
||||
196: "TURBOFAN_HEAP_CONSTANT_TYPE_TYPE",
|
||||
197: "TURBOFAN_OTHER_NUMBER_CONSTANT_TYPE_TYPE",
|
||||
198: "TURBOFAN_RANGE_TYPE_TYPE",
|
||||
199: "TURBOFAN_UNION_TYPE_TYPE",
|
||||
200: "UNCOMPILED_DATA_WITH_PREPARSE_DATA_TYPE",
|
||||
201: "UNCOMPILED_DATA_WITH_PREPARSE_DATA_AND_JOB_TYPE",
|
||||
202: "UNCOMPILED_DATA_WITHOUT_PREPARSE_DATA_TYPE",
|
||||
203: "UNCOMPILED_DATA_WITHOUT_PREPARSE_DATA_WITH_JOB_TYPE",
|
||||
158: "ERROR_STACK_DATA_TYPE",
|
||||
159: "FEEDBACK_CELL_TYPE",
|
||||
160: "FUNCTION_TEMPLATE_RARE_DATA_TYPE",
|
||||
161: "INTERCEPTOR_INFO_TYPE",
|
||||
162: "INTERPRETER_DATA_TYPE",
|
||||
163: "MODULE_REQUEST_TYPE",
|
||||
164: "PROMISE_CAPABILITY_TYPE",
|
||||
165: "PROMISE_REACTION_TYPE",
|
||||
166: "PROPERTY_DESCRIPTOR_OBJECT_TYPE",
|
||||
167: "PROTOTYPE_INFO_TYPE",
|
||||
168: "REG_EXP_BOILERPLATE_DESCRIPTION_TYPE",
|
||||
169: "SCRIPT_TYPE",
|
||||
170: "SCRIPT_OR_MODULE_TYPE",
|
||||
171: "SOURCE_TEXT_MODULE_INFO_ENTRY_TYPE",
|
||||
172: "STACK_FRAME_INFO_TYPE",
|
||||
173: "TEMPLATE_OBJECT_DESCRIPTION_TYPE",
|
||||
174: "TUPLE2_TYPE",
|
||||
175: "WASM_CONTINUATION_OBJECT_TYPE",
|
||||
176: "WASM_EXCEPTION_TAG_TYPE",
|
||||
177: "WASM_INDIRECT_FUNCTION_TABLE_TYPE",
|
||||
178: "FIXED_ARRAY_TYPE",
|
||||
179: "HASH_TABLE_TYPE",
|
||||
180: "EPHEMERON_HASH_TABLE_TYPE",
|
||||
181: "GLOBAL_DICTIONARY_TYPE",
|
||||
182: "NAME_DICTIONARY_TYPE",
|
||||
183: "NUMBER_DICTIONARY_TYPE",
|
||||
184: "ORDERED_HASH_MAP_TYPE",
|
||||
185: "ORDERED_HASH_SET_TYPE",
|
||||
186: "ORDERED_NAME_DICTIONARY_TYPE",
|
||||
187: "SIMPLE_NUMBER_DICTIONARY_TYPE",
|
||||
188: "CLOSURE_FEEDBACK_CELL_ARRAY_TYPE",
|
||||
189: "OBJECT_BOILERPLATE_DESCRIPTION_TYPE",
|
||||
190: "SCRIPT_CONTEXT_TABLE_TYPE",
|
||||
191: "BYTE_ARRAY_TYPE",
|
||||
192: "BYTECODE_ARRAY_TYPE",
|
||||
193: "FIXED_DOUBLE_ARRAY_TYPE",
|
||||
194: "INTERNAL_CLASS_WITH_SMI_ELEMENTS_TYPE",
|
||||
195: "SLOPPY_ARGUMENTS_ELEMENTS_TYPE",
|
||||
196: "TURBOFAN_BITSET_TYPE_TYPE",
|
||||
197: "TURBOFAN_HEAP_CONSTANT_TYPE_TYPE",
|
||||
198: "TURBOFAN_OTHER_NUMBER_CONSTANT_TYPE_TYPE",
|
||||
199: "TURBOFAN_RANGE_TYPE_TYPE",
|
||||
200: "TURBOFAN_UNION_TYPE_TYPE",
|
||||
201: "EXPORTED_SUB_CLASS_BASE_TYPE",
|
||||
202: "EXPORTED_SUB_CLASS_TYPE",
|
||||
203: "EXPORTED_SUB_CLASS2_TYPE",
|
||||
204: "FOREIGN_TYPE",
|
||||
205: "WASM_INTERNAL_FUNCTION_TYPE",
|
||||
206: "WASM_TYPE_INFO_TYPE",
|
||||
@ -118,57 +118,58 @@ INSTANCE_TYPES = {
|
||||
214: "NATIVE_CONTEXT_TYPE",
|
||||
215: "SCRIPT_CONTEXT_TYPE",
|
||||
216: "WITH_CONTEXT_TYPE",
|
||||
217: "WASM_FUNCTION_DATA_TYPE",
|
||||
218: "WASM_CAPI_FUNCTION_DATA_TYPE",
|
||||
219: "WASM_EXPORTED_FUNCTION_DATA_TYPE",
|
||||
220: "WASM_JS_FUNCTION_DATA_TYPE",
|
||||
221: "EXPORTED_SUB_CLASS_BASE_TYPE",
|
||||
222: "EXPORTED_SUB_CLASS_TYPE",
|
||||
223: "EXPORTED_SUB_CLASS2_TYPE",
|
||||
224: "SMALL_ORDERED_HASH_MAP_TYPE",
|
||||
225: "SMALL_ORDERED_HASH_SET_TYPE",
|
||||
226: "SMALL_ORDERED_NAME_DICTIONARY_TYPE",
|
||||
227: "ABSTRACT_INTERNAL_CLASS_SUBCLASS1_TYPE",
|
||||
228: "ABSTRACT_INTERNAL_CLASS_SUBCLASS2_TYPE",
|
||||
229: "DESCRIPTOR_ARRAY_TYPE",
|
||||
230: "STRONG_DESCRIPTOR_ARRAY_TYPE",
|
||||
231: "SOURCE_TEXT_MODULE_TYPE",
|
||||
232: "SYNTHETIC_MODULE_TYPE",
|
||||
233: "WEAK_FIXED_ARRAY_TYPE",
|
||||
234: "TRANSITION_ARRAY_TYPE",
|
||||
235: "CELL_TYPE",
|
||||
236: "CODE_TYPE",
|
||||
237: "CODE_DATA_CONTAINER_TYPE",
|
||||
238: "COVERAGE_INFO_TYPE",
|
||||
239: "EMBEDDER_DATA_ARRAY_TYPE",
|
||||
240: "FEEDBACK_METADATA_TYPE",
|
||||
241: "FEEDBACK_VECTOR_TYPE",
|
||||
242: "FILLER_TYPE",
|
||||
243: "FREE_SPACE_TYPE",
|
||||
244: "INTERNAL_CLASS_TYPE",
|
||||
245: "INTERNAL_CLASS_WITH_STRUCT_ELEMENTS_TYPE",
|
||||
246: "MAP_TYPE",
|
||||
247: "MEGA_DOM_HANDLER_TYPE",
|
||||
248: "ON_HEAP_BASIC_BLOCK_PROFILER_DATA_TYPE",
|
||||
249: "PREPARSE_DATA_TYPE",
|
||||
250: "PROPERTY_ARRAY_TYPE",
|
||||
251: "PROPERTY_CELL_TYPE",
|
||||
252: "SCOPE_INFO_TYPE",
|
||||
253: "SHARED_FUNCTION_INFO_TYPE",
|
||||
254: "SMI_BOX_TYPE",
|
||||
255: "SMI_PAIR_TYPE",
|
||||
256: "SORT_STATE_TYPE",
|
||||
257: "SWISS_NAME_DICTIONARY_TYPE",
|
||||
258: "WASM_API_FUNCTION_REF_TYPE",
|
||||
259: "WEAK_ARRAY_LIST_TYPE",
|
||||
260: "WEAK_CELL_TYPE",
|
||||
261: "WASM_ARRAY_TYPE",
|
||||
262: "WASM_STRUCT_TYPE",
|
||||
263: "JS_PROXY_TYPE",
|
||||
217: "UNCOMPILED_DATA_WITH_PREPARSE_DATA_TYPE",
|
||||
218: "UNCOMPILED_DATA_WITH_PREPARSE_DATA_AND_JOB_TYPE",
|
||||
219: "UNCOMPILED_DATA_WITHOUT_PREPARSE_DATA_TYPE",
|
||||
220: "UNCOMPILED_DATA_WITHOUT_PREPARSE_DATA_WITH_JOB_TYPE",
|
||||
221: "WASM_FUNCTION_DATA_TYPE",
|
||||
222: "WASM_CAPI_FUNCTION_DATA_TYPE",
|
||||
223: "WASM_EXPORTED_FUNCTION_DATA_TYPE",
|
||||
224: "WASM_JS_FUNCTION_DATA_TYPE",
|
||||
225: "SMALL_ORDERED_HASH_MAP_TYPE",
|
||||
226: "SMALL_ORDERED_HASH_SET_TYPE",
|
||||
227: "SMALL_ORDERED_NAME_DICTIONARY_TYPE",
|
||||
228: "ABSTRACT_INTERNAL_CLASS_SUBCLASS1_TYPE",
|
||||
229: "ABSTRACT_INTERNAL_CLASS_SUBCLASS2_TYPE",
|
||||
230: "DESCRIPTOR_ARRAY_TYPE",
|
||||
231: "STRONG_DESCRIPTOR_ARRAY_TYPE",
|
||||
232: "SOURCE_TEXT_MODULE_TYPE",
|
||||
233: "SYNTHETIC_MODULE_TYPE",
|
||||
234: "WEAK_FIXED_ARRAY_TYPE",
|
||||
235: "TRANSITION_ARRAY_TYPE",
|
||||
236: "CELL_TYPE",
|
||||
237: "CODE_TYPE",
|
||||
238: "CODE_DATA_CONTAINER_TYPE",
|
||||
239: "COVERAGE_INFO_TYPE",
|
||||
240: "EMBEDDER_DATA_ARRAY_TYPE",
|
||||
241: "FEEDBACK_METADATA_TYPE",
|
||||
242: "FEEDBACK_VECTOR_TYPE",
|
||||
243: "FILLER_TYPE",
|
||||
244: "FREE_SPACE_TYPE",
|
||||
245: "INTERNAL_CLASS_TYPE",
|
||||
246: "INTERNAL_CLASS_WITH_STRUCT_ELEMENTS_TYPE",
|
||||
247: "MAP_TYPE",
|
||||
248: "MEGA_DOM_HANDLER_TYPE",
|
||||
249: "ON_HEAP_BASIC_BLOCK_PROFILER_DATA_TYPE",
|
||||
250: "PREPARSE_DATA_TYPE",
|
||||
251: "PROPERTY_ARRAY_TYPE",
|
||||
252: "PROPERTY_CELL_TYPE",
|
||||
253: "SCOPE_INFO_TYPE",
|
||||
254: "SHARED_FUNCTION_INFO_TYPE",
|
||||
255: "SMI_BOX_TYPE",
|
||||
256: "SMI_PAIR_TYPE",
|
||||
257: "SORT_STATE_TYPE",
|
||||
258: "SWISS_NAME_DICTIONARY_TYPE",
|
||||
259: "WASM_API_FUNCTION_REF_TYPE",
|
||||
260: "WEAK_ARRAY_LIST_TYPE",
|
||||
261: "WEAK_CELL_TYPE",
|
||||
262: "WASM_ARRAY_TYPE",
|
||||
263: "WASM_STRUCT_TYPE",
|
||||
264: "JS_PROXY_TYPE",
|
||||
1057: "JS_OBJECT_TYPE",
|
||||
264: "JS_GLOBAL_OBJECT_TYPE",
|
||||
265: "JS_GLOBAL_PROXY_TYPE",
|
||||
266: "JS_MODULE_NAMESPACE_TYPE",
|
||||
265: "JS_GLOBAL_OBJECT_TYPE",
|
||||
266: "JS_GLOBAL_PROXY_TYPE",
|
||||
267: "JS_MODULE_NAMESPACE_TYPE",
|
||||
1040: "JS_SPECIAL_API_OBJECT_TYPE",
|
||||
1041: "JS_PRIMITIVE_WRAPPER_TYPE",
|
||||
1058: "JS_API_OBJECT_TYPE",
|
||||
@ -263,83 +264,83 @@ INSTANCE_TYPES = {
|
||||
|
||||
# List of known V8 maps.
|
||||
KNOWN_MAPS = {
|
||||
("read_only_space", 0x02131): (246, "MetaMap"),
|
||||
("read_only_space", 0x02131): (247, "MetaMap"),
|
||||
("read_only_space", 0x02159): (131, "NullMap"),
|
||||
("read_only_space", 0x02181): (230, "StrongDescriptorArrayMap"),
|
||||
("read_only_space", 0x021a9): (259, "WeakArrayListMap"),
|
||||
("read_only_space", 0x02181): (231, "StrongDescriptorArrayMap"),
|
||||
("read_only_space", 0x021a9): (260, "WeakArrayListMap"),
|
||||
("read_only_space", 0x021ed): (157, "EnumCacheMap"),
|
||||
("read_only_space", 0x02221): (177, "FixedArrayMap"),
|
||||
("read_only_space", 0x02221): (178, "FixedArrayMap"),
|
||||
("read_only_space", 0x0226d): (8, "OneByteInternalizedStringMap"),
|
||||
("read_only_space", 0x022b9): (243, "FreeSpaceMap"),
|
||||
("read_only_space", 0x022e1): (242, "OnePointerFillerMap"),
|
||||
("read_only_space", 0x02309): (242, "TwoPointerFillerMap"),
|
||||
("read_only_space", 0x022b9): (244, "FreeSpaceMap"),
|
||||
("read_only_space", 0x022e1): (243, "OnePointerFillerMap"),
|
||||
("read_only_space", 0x02309): (243, "TwoPointerFillerMap"),
|
||||
("read_only_space", 0x02331): (131, "UninitializedMap"),
|
||||
("read_only_space", 0x023a9): (131, "UndefinedMap"),
|
||||
("read_only_space", 0x023ed): (130, "HeapNumberMap"),
|
||||
("read_only_space", 0x02421): (131, "TheHoleMap"),
|
||||
("read_only_space", 0x02481): (131, "BooleanMap"),
|
||||
("read_only_space", 0x02525): (190, "ByteArrayMap"),
|
||||
("read_only_space", 0x0254d): (177, "FixedCOWArrayMap"),
|
||||
("read_only_space", 0x02575): (178, "HashTableMap"),
|
||||
("read_only_space", 0x02525): (191, "ByteArrayMap"),
|
||||
("read_only_space", 0x0254d): (178, "FixedCOWArrayMap"),
|
||||
("read_only_space", 0x02575): (179, "HashTableMap"),
|
||||
("read_only_space", 0x0259d): (128, "SymbolMap"),
|
||||
("read_only_space", 0x025c5): (40, "OneByteStringMap"),
|
||||
("read_only_space", 0x025ed): (252, "ScopeInfoMap"),
|
||||
("read_only_space", 0x02615): (253, "SharedFunctionInfoMap"),
|
||||
("read_only_space", 0x0263d): (236, "CodeMap"),
|
||||
("read_only_space", 0x02665): (235, "CellMap"),
|
||||
("read_only_space", 0x0268d): (251, "GlobalPropertyCellMap"),
|
||||
("read_only_space", 0x025ed): (253, "ScopeInfoMap"),
|
||||
("read_only_space", 0x02615): (254, "SharedFunctionInfoMap"),
|
||||
("read_only_space", 0x0263d): (237, "CodeMap"),
|
||||
("read_only_space", 0x02665): (236, "CellMap"),
|
||||
("read_only_space", 0x0268d): (252, "GlobalPropertyCellMap"),
|
||||
("read_only_space", 0x026b5): (204, "ForeignMap"),
|
||||
("read_only_space", 0x026dd): (234, "TransitionArrayMap"),
|
||||
("read_only_space", 0x026dd): (235, "TransitionArrayMap"),
|
||||
("read_only_space", 0x02705): (45, "ThinOneByteStringMap"),
|
||||
("read_only_space", 0x0272d): (241, "FeedbackVectorMap"),
|
||||
("read_only_space", 0x0272d): (242, "FeedbackVectorMap"),
|
||||
("read_only_space", 0x02765): (131, "ArgumentsMarkerMap"),
|
||||
("read_only_space", 0x027c5): (131, "ExceptionMap"),
|
||||
("read_only_space", 0x02821): (131, "TerminationExceptionMap"),
|
||||
("read_only_space", 0x02889): (131, "OptimizedOutMap"),
|
||||
("read_only_space", 0x028e9): (131, "StaleRegisterMap"),
|
||||
("read_only_space", 0x02949): (189, "ScriptContextTableMap"),
|
||||
("read_only_space", 0x02971): (187, "ClosureFeedbackCellArrayMap"),
|
||||
("read_only_space", 0x02999): (240, "FeedbackMetadataArrayMap"),
|
||||
("read_only_space", 0x029c1): (177, "ArrayListMap"),
|
||||
("read_only_space", 0x02949): (190, "ScriptContextTableMap"),
|
||||
("read_only_space", 0x02971): (188, "ClosureFeedbackCellArrayMap"),
|
||||
("read_only_space", 0x02999): (241, "FeedbackMetadataArrayMap"),
|
||||
("read_only_space", 0x029c1): (178, "ArrayListMap"),
|
||||
("read_only_space", 0x029e9): (129, "BigIntMap"),
|
||||
("read_only_space", 0x02a11): (188, "ObjectBoilerplateDescriptionMap"),
|
||||
("read_only_space", 0x02a39): (191, "BytecodeArrayMap"),
|
||||
("read_only_space", 0x02a61): (237, "CodeDataContainerMap"),
|
||||
("read_only_space", 0x02a89): (238, "CoverageInfoMap"),
|
||||
("read_only_space", 0x02ab1): (192, "FixedDoubleArrayMap"),
|
||||
("read_only_space", 0x02ad9): (180, "GlobalDictionaryMap"),
|
||||
("read_only_space", 0x02b01): (158, "ManyClosuresCellMap"),
|
||||
("read_only_space", 0x02b29): (247, "MegaDomHandlerMap"),
|
||||
("read_only_space", 0x02b51): (177, "ModuleInfoMap"),
|
||||
("read_only_space", 0x02b79): (181, "NameDictionaryMap"),
|
||||
("read_only_space", 0x02ba1): (158, "NoClosuresCellMap"),
|
||||
("read_only_space", 0x02bc9): (182, "NumberDictionaryMap"),
|
||||
("read_only_space", 0x02bf1): (158, "OneClosureCellMap"),
|
||||
("read_only_space", 0x02c19): (183, "OrderedHashMapMap"),
|
||||
("read_only_space", 0x02c41): (184, "OrderedHashSetMap"),
|
||||
("read_only_space", 0x02c69): (185, "OrderedNameDictionaryMap"),
|
||||
("read_only_space", 0x02c91): (249, "PreparseDataMap"),
|
||||
("read_only_space", 0x02cb9): (250, "PropertyArrayMap"),
|
||||
("read_only_space", 0x02a11): (189, "ObjectBoilerplateDescriptionMap"),
|
||||
("read_only_space", 0x02a39): (192, "BytecodeArrayMap"),
|
||||
("read_only_space", 0x02a61): (238, "CodeDataContainerMap"),
|
||||
("read_only_space", 0x02a89): (239, "CoverageInfoMap"),
|
||||
("read_only_space", 0x02ab1): (193, "FixedDoubleArrayMap"),
|
||||
("read_only_space", 0x02ad9): (181, "GlobalDictionaryMap"),
|
||||
("read_only_space", 0x02b01): (159, "ManyClosuresCellMap"),
|
||||
("read_only_space", 0x02b29): (248, "MegaDomHandlerMap"),
|
||||
("read_only_space", 0x02b51): (178, "ModuleInfoMap"),
|
||||
("read_only_space", 0x02b79): (182, "NameDictionaryMap"),
|
||||
("read_only_space", 0x02ba1): (159, "NoClosuresCellMap"),
|
||||
("read_only_space", 0x02bc9): (183, "NumberDictionaryMap"),
|
||||
("read_only_space", 0x02bf1): (159, "OneClosureCellMap"),
|
||||
("read_only_space", 0x02c19): (184, "OrderedHashMapMap"),
|
||||
("read_only_space", 0x02c41): (185, "OrderedHashSetMap"),
|
||||
("read_only_space", 0x02c69): (186, "OrderedNameDictionaryMap"),
|
||||
("read_only_space", 0x02c91): (250, "PreparseDataMap"),
|
||||
("read_only_space", 0x02cb9): (251, "PropertyArrayMap"),
|
||||
("read_only_space", 0x02ce1): (153, "SideEffectCallHandlerInfoMap"),
|
||||
("read_only_space", 0x02d09): (153, "SideEffectFreeCallHandlerInfoMap"),
|
||||
("read_only_space", 0x02d31): (153, "NextCallSideEffectFreeCallHandlerInfoMap"),
|
||||
("read_only_space", 0x02d59): (186, "SimpleNumberDictionaryMap"),
|
||||
("read_only_space", 0x02d81): (224, "SmallOrderedHashMapMap"),
|
||||
("read_only_space", 0x02da9): (225, "SmallOrderedHashSetMap"),
|
||||
("read_only_space", 0x02dd1): (226, "SmallOrderedNameDictionaryMap"),
|
||||
("read_only_space", 0x02df9): (231, "SourceTextModuleMap"),
|
||||
("read_only_space", 0x02e21): (257, "SwissNameDictionaryMap"),
|
||||
("read_only_space", 0x02e49): (232, "SyntheticModuleMap"),
|
||||
("read_only_space", 0x02e71): (258, "WasmApiFunctionRefMap"),
|
||||
("read_only_space", 0x02e99): (218, "WasmCapiFunctionDataMap"),
|
||||
("read_only_space", 0x02ec1): (219, "WasmExportedFunctionDataMap"),
|
||||
("read_only_space", 0x02d59): (187, "SimpleNumberDictionaryMap"),
|
||||
("read_only_space", 0x02d81): (225, "SmallOrderedHashMapMap"),
|
||||
("read_only_space", 0x02da9): (226, "SmallOrderedHashSetMap"),
|
||||
("read_only_space", 0x02dd1): (227, "SmallOrderedNameDictionaryMap"),
|
||||
("read_only_space", 0x02df9): (232, "SourceTextModuleMap"),
|
||||
("read_only_space", 0x02e21): (258, "SwissNameDictionaryMap"),
|
||||
("read_only_space", 0x02e49): (233, "SyntheticModuleMap"),
|
||||
("read_only_space", 0x02e71): (259, "WasmApiFunctionRefMap"),
|
||||
("read_only_space", 0x02e99): (222, "WasmCapiFunctionDataMap"),
|
||||
("read_only_space", 0x02ec1): (223, "WasmExportedFunctionDataMap"),
|
||||
("read_only_space", 0x02ee9): (205, "WasmInternalFunctionMap"),
|
||||
("read_only_space", 0x02f11): (220, "WasmJSFunctionDataMap"),
|
||||
("read_only_space", 0x02f11): (224, "WasmJSFunctionDataMap"),
|
||||
("read_only_space", 0x02f39): (206, "WasmTypeInfoMap"),
|
||||
("read_only_space", 0x02f61): (233, "WeakFixedArrayMap"),
|
||||
("read_only_space", 0x02f89): (179, "EphemeronHashTableMap"),
|
||||
("read_only_space", 0x02fb1): (239, "EmbedderDataArrayMap"),
|
||||
("read_only_space", 0x02fd9): (260, "WeakCellMap"),
|
||||
("read_only_space", 0x02f61): (234, "WeakFixedArrayMap"),
|
||||
("read_only_space", 0x02f89): (180, "EphemeronHashTableMap"),
|
||||
("read_only_space", 0x02fb1): (240, "EmbedderDataArrayMap"),
|
||||
("read_only_space", 0x02fd9): (261, "WeakCellMap"),
|
||||
("read_only_space", 0x03001): (32, "StringMap"),
|
||||
("read_only_space", 0x03029): (41, "ConsOneByteStringMap"),
|
||||
("read_only_space", 0x03051): (33, "ConsStringMap"),
|
||||
@ -364,76 +365,77 @@ KNOWN_MAPS = {
|
||||
("read_only_space", 0x03349): (131, "SelfReferenceMarkerMap"),
|
||||
("read_only_space", 0x03371): (131, "BasicBlockCountersMarkerMap"),
|
||||
("read_only_space", 0x033b5): (147, "ArrayBoilerplateDescriptionMap"),
|
||||
("read_only_space", 0x034b5): (160, "InterceptorInfoMap"),
|
||||
("read_only_space", 0x05dcd): (132, "PromiseFulfillReactionJobTaskMap"),
|
||||
("read_only_space", 0x05df5): (133, "PromiseRejectReactionJobTaskMap"),
|
||||
("read_only_space", 0x05e1d): (134, "CallableTaskMap"),
|
||||
("read_only_space", 0x05e45): (135, "CallbackTaskMap"),
|
||||
("read_only_space", 0x05e6d): (136, "PromiseResolveThenableJobTaskMap"),
|
||||
("read_only_space", 0x05e95): (139, "FunctionTemplateInfoMap"),
|
||||
("read_only_space", 0x05ebd): (140, "ObjectTemplateInfoMap"),
|
||||
("read_only_space", 0x05ee5): (141, "AccessCheckInfoMap"),
|
||||
("read_only_space", 0x05f0d): (142, "AccessorInfoMap"),
|
||||
("read_only_space", 0x05f35): (143, "AccessorPairMap"),
|
||||
("read_only_space", 0x05f5d): (144, "AliasedArgumentsEntryMap"),
|
||||
("read_only_space", 0x05f85): (145, "AllocationMementoMap"),
|
||||
("read_only_space", 0x05fad): (148, "AsmWasmDataMap"),
|
||||
("read_only_space", 0x05fd5): (149, "AsyncGeneratorRequestMap"),
|
||||
("read_only_space", 0x05ffd): (150, "BreakPointMap"),
|
||||
("read_only_space", 0x06025): (151, "BreakPointInfoMap"),
|
||||
("read_only_space", 0x0604d): (152, "CachedTemplateObjectMap"),
|
||||
("read_only_space", 0x06075): (154, "CallSiteInfoMap"),
|
||||
("read_only_space", 0x0609d): (155, "ClassPositionsMap"),
|
||||
("read_only_space", 0x060c5): (156, "DebugInfoMap"),
|
||||
("read_only_space", 0x060ed): (159, "FunctionTemplateRareDataMap"),
|
||||
("read_only_space", 0x06115): (161, "InterpreterDataMap"),
|
||||
("read_only_space", 0x0613d): (162, "ModuleRequestMap"),
|
||||
("read_only_space", 0x06165): (163, "PromiseCapabilityMap"),
|
||||
("read_only_space", 0x0618d): (164, "PromiseReactionMap"),
|
||||
("read_only_space", 0x061b5): (165, "PropertyDescriptorObjectMap"),
|
||||
("read_only_space", 0x061dd): (166, "PrototypeInfoMap"),
|
||||
("read_only_space", 0x06205): (167, "RegExpBoilerplateDescriptionMap"),
|
||||
("read_only_space", 0x0622d): (168, "ScriptMap"),
|
||||
("read_only_space", 0x06255): (169, "ScriptOrModuleMap"),
|
||||
("read_only_space", 0x0627d): (170, "SourceTextModuleInfoEntryMap"),
|
||||
("read_only_space", 0x062a5): (171, "StackFrameInfoMap"),
|
||||
("read_only_space", 0x062cd): (172, "TemplateObjectDescriptionMap"),
|
||||
("read_only_space", 0x062f5): (173, "Tuple2Map"),
|
||||
("read_only_space", 0x0631d): (174, "WasmContinuationObjectMap"),
|
||||
("read_only_space", 0x06345): (175, "WasmExceptionTagMap"),
|
||||
("read_only_space", 0x0636d): (176, "WasmIndirectFunctionTableMap"),
|
||||
("read_only_space", 0x06395): (194, "SloppyArgumentsElementsMap"),
|
||||
("read_only_space", 0x063bd): (229, "DescriptorArrayMap"),
|
||||
("read_only_space", 0x063e5): (202, "UncompiledDataWithoutPreparseDataMap"),
|
||||
("read_only_space", 0x0640d): (200, "UncompiledDataWithPreparseDataMap"),
|
||||
("read_only_space", 0x06435): (203, "UncompiledDataWithoutPreparseDataWithJobMap"),
|
||||
("read_only_space", 0x0645d): (201, "UncompiledDataWithPreparseDataAndJobMap"),
|
||||
("read_only_space", 0x06485): (248, "OnHeapBasicBlockProfilerDataMap"),
|
||||
("read_only_space", 0x064ad): (195, "TurbofanBitsetTypeMap"),
|
||||
("read_only_space", 0x064d5): (199, "TurbofanUnionTypeMap"),
|
||||
("read_only_space", 0x064fd): (198, "TurbofanRangeTypeMap"),
|
||||
("read_only_space", 0x06525): (196, "TurbofanHeapConstantTypeMap"),
|
||||
("read_only_space", 0x0654d): (197, "TurbofanOtherNumberConstantTypeMap"),
|
||||
("read_only_space", 0x06575): (244, "InternalClassMap"),
|
||||
("read_only_space", 0x0659d): (255, "SmiPairMap"),
|
||||
("read_only_space", 0x065c5): (254, "SmiBoxMap"),
|
||||
("read_only_space", 0x065ed): (221, "ExportedSubClassBaseMap"),
|
||||
("read_only_space", 0x06615): (222, "ExportedSubClassMap"),
|
||||
("read_only_space", 0x0663d): (227, "AbstractInternalClassSubclass1Map"),
|
||||
("read_only_space", 0x06665): (228, "AbstractInternalClassSubclass2Map"),
|
||||
("read_only_space", 0x0668d): (193, "InternalClassWithSmiElementsMap"),
|
||||
("read_only_space", 0x066b5): (245, "InternalClassWithStructElementsMap"),
|
||||
("read_only_space", 0x066dd): (223, "ExportedSubClass2Map"),
|
||||
("read_only_space", 0x06705): (256, "SortStateMap"),
|
||||
("read_only_space", 0x0672d): (146, "AllocationSiteWithWeakNextMap"),
|
||||
("read_only_space", 0x06755): (146, "AllocationSiteWithoutWeakNextMap"),
|
||||
("read_only_space", 0x0677d): (137, "LoadHandler1Map"),
|
||||
("read_only_space", 0x067a5): (137, "LoadHandler2Map"),
|
||||
("read_only_space", 0x067cd): (137, "LoadHandler3Map"),
|
||||
("read_only_space", 0x067f5): (138, "StoreHandler0Map"),
|
||||
("read_only_space", 0x0681d): (138, "StoreHandler1Map"),
|
||||
("read_only_space", 0x06845): (138, "StoreHandler2Map"),
|
||||
("read_only_space", 0x0686d): (138, "StoreHandler3Map"),
|
||||
("read_only_space", 0x034b5): (161, "InterceptorInfoMap"),
|
||||
("read_only_space", 0x05dbd): (132, "PromiseFulfillReactionJobTaskMap"),
|
||||
("read_only_space", 0x05de5): (133, "PromiseRejectReactionJobTaskMap"),
|
||||
("read_only_space", 0x05e0d): (134, "CallableTaskMap"),
|
||||
("read_only_space", 0x05e35): (135, "CallbackTaskMap"),
|
||||
("read_only_space", 0x05e5d): (136, "PromiseResolveThenableJobTaskMap"),
|
||||
("read_only_space", 0x05e85): (139, "FunctionTemplateInfoMap"),
|
||||
("read_only_space", 0x05ead): (140, "ObjectTemplateInfoMap"),
|
||||
("read_only_space", 0x05ed5): (141, "AccessCheckInfoMap"),
|
||||
("read_only_space", 0x05efd): (142, "AccessorInfoMap"),
|
||||
("read_only_space", 0x05f25): (143, "AccessorPairMap"),
|
||||
("read_only_space", 0x05f4d): (144, "AliasedArgumentsEntryMap"),
|
||||
("read_only_space", 0x05f75): (145, "AllocationMementoMap"),
|
||||
("read_only_space", 0x05f9d): (148, "AsmWasmDataMap"),
|
||||
("read_only_space", 0x05fc5): (149, "AsyncGeneratorRequestMap"),
|
||||
("read_only_space", 0x05fed): (150, "BreakPointMap"),
|
||||
("read_only_space", 0x06015): (151, "BreakPointInfoMap"),
|
||||
("read_only_space", 0x0603d): (152, "CachedTemplateObjectMap"),
|
||||
("read_only_space", 0x06065): (154, "CallSiteInfoMap"),
|
||||
("read_only_space", 0x0608d): (155, "ClassPositionsMap"),
|
||||
("read_only_space", 0x060b5): (156, "DebugInfoMap"),
|
||||
("read_only_space", 0x060dd): (158, "ErrorStackDataMap"),
|
||||
("read_only_space", 0x06105): (160, "FunctionTemplateRareDataMap"),
|
||||
("read_only_space", 0x0612d): (162, "InterpreterDataMap"),
|
||||
("read_only_space", 0x06155): (163, "ModuleRequestMap"),
|
||||
("read_only_space", 0x0617d): (164, "PromiseCapabilityMap"),
|
||||
("read_only_space", 0x061a5): (165, "PromiseReactionMap"),
|
||||
("read_only_space", 0x061cd): (166, "PropertyDescriptorObjectMap"),
|
||||
("read_only_space", 0x061f5): (167, "PrototypeInfoMap"),
|
||||
("read_only_space", 0x0621d): (168, "RegExpBoilerplateDescriptionMap"),
|
||||
("read_only_space", 0x06245): (169, "ScriptMap"),
|
||||
("read_only_space", 0x0626d): (170, "ScriptOrModuleMap"),
|
||||
("read_only_space", 0x06295): (171, "SourceTextModuleInfoEntryMap"),
|
||||
("read_only_space", 0x062bd): (172, "StackFrameInfoMap"),
|
||||
("read_only_space", 0x062e5): (173, "TemplateObjectDescriptionMap"),
|
||||
("read_only_space", 0x0630d): (174, "Tuple2Map"),
|
||||
("read_only_space", 0x06335): (175, "WasmContinuationObjectMap"),
|
||||
("read_only_space", 0x0635d): (176, "WasmExceptionTagMap"),
|
||||
("read_only_space", 0x06385): (177, "WasmIndirectFunctionTableMap"),
|
||||
("read_only_space", 0x063ad): (195, "SloppyArgumentsElementsMap"),
|
||||
("read_only_space", 0x063d5): (230, "DescriptorArrayMap"),
|
||||
("read_only_space", 0x063fd): (219, "UncompiledDataWithoutPreparseDataMap"),
|
||||
("read_only_space", 0x06425): (217, "UncompiledDataWithPreparseDataMap"),
|
||||
("read_only_space", 0x0644d): (220, "UncompiledDataWithoutPreparseDataWithJobMap"),
|
||||
("read_only_space", 0x06475): (218, "UncompiledDataWithPreparseDataAndJobMap"),
|
||||
("read_only_space", 0x0649d): (249, "OnHeapBasicBlockProfilerDataMap"),
|
||||
("read_only_space", 0x064c5): (196, "TurbofanBitsetTypeMap"),
|
||||
("read_only_space", 0x064ed): (200, "TurbofanUnionTypeMap"),
|
||||
("read_only_space", 0x06515): (199, "TurbofanRangeTypeMap"),
|
||||
("read_only_space", 0x0653d): (197, "TurbofanHeapConstantTypeMap"),
|
||||
("read_only_space", 0x06565): (198, "TurbofanOtherNumberConstantTypeMap"),
|
||||
("read_only_space", 0x0658d): (245, "InternalClassMap"),
|
||||
("read_only_space", 0x065b5): (256, "SmiPairMap"),
|
||||
("read_only_space", 0x065dd): (255, "SmiBoxMap"),
|
||||
("read_only_space", 0x06605): (201, "ExportedSubClassBaseMap"),
|
||||
("read_only_space", 0x0662d): (202, "ExportedSubClassMap"),
|
||||
("read_only_space", 0x06655): (228, "AbstractInternalClassSubclass1Map"),
|
||||
("read_only_space", 0x0667d): (229, "AbstractInternalClassSubclass2Map"),
|
||||
("read_only_space", 0x066a5): (194, "InternalClassWithSmiElementsMap"),
|
||||
("read_only_space", 0x066cd): (246, "InternalClassWithStructElementsMap"),
|
||||
("read_only_space", 0x066f5): (203, "ExportedSubClass2Map"),
|
||||
("read_only_space", 0x0671d): (257, "SortStateMap"),
|
||||
("read_only_space", 0x06745): (146, "AllocationSiteWithWeakNextMap"),
|
||||
("read_only_space", 0x0676d): (146, "AllocationSiteWithoutWeakNextMap"),
|
||||
("read_only_space", 0x06795): (137, "LoadHandler1Map"),
|
||||
("read_only_space", 0x067bd): (137, "LoadHandler2Map"),
|
||||
("read_only_space", 0x067e5): (137, "LoadHandler3Map"),
|
||||
("read_only_space", 0x0680d): (138, "StoreHandler0Map"),
|
||||
("read_only_space", 0x06835): (138, "StoreHandler1Map"),
|
||||
("read_only_space", 0x0685d): (138, "StoreHandler2Map"),
|
||||
("read_only_space", 0x06885): (138, "StoreHandler3Map"),
|
||||
("map_space", 0x02131): (1057, "ExternalMap"),
|
||||
("map_space", 0x02159): (2114, "JSMessageObjectMap"),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user