Bug 1473870 [wpt PR 11496] - Update webidl2 to v13.0.3, a=testonly
[gecko.git] / storage / mozStorageStatementRow.h
blob1343827b95209425005164d1a46b026b4937b340
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
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 MOZSTORAGESTATEMENTROW_H
8 #define MOZSTORAGESTATEMENTROW_H
10 #include "mozilla/Attributes.h"
11 #include "mozilla/ErrorResult.h"
12 #include "nsPIDOMWindow.h"
13 #include "nsWrapperCache.h"
15 namespace mozilla {
16 namespace storage {
18 class Statement;
20 class StatementRow final : public nsISupports
21 , public nsWrapperCache
23 public:
24 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
25 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(StatementRow)
27 explicit StatementRow(nsPIDOMWindowInner* aWindow, Statement *aStatement);
29 void NamedGetter(JSContext* aCx,
30 const nsAString& aName,
31 bool& aFound,
32 JS::MutableHandle<JS::Value> aResult,
33 mozilla::ErrorResult& aRv);
34 void GetSupportedNames(nsTArray<nsString>& aNames);
36 JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
38 nsPIDOMWindowInner* GetParentObject() const
40 return mWindow;
43 private:
44 ~StatementRow() {}
46 nsCOMPtr<nsPIDOMWindowInner> mWindow;
47 Statement *mStatement;
49 friend class StatementRowHolder;
52 } // namespace storage
53 } // namespace mozilla
55 #endif /* MOZSTORAGESTATEMENTROW_H */