Bug 1289050 - Part 5.1: Use ASCII variants of JS_ReportWarning in dom/canvas. r=jwalden,jgilbert

This commit is contained in:
Tooru Fujisawa 2016-09-30 12:34:45 +09:00
parent ba7a576409
commit 13783142a7
2 changed files with 7 additions and 3 deletions

View File

@ -2436,7 +2436,9 @@ CanvasRenderingContext2D::CreatePattern(const CanvasImageSource& aSource,
if (!srcSurf) {
JSContext* context = nsContentUtils::GetCurrentJSContext();
if (context) {
JS_ReportWarning(context, "CanvasRenderingContext2D.createPattern() failed to snapshot source canvas.");
JS_ReportWarningASCII(context,
"CanvasRenderingContext2D.createPattern()"
" failed to snapshot source canvas.");
}
aError.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
return nullptr;
@ -2467,7 +2469,9 @@ CanvasRenderingContext2D::CreatePattern(const CanvasImageSource& aSource,
if (!srcSurf) {
JSContext* context = nsContentUtils::GetCurrentJSContext();
if (context) {
JS_ReportWarning(context, "CanvasRenderingContext2D.createPattern() failed to prepare source ImageBitmap.");
JS_ReportWarningASCII(context,
"CanvasRenderingContext2D.createPattern()"
" failed to prepare source ImageBitmap.");
}
aError.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
return nullptr;

View File

@ -90,7 +90,7 @@ WebGLContext::GenerateWarning(const char* fmt, va_list ap)
}
JSContext* cx = api.cx();
JS_ReportWarning(cx, "WebGL: %s", buf);
JS_ReportWarningASCII(cx, "WebGL: %s", buf);
if (!ShouldGenerateWarnings()) {
JS_ReportWarningASCII(cx,
"WebGL: No further warnings will be reported for"