Index: test/mjsunit/stack-traces.js |
diff --git a/test/mjsunit/stack-traces.js b/test/mjsunit/stack-traces.js |
index ddd387e7a944cbf7600b91ac75dc089fbcb613bb..2d770c2d36e8b1f4ede1e9b02ff30cb6aaea2476 100644 |
--- a/test/mjsunit/stack-traces.js |
+++ b/test/mjsunit/stack-traces.js |
@@ -400,3 +400,14 @@ assertThrows(() => Error.captureStackTrace(x)); |
var o = {}; |
Error.stackTraceLimit = "not a number"; |
Error.captureStackTrace(o); |
+ |
+// Check that we don't crash when a callsite's function's script is empty. |
+Error.prepareStackTrace = function(e, frames) { |
+ assertEquals(undefined, frames[0].getEvalOrigin()); |
+} |
+try { |
+ DataView(); |
+ assertUnreachable(); |
+} catch (e) { |
+ assertEquals(undefined, e.stack); |
+} |