[init] Install console API to context extras binding

Not all environments (like ShadowRealm) would expect console
APIs to present in their globals. Moving console API to
context's extras binding to allow them to be still
snapshotted to not slow down the bootstrap.

The console API is not removed from the global in this CL,
but it is planned to be removed in the later release.

Bug: v8:11989
Change-Id: Ieca09e0bafdf8943e8fff8fee97fc21c2326320f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3364786
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Chengzhong Wu <legendecas@gmail.com>
Cr-Commit-Position: refs/heads/main@{#78998}
This commit is contained in:
legendecas 2022-02-08 22:48:01 +08:00 committed by V8 LUCI CQ
parent 604f661495
commit 0823b36d35
7 changed files with 264 additions and 192 deletions

View File

@ -3243,8 +3243,8 @@ Local<Context> Shell::CreateEvaluationContext(Isolate* isolate) {
isolate->SetWasmLoadSourceMapCallback(Shell::WasmLoadSourceMapCallback);
}
InitializeModuleEmbedderData(context);
Context::Scope scope(context);
if (options.include_arguments) {
Context::Scope scope(context);
const std::vector<const char*>& args = options.arguments;
int size = static_cast<int>(args.size());
Local<Array> array = Array::New(isolate, size);
@ -3258,6 +3258,15 @@ Local<Context> Shell::CreateEvaluationContext(Isolate* isolate) {
isolate, "arguments", NewStringType::kInternalized);
context->Global()->Set(context, name, array).FromJust();
}
{
// setup console global.
Local<String> name = String::NewFromUtf8Literal(
isolate, "console", NewStringType::kInternalized);
Local<Value> console =
context->GetExtrasBindingObject()->Get(context, name).ToLocalChecked();
context->Global()->Set(context, name, console).FromJust();
}
return handle_scope.Escape(context);
}

View File

