Bug 1226235 - Print file and line info for failing assert in self-hosted code. r=efaust
authorTill Schneidereit <till@tillschneidereit.net>
Thu, 19 Nov 2015 22:25:20 +0100
changeset 273410 e9872e15ca295d82c2cf5e0e725c666b4a670c83
parent 273409 c18e0cc2b208f94b5ee77437049156d928fef334
child 273411 573dc2cff61a8286dffb6492b6a462cdc6e9817b
push id29702
push usercbook@mozilla.com
push dateFri, 20 Nov 2015 12:13:22 +0000
treeherdermozilla-central@ec628289d8b4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersefaust
bugs1226235
milestone45.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 1226235 - Print file and line info for failing assert in self-hosted code. r=efaust
js/src/builtin/Utilities.js
--- a/js/src/builtin/Utilities.js
+++ b/js/src/builtin/Utilities.js
@@ -22,17 +22,17 @@
          JSMSG_EMPTY_ARRAY_REDUCE: false, JSMSG_CANT_CONVERT_TO: false,
 */
 
 #include "SelfHostingDefines.h"
 
 // Assertions, defined here instead of in the header above to make `assert`
 // invisible to C++.
 #ifdef DEBUG
-#define assert(b, info) if (!(b)) AssertionFailed(info)
+#define assert(b, info) if (!(b)) AssertionFailed(__FILE__ + ":" + __LINE__ + ": " + info)
 #else
 #define assert(b, info) // Elided assertion.
 #endif
 
 // All C++-implemented standard builtins library functions used in self-hosted
 // code are installed via the std_functions JSFunctionSpec[] in
 // SelfHosting.cpp.
 //