Bug 1842773 - Part 5: Add ArrayBuffer.prototype.{maxByteLength,resizable} getters...
[gecko.git] / dom / indexedDB / ReportInternalError.h
blob08585e5258259b6af8a600794fa803c356e0c107
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/. */
7 #ifndef mozilla_dom_indexeddb_reportinternalerror_h__
8 #define mozilla_dom_indexeddb_reportinternalerror_h__
10 #include "nsDebug.h"
11 #include "nsPrintfCString.h"
13 #include "IndexedDatabase.h"
15 #define IDB_WARNING(...) \
16 do { \
17 nsPrintfCString s(__VA_ARGS__); \
18 mozilla::dom::indexedDB::ReportInternalError(__FILE__, __LINE__, s.get()); \
19 NS_WARNING(s.get()); \
20 } while (0)
22 #define IDB_REPORT_INTERNAL_ERR() \
23 mozilla::dom::indexedDB::ReportInternalError(__FILE__, __LINE__, "UnknownErr")
25 #define IDB_REPORT_INTERNAL_ERR_LAMBDA \
26 [](const auto&) { IDB_REPORT_INTERNAL_ERR(); }
28 namespace mozilla::dom::indexedDB {
30 MOZ_COLD void ReportInternalError(const char* aFile, uint32_t aLine,
31 const char* aStr);
33 } // namespace mozilla::dom::indexedDB
35 #endif // mozilla_dom_indexeddb_reportinternalerror_h__