@ -228,6 +228,7 @@ class Genesis {
void InitializeExperimentalGlobal();
void InitializeIteratorFunctions();
void InitializeCallSiteBuiltins();
void InitializeConsole(Handle<JSObject> extras_binding);
#define DECLARE_FEATURE_INITIALIZATION(id, descr) void InitializeGlobal_##id();
@ -2794,71 +2795,6 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
InstallToStringTag(isolate_, math, "Math");
}
{ // -- C o n s o l e
Handle<String> name = factory->InternalizeUtf8String("console");
Handle<NativeContext> context(isolate()->native_context());
Handle<SharedFunctionInfo> info =
factory->NewSharedFunctionInfoForBuiltin(name, Builtin::kIllegal);
info->set_language_mode(LanguageMode::kStrict);
Handle<JSFunction> cons =
Factory::JSFunctionBuilder{isolate(), info, context}.Build();
Handle<JSObject> empty = factory->NewJSObject(isolate_->object_function());
JSFunction::SetPrototype(cons, empty);
Handle<JSObject> console = factory->NewJSObject(cons, AllocationType::kOld);
DCHECK(console->IsJSObject());
JSObject::AddProperty(isolate_, global, name, console, DONT_ENUM);
SimpleInstallFunction(isolate_, console, "debug", Builtin::kConsoleDebug, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "error", Builtin::kConsoleError, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "info", Builtin::kConsoleInfo, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "log", Builtin::kConsoleLog, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "warn", Builtin::kConsoleWarn, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "dir", Builtin::kConsoleDir, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "dirxml", Builtin::kConsoleDirXml,
0, false, NONE);
SimpleInstallFunction(isolate_, console, "table", Builtin::kConsoleTable, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "trace", Builtin::kConsoleTrace, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "group", Builtin::kConsoleGroup, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "groupCollapsed",
Builtin::kConsoleGroupCollapsed, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "groupEnd",
Builtin::kConsoleGroupEnd, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "clear", Builtin::kConsoleClear, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "count", Builtin::kConsoleCount, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "countReset",
Builtin::kConsoleCountReset, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "assert",
Builtin::kFastConsoleAssert, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "profile",
Builtin::kConsoleProfile, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "profileEnd",
Builtin::kConsoleProfileEnd, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "time", Builtin::kConsoleTime, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "timeLog",
Builtin::kConsoleTimeLog, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "timeEnd",
Builtin::kConsoleTimeEnd, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "timeStamp",
Builtin::kConsoleTimeStamp, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "context",
Builtin::kConsoleContext, 1, true, NONE);
InstallToStringTag(isolate_, console, "Object");
}
#ifdef V8_INTL_SUPPORT
{ // -- I n t l
Handle<JSObject> intl =
@ -4395,6 +4331,80 @@ void Genesis::InitializeCallSiteBuiltins() {
}
}
void Genesis::InitializeConsole(Handle<JSObject> extras_binding) {
HandleScope scope(isolate());
Factory* factory = isolate_->factory();
// -- C o n s o l e
Handle<String> name = factory->console_string();
Handle<NativeContext> context(isolate_->native_context());
Handle<JSGlobalObject> global(context->global_object(), isolate());
Handle<SharedFunctionInfo> info =
factory->NewSharedFunctionInfoForBuiltin(name, Builtin::kIllegal);
info->set_language_mode(LanguageMode::kStrict);
Handle<JSFunction> cons =
Factory::JSFunctionBuilder{isolate(), info, context}.Build();
Handle<JSObject> empty = factory->NewJSObject(isolate_->object_function());
JSFunction::SetPrototype(cons, empty);
Handle<JSObject> console = factory->NewJSObject(cons, AllocationType::kOld);
DCHECK(console->IsJSObject());
JSObject::AddProperty(isolate_, extras_binding, name, console, DONT_ENUM);
// TODO(v8:11989): remove this in the next release
JSObject::AddProperty(isolate_, global, name, console, DONT_ENUM);
SimpleInstallFunction(isolate_, console, "debug", Builtin::kConsoleDebug, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "error", Builtin::kConsoleError, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "info", Builtin::kConsoleInfo, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "log", Builtin::kConsoleLog, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "warn", Builtin::kConsoleWarn, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "dir", Builtin::kConsoleDir, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "dirxml", Builtin::kConsoleDirXml, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "table", Builtin::kConsoleTable, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "trace", Builtin::kConsoleTrace, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "group", Builtin::kConsoleGroup, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "groupCollapsed",
Builtin::kConsoleGroupCollapsed, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "groupEnd",
Builtin::kConsoleGroupEnd, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "clear", Builtin::kConsoleClear, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "count", Builtin::kConsoleCount, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "countReset",
Builtin::kConsoleCountReset, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "assert",
Builtin::kFastConsoleAssert, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "profile", Builtin::kConsoleProfile,
0, false, NONE);
SimpleInstallFunction(isolate_, console, "profileEnd",
Builtin::kConsoleProfileEnd, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "time", Builtin::kConsoleTime, 0,
false, NONE);
SimpleInstallFunction(isolate_, console, "timeLog", Builtin::kConsoleTimeLog,
0, false, NONE);
SimpleInstallFunction(isolate_, console, "timeEnd", Builtin::kConsoleTimeEnd,
0, false, NONE);
SimpleInstallFunction(isolate_, console, "timeStamp",
Builtin::kConsoleTimeStamp, 0, false, NONE);
SimpleInstallFunction(isolate_, console, "context", Builtin::kConsoleContext,
1, true, NONE);
InstallToStringTag(isolate_, console, "Object");
}
#define EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(id) \
void Genesis::InitializeGlobal_##id() {}
@ -5702,6 +5712,8 @@ bool Genesis::InstallExtrasBindings() {
SimpleInstallFunction(isolate(), extras_binding, "trace", Builtin::kTrace, 5,
true);
InitializeConsole(extras_binding);
native_context()->set_extras_binding_object(*extras_binding);
return true;

View File

@ -169,6 +169,7 @@
V(_, computed_string, "<computed>") \
V(_, configurable_string, "configurable") \
V(_, conjunction_string, "conjunction") \
V(_, console_string, "console") \
V(_, constrain_string, "constrain") \
V(_, construct_string, "construct") \
V(_, constructor_string, "constructor") \

View File

@ -1068,6 +1068,17 @@ UNINITIALIZED_TEST(ConsoleTimeEvents) {
v8::Isolate* isolate = v8::Isolate::New(create_params);
{
ScopedLoggerInitializer logger(isolate);
{
// setup console global.
v8::HandleScope scope(isolate);
v8::Local<v8::String> name = v8::String::NewFromUtf8Literal(
isolate, "console", v8::NewStringType::kInternalized);
v8::Local<v8::Context> context = isolate->GetCurrentContext();
v8::Local<v8::Value> console = context->GetExtrasBindingObject()
->Get(context, name)
.ToLocalChecked();
context->Global()->Set(context, name, console).FromJust();
}
// Test that console time events are properly logged
const char* source_text =
"console.time();"

View File

@ -854,6 +854,16 @@ TEST(TerminateConsole) {
isolate, TerminateCurrentThread, DoLoopCancelTerminate);
v8::Local<v8::Context> context = v8::Context::New(isolate, nullptr, global);
v8::Context::Scope context_scope(context);
{
// setup console global.
v8::HandleScope scope(isolate);
v8::Local<v8::String> name = v8::String::NewFromUtf8Literal(
isolate, "console", v8::NewStringType::kInternalized);
v8::Local<v8::Value> console =
context->GetExtrasBindingObject()->Get(context, name).ToLocalChecked();
context->Global()->Set(context, name, console).FromJust();
}
CHECK(!isolate->IsExecutionTerminating());
v8::TryCatch try_catch(isolate);
CHECK(!isolate->IsExecutionTerminating());

View File

@ -418,6 +418,33 @@ bool StrictAccessCheck(v8::Local<v8::Context> accessing_context,
return accessing_context.IsEmpty();
}
class ConsoleExtension : public InspectorIsolateData::SetupGlobalTask {
public:
~ConsoleExtension() override = default;
void Run(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> global) override {
v8::Local<v8::String> name =
v8::String::NewFromUtf8Literal(isolate, "console");
global->SetAccessor(name, &ConsoleGetterCallback, nullptr, {}, v8::DEFAULT,
v8::DontEnum);
}
private:
static void ConsoleGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) {
v8::Isolate* isolate = info.GetIsolate();
v8::HandleScope scope(isolate);
v8::Local<v8::Context> context = isolate->GetCurrentContext();
v8::Local<v8::String> name =
v8::String::NewFromUtf8Literal(isolate, "console");
v8::Local<v8::Object> console = context->GetExtrasBindingObject()
->Get(context, name)
.ToLocalChecked()
.As<v8::Object>();
info.GetReturnValue().Set(console);
}
};
class InspectorExtension : public InspectorIsolateData::SetupGlobalTask {
public:
~InspectorExtension() override = default;
@ -777,6 +804,7 @@ int InspectorTestMain(int argc, char* argv[]) {
{
InspectorIsolateData::SetupGlobalTasks frontend_extensions;
frontend_extensions.emplace_back(new UtilsExtension());
frontend_extensions.emplace_back(new ConsoleExtension());
TaskRunner frontend_runner(std::move(frontend_extensions),
kFailOnUncaughtExceptions, &ready_semaphore,
startup_data.data ? &startup_data : nullptr,
@ -791,6 +819,7 @@ int InspectorTestMain(int argc, char* argv[]) {
InspectorIsolateData::SetupGlobalTasks backend_extensions;
backend_extensions.emplace_back(new SetTimeoutExtension());
backend_extensions.emplace_back(new ConsoleExtension());
backend_extensions.emplace_back(new InspectorExtension());
TaskRunner backend_runner(
std::move(backend_extensions), kStandardPropagateUncaughtExceptions,

View File

@ -371,76 +371,76 @@ KNOWN_MAPS = {
("read_only_space", 0x033d9): (131, "BasicBlockCountersMarkerMap"),
("read_only_space", 0x0341d): (147, "ArrayBoilerplateDescriptionMap"),
("read_only_space", 0x0351d): (161, "InterceptorInfoMap"),
("read_only_space", 0x05e49): (132, "PromiseFulfillReactionJobTaskMap"),
("read_only_space", 0x05e71): (133, "PromiseRejectReactionJobTaskMap"),
("read_only_space", 0x05e99): (134, "CallableTaskMap"),
("read_only_space", 0x05ec1): (135, "CallbackTaskMap"),
("read_only_space", 0x05ee9): (136, "PromiseResolveThenableJobTaskMap"),
("read_only_space", 0x05f11): (139, "FunctionTemplateInfoMap"),
("read_only_space", 0x05f39): (140, "ObjectTemplateInfoMap"),
("read_only_space", 0x05f61): (141, "AccessCheckInfoMap"),
("read_only_space", 0x05f89): (142, "AccessorInfoMap"),
("read_only_space", 0x05fb1): (143, "AccessorPairMap"),
("read_only_space", 0x05fd9): (144, "AliasedArgumentsEntryMap"),
("read_only_space", 0x06001): (145, "AllocationMementoMap"),
("read_only_space", 0x06029): (148, "AsmWasmDataMap"),
("read_only_space", 0x06051): (149, "AsyncGeneratorRequestMap"),
("read_only_space", 0x06079): (150, "BreakPointMap"),
("read_only_space", 0x060a1): (151, "BreakPointInfoMap"),
("read_only_space", 0x060c9): (152, "CachedTemplateObjectMap"),
("read_only_space", 0x060f1): (154, "CallSiteInfoMap"),
("read_only_space", 0x06119): (155, "ClassPositionsMap"),
("read_only_space", 0x06141): (156, "DebugInfoMap"),
("read_only_space", 0x06169): (158, "ErrorStackDataMap"),
("read_only_space", 0x06191): (160, "FunctionTemplateRareDataMap"),
("read_only_space", 0x061b9): (162, "InterpreterDataMap"),
("read_only_space", 0x061e1): (163, "ModuleRequestMap"),
("read_only_space", 0x06209): (164, "PromiseCapabilityMap"),
("read_only_space", 0x06231): (165, "PromiseReactionMap"),
("read_only_space", 0x06259): (166, "PropertyDescriptorObjectMap"),
("read_only_space", 0x06281): (167, "PrototypeInfoMap"),
("read_only_space", 0x062a9): (168, "RegExpBoilerplateDescriptionMap"),
("read_only_space", 0x062d1): (169, "ScriptMap"),
("read_only_space", 0x062f9): (170, "ScriptOrModuleMap"),
("read_only_space", 0x06321): (171, "SourceTextModuleInfoEntryMap"),
("read_only_space", 0x06349): (172, "StackFrameInfoMap"),
("read_only_space", 0x06371): (173, "TemplateObjectDescriptionMap"),
("read_only_space", 0x06399): (174, "Tuple2Map"),
("read_only_space", 0x063c1): (175, "WasmContinuationObjectMap"),
("read_only_space", 0x063e9): (176, "WasmExceptionTagMap"),
("read_only_space", 0x06411): (177, "WasmIndirectFunctionTableMap"),
("read_only_space", 0x06439): (196, "SloppyArgumentsElementsMap"),
("read_only_space", 0x06461): (231, "DescriptorArrayMap"),
("read_only_space", 0x06489): (219, "UncompiledDataWithoutPreparseDataMap"),
("read_only_space", 0x064b1): (217, "UncompiledDataWithPreparseDataMap"),
("read_only_space", 0x064d9): (220, "UncompiledDataWithoutPreparseDataWithJobMap"),
("read_only_space", 0x06501): (218, "UncompiledDataWithPreparseDataAndJobMap"),
("read_only_space", 0x06529): (250, "OnHeapBasicBlockProfilerDataMap"),
("read_only_space", 0x06551): (197, "TurbofanBitsetTypeMap"),
("read_only_space", 0x06579): (201, "TurbofanUnionTypeMap"),
("read_only_space", 0x065a1): (200, "TurbofanRangeTypeMap"),
("read_only_space", 0x065c9): (198, "TurbofanHeapConstantTypeMap"),
("read_only_space", 0x065f1): (199, "TurbofanOtherNumberConstantTypeMap"),
("read_only_space", 0x06619): (246, "InternalClassMap"),
("read_only_space", 0x06641): (257, "SmiPairMap"),
("read_only_space", 0x06669): (256, "SmiBoxMap"),
("read_only_space", 0x06691): (225, "ExportedSubClassBaseMap"),
("read_only_space", 0x066b9): (226, "ExportedSubClassMap"),
("read_only_space", 0x066e1): (202, "AbstractInternalClassSubclass1Map"),
("read_only_space", 0x06709): (203, "AbstractInternalClassSubclass2Map"),
("read_only_space", 0x06731): (195, "InternalClassWithSmiElementsMap"),
("read_only_space", 0x06759): (247, "InternalClassWithStructElementsMap"),
("read_only_space", 0x06781): (227, "ExportedSubClass2Map"),
("read_only_space", 0x067a9): (258, "SortStateMap"),
("read_only_space", 0x067d1): (146, "AllocationSiteWithWeakNextMap"),
("read_only_space", 0x067f9): (146, "AllocationSiteWithoutWeakNextMap"),
("read_only_space", 0x06821): (137, "LoadHandler1Map"),
("read_only_space", 0x06849): (137, "LoadHandler2Map"),
("read_only_space", 0x06871): (137, "LoadHandler3Map"),
("read_only_space", 0x06899): (138, "StoreHandler0Map"),
("read_only_space", 0x068c1): (138, "StoreHandler1Map"),
("read_only_space", 0x068e9): (138, "StoreHandler2Map"),
("read_only_space", 0x06911): (138, "StoreHandler3Map"),
("read_only_space", 0x05e5d): (132, "PromiseFulfillReactionJobTaskMap"),
("read_only_space", 0x05e85): (133, "PromiseRejectReactionJobTaskMap"),
("read_only_space", 0x05ead): (134, "CallableTaskMap"),
("read_only_space", 0x05ed5): (135, "CallbackTaskMap"),
("read_only_space", 0x05efd): (136, "PromiseResolveThenableJobTaskMap"),
("read_only_space", 0x05f25): (139, "FunctionTemplateInfoMap"),
("read_only_space", 0x05f4d): (140, "ObjectTemplateInfoMap"),
("read_only_space", 0x05f75): (141, "AccessCheckInfoMap"),
("read_only_space", 0x05f9d): (142, "AccessorInfoMap"),
("read_only_space", 0x05fc5): (143, "AccessorPairMap"),
("read_only_space", 0x05fed): (144, "AliasedArgumentsEntryMap"),
("read_only_space", 0x06015): (145, "AllocationMementoMap"),
("read_only_space", 0x0603d): (148, "AsmWasmDataMap"),
("read_only_space", 0x06065): (149, "AsyncGeneratorRequestMap"),
("read_only_space", 0x0608d): (150, "BreakPointMap"),
("read_only_space", 0x060b5): (151, "BreakPointInfoMap"),
("read_only_space", 0x060dd): (152, "CachedTemplateObjectMap"),
("read_only_space", 0x06105): (154, "CallSiteInfoMap"),
("read_only_space", 0x0612d): (155, "ClassPositionsMap"),
("read_only_space", 0x06155): (156, "DebugInfoMap"),
("read_only_space", 0x0617d): (158, "ErrorStackDataMap"),
("read_only_space", 0x061a5): (160, "FunctionTemplateRareDataMap"),
("read_only_space", 0x061cd): (162, "InterpreterDataMap"),
("read_only_space", 0x061f5): (163, "ModuleRequestMap"),
("read_only_space", 0x0621d): (164, "PromiseCapabilityMap"),
("read_only_space", 0x06245): (165, "PromiseReactionMap"),
("read_only_space", 0x0626d): (166, "PropertyDescriptorObjectMap"),
("read_only_space", 0x06295): (167, "PrototypeInfoMap"),
("read_only_space", 0x062bd): (168, "RegExpBoilerplateDescriptionMap"),
("read_only_space", 0x062e5): (169, "ScriptMap"),
("read_only_space", 0x0630d): (170, "ScriptOrModuleMap"),
("read_only_space", 0x06335): (171, "SourceTextModuleInfoEntryMap"),
("read_only_space", 0x0635d): (172, "StackFrameInfoMap"),
("read_only_space", 0x06385): (173, "TemplateObjectDescriptionMap"),
("read_only_space", 0x063ad): (174, "Tuple2Map"),
("read_only_space", 0x063d5): (175, "WasmContinuationObjectMap"),
("read_only_space", 0x063fd): (176, "WasmExceptionTagMap"),
("read_only_space", 0x06425): (177, "WasmIndirectFunctionTableMap"),
("read_only_space", 0x0644d): (196, "SloppyArgumentsElementsMap"),
("read_only_space", 0x06475): (231, "DescriptorArrayMap"),
("read_only_space", 0x0649d): (219, "UncompiledDataWithoutPreparseDataMap"),
("read_only_space", 0x064c5): (217, "UncompiledDataWithPreparseDataMap"),
("read_only_space", 0x064ed): (220, "UncompiledDataWithoutPreparseDataWithJobMap"),
("read_only_space", 0x06515): (218, "UncompiledDataWithPreparseDataAndJobMap"),
("read_only_space", 0x0653d): (250, "OnHeapBasicBlockProfilerDataMap"),
("read_only_space", 0x06565): (197, "TurbofanBitsetTypeMap"),
("read_only_space", 0x0658d): (201, "TurbofanUnionTypeMap"),
("read_only_space", 0x065b5): (200, "TurbofanRangeTypeMap"),
("read_only_space", 0x065dd): (198, "TurbofanHeapConstantTypeMap"),
("read_only_space", 0x06605): (199, "TurbofanOtherNumberConstantTypeMap"),
("read_only_space", 0x0662d): (246, "InternalClassMap"),
("read_only_space", 0x06655): (257, "SmiPairMap"),
("read_only_space", 0x0667d): (256, "SmiBoxMap"),
("read_only_space", 0x066a5): (225, "ExportedSubClassBaseMap"),
("read_only_space", 0x066cd): (226, "ExportedSubClassMap"),
("read_only_space", 0x066f5): (202, "AbstractInternalClassSubclass1Map"),
("read_only_space", 0x0671d): (203, "AbstractInternalClassSubclass2Map"),
("read_only_space", 0x06745): (195, "InternalClassWithSmiElementsMap"),
("read_only_space", 0x0676d): (247, "InternalClassWithStructElementsMap"),
("read_only_space", 0x06795): (227, "ExportedSubClass2Map"),
("read_only_space", 0x067bd): (258, "SortStateMap"),
("read_only_space", 0x067e5): (146, "AllocationSiteWithWeakNextMap"),
("read_only_space", 0x0680d): (146, "AllocationSiteWithoutWeakNextMap"),
("read_only_space", 0x06835): (137, "LoadHandler1Map"),
("read_only_space", 0x0685d): (137, "LoadHandler2Map"),
("read_only_space", 0x06885): (137, "LoadHandler3Map"),
("read_only_space", 0x068ad): (138, "StoreHandler0Map"),
("read_only_space", 0x068d5): (138, "StoreHandler1Map"),
("read_only_space", 0x068fd): (138, "StoreHandler2Map"),
("read_only_space", 0x06925): (138, "StoreHandler3Map"),
("map_space", 0x02149): (1057, "ExternalMap"),
("map_space", 0x02171): (2114, "JSMessageObjectMap"),
}
@ -490,62 +490,62 @@ KNOWN_OBJECTS = {
("read_only_space", 0x03659): "EmptyFunctionScopeInfo",
("read_only_space", 0x0367d): "NativeScopeInfo",
("read_only_space", 0x03695): "HashSeed",
("old_space", 0x04241): "ArgumentsIteratorAccessor",
("old_space", 0x04285): "ArrayLengthAccessor",
("old_space", 0x042c9): "BoundFunctionLengthAccessor",
("old_space", 0x0430d): "BoundFunctionNameAccessor",
("old_space", 0x04351): "ErrorStackAccessor",
("old_space", 0x04395): "FunctionArgumentsAccessor",
("old_space", 0x043d9): "FunctionCallerAccessor",
("old_space", 0x0441d): "FunctionNameAccessor",
("old_space", 0x04461): "FunctionLengthAccessor",
("old_space", 0x044a5): "FunctionPrototypeAccessor",
("old_space", 0x044e9): "StringLengthAccessor",
("old_space", 0x0452d): "InvalidPrototypeValidityCell",
("old_space", 0x04535): "EmptyScript",
("old_space", 0x04575): "ManyClosuresCell",
("old_space", 0x04581): "ArrayConstructorProtector",
("old_space", 0x04595): "NoElementsProtector",
("old_space", 0x045a9): "MegaDOMProtector",
("old_space", 0x045bd): "IsConcatSpreadableProtector",
("old_space", 0x045d1): "ArraySpeciesProtector",
("old_space", 0x045e5): "TypedArraySpeciesProtector",
("old_space", 0x045f9): "PromiseSpeciesProtector",
("old_space", 0x0460d): "RegExpSpeciesProtector",
("old_space", 0x04621): "StringLengthProtector",
("old_space", 0x04635): "ArrayIteratorProtector",
("old_space", 0x04649): "ArrayBufferDetachingProtector",
("old_space", 0x0465d): "PromiseHookProtector",
("old_space", 0x04671): "PromiseResolveProtector",
("old_space", 0x04685): "MapIteratorProtector",
("old_space", 0x04699): "PromiseThenProtector",
("old_space", 0x046ad): "SetIteratorProtector",
("old_space", 0x046c1): "StringIteratorProtector",
("old_space", 0x046d5): "SingleCharacterStringCache",
("old_space", 0x04add): "StringSplitCache",
("old_space", 0x04ee5): "RegExpMultipleCache",
("old_space", 0x052ed): "BuiltinsConstantsTable",
("old_space", 0x05715): "AsyncFunctionAwaitRejectSharedFun",
("old_space", 0x05739): "AsyncFunctionAwaitResolveSharedFun",
("old_space", 0x0575d): "AsyncGeneratorAwaitRejectSharedFun",
("old_space", 0x05781): "AsyncGeneratorAwaitResolveSharedFun",
("old_space", 0x057a5): "AsyncGeneratorYieldResolveSharedFun",
("old_space", 0x057c9): "AsyncGeneratorReturnResolveSharedFun",
("old_space", 0x057ed): "AsyncGeneratorReturnClosedRejectSharedFun",
("old_space", 0x05811): "AsyncGeneratorReturnClosedResolveSharedFun",
("old_space", 0x05835): "AsyncIteratorValueUnwrapSharedFun",
("old_space", 0x05859): "PromiseAllResolveElementSharedFun",
("old_space", 0x0587d): "PromiseAllSettledResolveElementSharedFun",
("old_space", 0x058a1): "PromiseAllSettledRejectElementSharedFun",
("old_space", 0x058c5): "PromiseAnyRejectElementSharedFun",
("old_space", 0x058e9): "PromiseCapabilityDefaultRejectSharedFun",
("old_space", 0x0590d): "PromiseCapabilityDefaultResolveSharedFun",
("old_space", 0x05931): "PromiseCatchFinallySharedFun",
("old_space", 0x05955): "PromiseGetCapabilitiesExecutorSharedFun",
("old_space", 0x05979): "PromiseThenFinallySharedFun",
("old_space", 0x0599d): "PromiseThrowerFinallySharedFun",
("old_space", 0x059c1): "PromiseValueThunkFinallySharedFun",
("old_space", 0x059e5): "ProxyRevokeSharedFun",
("old_space", 0x0422d): "ArgumentsIteratorAccessor",
("old_space", 0x04271): "ArrayLengthAccessor",
("old_space", 0x042b5): "BoundFunctionLengthAccessor",
("old_space", 0x042f9): "BoundFunctionNameAccessor",
("old_space", 0x0433d): "ErrorStackAccessor",
("old_space", 0x04381): "FunctionArgumentsAccessor",
("old_space", 0x043c5): "FunctionCallerAccessor",
("old_space", 0x04409): "FunctionNameAccessor",
("old_space", 0x0444d): "FunctionLengthAccessor",
("old_space", 0x04491): "FunctionPrototypeAccessor",
("old_space", 0x044d5): "StringLengthAccessor",
("old_space", 0x04519): "InvalidPrototypeValidityCell",
("old_space", 0x04521): "EmptyScript",
("old_space", 0x04561): "ManyClosuresCell",
("old_space", 0x0456d): "ArrayConstructorProtector",
("old_space", 0x04581): "NoElementsProtector",
("old_space", 0x04595): "MegaDOMProtector",
("old_space", 0x045a9): "IsConcatSpreadableProtector",
("old_space", 0x045bd): "ArraySpeciesProtector",
("old_space", 0x045d1): "TypedArraySpeciesProtector",
("old_space", 0x045e5): "PromiseSpeciesProtector",
("old_space", 0x045f9): "RegExpSpeciesProtector",
("old_space", 0x0460d): "StringLengthProtector",
("old_space", 0x04621): "ArrayIteratorProtector",
("old_space", 0x04635): "ArrayBufferDetachingProtector",
("old_space", 0x04649): "PromiseHookProtector",
("old_space", 0x0465d): "PromiseResolveProtector",
("old_space", 0x04671): "MapIteratorProtector",
("old_space", 0x04685): "PromiseThenProtector",
("old_space", 0x04699): "SetIteratorProtector",
("old_space", 0x046ad): "StringIteratorProtector",
("old_space", 0x046c1): "SingleCharacterStringCache",
("old_space", 0x04ac9): "StringSplitCache",
("old_space", 0x04ed1): "RegExpMultipleCache",
("old_space", 0x052d9): "BuiltinsConstantsTable",
("old_space", 0x05701): "AsyncFunctionAwaitRejectSharedFun",
("old_space", 0x05725): "AsyncFunctionAwaitResolveSharedFun",
("old_space", 0x05749): "AsyncGeneratorAwaitRejectSharedFun",
("old_space", 0x0576d): "AsyncGeneratorAwaitResolveSharedFun",
("old_space", 0x05791): "AsyncGeneratorYieldResolveSharedFun",
("old_space", 0x057b5): "AsyncGeneratorReturnResolveSharedFun",
("old_space", 0x057d9): "AsyncGeneratorReturnClosedRejectSharedFun",
("old_space", 0x057fd): "AsyncGeneratorReturnClosedResolveSharedFun",
("old_space", 0x05821): "AsyncIteratorValueUnwrapSharedFun",
("old_space", 0x05845): "PromiseAllResolveElementSharedFun",
("old_space", 0x05869): "PromiseAllSettledResolveElementSharedFun",
("old_space", 0x0588d): "PromiseAllSettledRejectElementSharedFun",
("old_space", 0x058b1): "PromiseAnyRejectElementSharedFun",
("old_space", 0x058d5): "PromiseCapabilityDefaultRejectSharedFun",
("old_space", 0x058f9): "PromiseCapabilityDefaultResolveSharedFun",
("old_space", 0x0591d): "PromiseCatchFinallySharedFun",
("old_space", 0x05941): "PromiseGetCapabilitiesExecutorSharedFun",
("old_space", 0x05965): "PromiseThenFinallySharedFun",
("old_space", 0x05989): "PromiseThrowerFinallySharedFun",
("old_space", 0x059ad): "PromiseValueThunkFinallySharedFun",
("old_space", 0x059d1): "ProxyRevokeSharedFun",
}
# Lower 32 bits of first page addresses for various heap spaces.