Bug 1271653 - Quick fix for an unhelpful error message;r=me
authorEddy Bruel <ejpbruel@mozilla.com>
Wed, 01 Jun 2016 11:57:53 +0200
changeset 340944 a8a0e8aaffd0ce304be9970ef10b4ba7bd76b57f
parent 340943 53a8889c2af3b3970b28bfc4052f91839476852a
child 340945 229098e946458eb5587ef80faa1fe2fa83139b01
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1271653
milestone49.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 1271653 - Quick fix for an unhelpful error message;r=me
js/src/vm/Debugger.cpp
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -407,17 +407,17 @@ NukeDebuggerWrapper(NativeObject *wrappe
 }
 
 static bool
 ValueToStableChars(JSContext* cx, const char *fnname, HandleValue value,
                    AutoStableStringChars& stableChars)
 {
     if (!value.isString()) {
         JS_ReportErrorNumber(cx, GetErrorMessage, nullptr, JSMSG_NOT_EXPECTED_TYPE,
-                             fnname, "string", "string");
+                             fnname, "string", InformalValueType(value));
         return false;
     }
     RootedLinearString linear(cx, value.toString()->ensureLinear(cx));
     if (!linear)
         return false;
     if (!stableChars.initTwoByte(cx, linear))
         return false;
     return true;