Skip to content

Commit

Permalink
print stacktrace along with warning
Browse files Browse the repository at this point in the history
  • Loading branch information
khrj committed Nov 24, 2022
1 parent 8c9486f commit f8d5177
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cli/tests/testdata/run/proto_exploit.js.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Before: [object Object]
Prototype access via __proto__ attempted; __proto__ is not implemented in Deno due to security reasons. Use Object.setPrototypeOf instead.
Error: Prototype access via __proto__ attempted; __proto__ is not implemented in Deno due to security reasons. Use Object.setPrototypeOf instead.
[WILDCARD]
After: [object Object]
4 changes: 3 additions & 1 deletion runtime/js/99_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ delete Intl.v8BreakIterator;
},
set(_) {
console.warn(
"Prototype access via __proto__ attempted; __proto__ is not implemented in Deno due to security reasons. Use Object.setPrototypeOf instead.",
new Error(
"Prototype access via __proto__ attempted; __proto__ is not implemented in Deno due to security reasons. Use Object.setPrototypeOf instead.",
),
);
},
});
Expand Down

0 comments on commit f8d5177

Please sign in to comment.