blob: b2d125aa42ab2f6a893761236aefc1f57d61d945 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// Test that SavedFrame instances are frozen and can't be messed with.
// Strict mode so that mutating frozen objects doesn't silently fail.
"use strict";
const s = saveStack();
load(libdir + 'asserts.js');
assertThrowsInstanceOf(() => s.source = "fake.url",
TypeError);
assertThrowsInstanceOf(() => {
Object.defineProperty(s.__proto__, "line", {
get: () => 0
})
}, TypeError);
|