GeezerVison is showing github.com — lib: the REPL should survive deletion of Array.prototype methods · nodejs/node@c96e5cb
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: lib/domain.js +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -40,6 +40,7 @@ const { |
40 | 40 | ReflectApply, |
41 | 41 | SafeMap, |
42 | 42 | SafeWeakMap, |
| 43 | + StringPrototypeRepeat, |
43 | 44 | Symbol, |
44 | 45 | } = primordials; |
45 | 46 |
|
@@ -131,7 +132,7 @@ const domainRequireStack = new Error('require(`domain`) at this point').stack; |
131 | 132 | const { setUncaughtExceptionCaptureCallback } = process; |
132 | 133 | process.setUncaughtExceptionCaptureCallback = function(fn) { |
133 | 134 | const err = new ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE(); |
134 | | - err.stack = err.stack + '\n' + '-'.repeat(40) + '\n' + domainRequireStack; |
| 135 | + err.stack += `\n${StringPrototypeRepeat('-', 40)}\n${domainRequireStack}`; |
135 | 136 | throw err; |
136 | 137 | }; |
137 | 138 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: lib/repl.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1528,15 +1528,15 @@ function complete(line, callback) { |
1528 | 1528 | let p; |
1529 | 1529 | if ((typeof obj === 'object' && obj !== null) || |
1530 | 1530 | typeof obj === 'function') { |
1531 | | - memberGroups.push(filteredOwnPropertyNames(obj)); |
| 1531 | + ArrayPrototypePush(memberGroups, filteredOwnPropertyNames(obj)); |
1532 | 1532 | p = ObjectGetPrototypeOf(obj); |
1533 | 1533 | } else { |
1534 | 1534 | p = obj.constructor ? obj.constructor.prototype : null; |
1535 | 1535 | } |
1536 | 1536 | // Circular refs possible? Let's guard against that. |
1537 | 1537 | let sentinel = 5; |
1538 | 1538 | while (p !== null && sentinel-- !== 0) { |
1539 | | - memberGroups.push(filteredOwnPropertyNames(p)); |
| 1539 | + ArrayPrototypePush(memberGroups, filteredOwnPropertyNames(p)); |
1540 | 1540 | p = ObjectGetPrototypeOf(p); |
1541 | 1541 | } |
1542 | 1542 | } catch { |
|