Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
michael@0 | 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* vim: set ts=2 et sw=2 tw=80: */ |
michael@0 | 3 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #include "ReportInternalError.h" |
michael@0 | 8 | |
michael@0 | 9 | #include "mozilla/IntegerPrintfMacros.h" |
michael@0 | 10 | |
michael@0 | 11 | #include "nsContentUtils.h" |
michael@0 | 12 | #include "nsPrintfCString.h" |
michael@0 | 13 | |
michael@0 | 14 | BEGIN_INDEXEDDB_NAMESPACE |
michael@0 | 15 | |
michael@0 | 16 | void |
michael@0 | 17 | ReportInternalError(const char* aFile, uint32_t aLine, const char* aStr) |
michael@0 | 18 | { |
michael@0 | 19 | // Get leaf of file path |
michael@0 | 20 | for (const char* p = aFile; *p; ++p) { |
michael@0 | 21 | if (*p == '/' && *(p + 1)) { |
michael@0 | 22 | aFile = p + 1; |
michael@0 | 23 | } |
michael@0 | 24 | } |
michael@0 | 25 | |
michael@0 | 26 | nsContentUtils::LogSimpleConsoleError( |
michael@0 | 27 | NS_ConvertUTF8toUTF16(nsPrintfCString( |
michael@0 | 28 | "IndexedDB %s: %s:%lu", aStr, aFile, aLine)), |
michael@0 | 29 | "indexedDB"); |
michael@0 | 30 | } |
michael@0 | 31 | |
michael@0 | 32 | END_INDEXEDDB_NAMESPACE |