Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! bootstrap: fixup Error.stackTraceLimit for user-land snapshot
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
joyeecheung and aduh95 authored Aug 17, 2022
commit 082f6656b958a834939124cc98590952a57d36a0
10 changes: 6 additions & 4 deletions lib/internal/main/mksnapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

const {
Error,
SafeSet,
SafeArrayIterator,
ObjectGetOwnPropertyDescriptor,
ObjectDefineProperty,
ObjectSetPrototypeOf
ObjectGetOwnPropertyDescriptor,
ObjectSetPrototypeOf,
SafeArrayIterator,
SafeSet,
} = primordials;

const binding = internalBinding('mksnapshot');
Expand Down Expand Up @@ -156,6 +156,8 @@ function main() {
stackTraceLimitDesc = ObjectGetOwnPropertyDescriptor(Error, 'stackTraceLimit');

if (stackTraceLimitDesc !== undefined) {
// We want to use null-prototype objects to not rely on globally mutable
// %Object.prototype%.
ObjectSetPrototypeOf(stackTraceLimitDesc, null);
Comment thread
joyeecheung marked this conversation as resolved.
process._rawDebug('Deleting Error.stackTraceLimit from the snapshot. ' +
'It will be re-installed after deserialization');
Expand Down