Bug 1530641: Use hasScript() to check if a script exists; r=bhackett
authorBenjamin Bouvier <benj@benj.me>
Tue, 26 Feb 2019 14:45:18 +0000
changeset 519050 fb90471fe73746e4a508b540c9860380a5e99691
parent 519049 deb6826900252a703b5211a6dbd29cad21b009e3
child 519051 68e3a5f4e4e3e352ae3e3c8ed57fd5f59eff14cb
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhackett
bugs1530641
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1530641: Use hasScript() to check if a script exists; r=bhackett Differential Revision: https://phabricator.services.mozilla.com/D21219
js/src/jsexn.cpp
--- a/js/src/jsexn.cpp
+++ b/js/src/jsexn.cpp
@@ -954,17 +954,17 @@ bool ErrorReport::populateUncaughtExcept
   // XXXbz this assumes the stack we have right now is still
   // related to our exception object.  It would be better if we
   // could accept a passed-in stack of some sort instead.
   NonBuiltinFrameIter iter(cx, cx->realm()->principals());
   if (!iter.done()) {
     ownedReport.filename = iter.filename();
     uint32_t column;
     ownedReport.sourceId =
-      iter.script() ? iter.script()->scriptSource()->id() : 0;
+      iter.hasScript() ? iter.script()->scriptSource()->id() : 0;
     ownedReport.lineno = iter.computeLine(&column);
     ownedReport.column = FixupColumnForDisplay(column);
     ownedReport.isMuted = iter.mutedErrors();
   }
 
   if (!ExpandErrorArgumentsVA(cx, GetErrorMessage, nullptr,
                               JSMSG_UNCAUGHT_EXCEPTION, nullptr,
                               ArgumentsAreUTF8, &ownedReport, ap)) {