Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Unified Diff: test/mjsunit/stack-traces.js

Issue 2184193004: Handle missing scripts in CallSite.GetEvalOrigin (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Handle missing scripts in CallSite.GetEvalOrigin Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins/builtins-callsite.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+}
« no previous file with comments | « src/builtins/builtins-callsite.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698