[factory] Fully initialize StackFrameInfo for GC verifier safety

Factory::NewStackFrameInfo was leaving fields with the default
initialization to 'undefined' for fields marked as Smi type in base.tq.
Our heap verifier dutifully found and reported the discrepancy. This CL
initializes all fields of the struct to values compatible with the Torque
specification. In the future, this should probably be done automatically.

Change-Id: I30c2e2830300d9d84af663384dd7e0283ec39b77
Bug: chromium:965042
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1621928
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61679}
diff --git a/src/heap/factory.cc b/src/heap/factory.cc
index e4d9f05..3baa5fd 100644
--- a/src/heap/factory.cc
+++ b/src/heap/factory.cc
@@ -3743,9 +3743,9 @@
   stack_frame_info->set_line_number(0);
   stack_frame_info->set_column_number(0);
   stack_frame_info->set_script_id(0);
-  stack_frame_info->set_script_name(Smi::kZero);
-  stack_frame_info->set_script_name_or_source_url(Smi::kZero);
-  stack_frame_info->set_function_name(Smi::kZero);
+  stack_frame_info->set_script_name(*null_value());
+  stack_frame_info->set_script_name_or_source_url(*null_value());
+  stack_frame_info->set_function_name(*null_value());
   stack_frame_info->set_flag(0);
   return stack_frame_info;
 }
@@ -3755,8 +3755,7 @@
   FrameArrayIterator it(isolate(), frame_array, index);
   DCHECK(it.HasFrame());
 
-  Handle<StackFrameInfo> info = Handle<StackFrameInfo>::cast(
-      NewStruct(STACK_FRAME_INFO_TYPE, AllocationType::kYoung));
+  Handle<StackFrameInfo> info = NewStackFrameInfo();
   info->set_flag(0);
 
   const bool is_wasm = frame_array->IsAnyWasmFrame(index);