Skip to content

Instantly share code, notes, and snippets.

@progfay
Last active November 16, 2025 01:10
Show Gist options
  • Select an option

  • Save progfay/4d0a79eee4483ac34937a0e8af106acc to your computer and use it in GitHub Desktop.

Select an option

Save progfay/4d0a79eee4483ac34937a0e8af106acc to your computer and use it in GitHub Desktop.

Error.prototype.stack の今と未来

私たちが普段の開発で何気なく見ている Error の stack trace は実は標準化されていません。 このトークでは Error.prototype.stack について、各 JavaScript Runtime の実装と、これを標準化しようとする動きを紹介します。

https://jsconf.jp/2025/en/talks/error-prototype-stack

資料: https://speakerdeck.com/progfay/error-dot-prototype-dot-stack-nojin-towei-lai

資料内リンク集

MDN

V8

Node.js

JSC

Bun

SpiderMonkey

TC39

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<textarea readonly id="output" rows="10" cols="100"></textarea>
<script src="./index.js"></script>
</body>
</html>
function foo() {
bar();
}
function bar() {
baz();
}
function baz() {
const e = new Error("This is error message");
if (typeof window === "undefined") {
console.log(e.stack);
} else {
document.getElementById("output").value = e.stack;
}
}
foo();

Comments are disabled for this gist.