/src/mozilla-central/dom/indexedDB/ReportInternalError.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* vim: set ts=8 sts=2 et sw=2 tw=80: */ |
3 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
4 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
5 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | #include "ReportInternalError.h" |
8 | | |
9 | | #include "mozilla/IntegerPrintfMacros.h" |
10 | | |
11 | | #include "nsContentUtils.h" |
12 | | #include "nsPrintfCString.h" |
13 | | |
14 | | namespace mozilla { |
15 | | namespace dom { |
16 | | namespace indexedDB { |
17 | | |
18 | | void |
19 | | ReportInternalError(const char* aFile, uint32_t aLine, const char* aStr) |
20 | 0 | { |
21 | 0 | // Get leaf of file path |
22 | 0 | for (const char* p = aFile; *p; ++p) { |
23 | 0 | if (*p == '/' && *(p + 1)) { |
24 | 0 | aFile = p + 1; |
25 | 0 | } |
26 | 0 | } |
27 | 0 |
|
28 | 0 | nsContentUtils::LogSimpleConsoleError( |
29 | 0 | NS_ConvertUTF8toUTF16(nsPrintfCString( |
30 | 0 | "IndexedDB %s: %s:%" PRIu32, aStr, aFile, aLine)), |
31 | 0 | "indexedDB", false /* no IDB in private window */); |
32 | 0 | } |
33 | | |
34 | | } // namespace indexedDB |
35 | | } // namespace dom |
36 | | } // namespace mozilla |