Bug 1289050 - Part 5: Use ASCII variant of JS_ReportWarning. r=jwalden
authorTooru Fujisawa <arai_a@mac.com>
Sun, 14 Aug 2016 20:39:29 +0900
changeset 315953 865b287375d7ef16ceb8092f18aa91ba625d1095
parent 315952 2abf8aadd55680cec8955d41a7aa69caef0b67b0
child 315954 99298ff4a2d2f7438f226b5b2d2f1cce07410743
push id20634
push usercbook@mozilla.com
push dateFri, 30 Sep 2016 10:10:13 +0000
treeherderfx-team@afe79b010d13 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwalden
bugs1289050
milestone52.0a1
Bug 1289050 - Part 5: Use ASCII variant of JS_ReportWarning. r=jwalden
dom/base/nsGlobalWindow.cpp
dom/canvas/WebGLContextUtils.cpp
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -11010,17 +11010,17 @@ nsGlobalWindow::ShowSlowScriptDialog()
   if (Preferences::GetBool("dom.always_stop_slow_scripts")) {
     return KillSlowScript;
   }
 
   // If it isn't safe to run script, then it isn't safe to bring up the prompt
   // (since that spins the event loop). In that (rare) case, we just kill the
   // script and report a warning.
   if (!nsContentUtils::IsSafeToRunScript()) {
-    JS_ReportWarning(cx, "A long running script was terminated");
+    JS_ReportWarningASCII(cx, "A long running script was terminated");
     return KillSlowScript;
   }
 
   // If our document is not active, just kill the script: we've been unloaded
   if (!AsInner()->HasActiveDocument()) {
     return KillSlowScript;
   }
 
--- a/dom/canvas/WebGLContextUtils.cpp
+++ b/dom/canvas/WebGLContextUtils.cpp
@@ -87,20 +87,21 @@ WebGLContext::GenerateWarning(const char
     dom::AutoJSAPI api;
     if (!api.Init(mCanvasElement->OwnerDoc()->GetScopeObject())) {
         return;
     }
 
     JSContext* cx = api.cx();
     JS_ReportWarning(cx, "WebGL: %s", buf);
     if (!ShouldGenerateWarnings()) {
-        JS_ReportWarning(cx,
-                         "WebGL: No further warnings will be reported for this"
-                         " WebGL context. (already reported %d warnings)",
-                         mAlreadyGeneratedWarnings);
+        JS_ReportWarningASCII(cx,
+                              "WebGL: No further warnings will be reported for"
+                              " this WebGL context."
+                              " (already reported %d warnings)",
+                              mAlreadyGeneratedWarnings);
     }
 }
 
 bool
 WebGLContext::ShouldGenerateWarnings() const
 {
     if (mMaxWarnings == -1)
         return true;