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

Unified Diff: src/messages.js

Issue 1164933005: Check for null and undefined when getting type name for stack trace. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | test/mjsunit/regress/regress-3718.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/messages.js
diff --git a/src/messages.js b/src/messages.js
index 8d79dac43225931eb1800bde5f2b54feead2f92b..727efc4f0a8aa859018664b215cc69b76869564f 100644
--- a/src/messages.js
+++ b/src/messages.js
@@ -849,6 +849,7 @@ function FormatStackTrace(obj, raw_stack) {
function GetTypeName(receiver, requireConstructor) {
+ if (IS_NULL_OR_UNDEFINED(receiver)) return null;
var constructor = receiver.constructor;
if (!constructor) {
return requireConstructor ? null :
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-3718.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698