Debian Codegraph @

js/src/builtin/DisposableStackObject.h

raw
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 #ifndef builtin_DisposableStackObject_h
8 #define builtin_DisposableStackObject_h
9
10 #include "builtin/DisposableStackObjectBase.h"
11 #include "vm/JSObject.h"
12
13 namespace js {
14
15 class DisposableStackObject : public DisposableStackObjectBase {
16 public:
17 static const JSClass class_;
18 static const JSClass protoClass_;
19
20 static DisposableStackObject* create(
21 JSContext* cx, JS::Handle<JSObject*> proto,
22 JS::Handle<JS::Value> initialDisposeCapability =
23 JS::UndefinedHandleValue);
24
25 private:
26 static const ClassSpec classSpec_;
27 static const JSPropertySpec properties[];
28 static const JSFunctionSpec methods[];
29
30 static bool is(JS::Handle<JS::Value> val);
31 static bool finishInit(JSContext* cx, JS::Handle<JSObject*> ctor,
32 JS::Handle<JSObject*> proto);
33
34 static bool construct(JSContext* cx, unsigned argc, JS::Value* vp);
35 static bool use_impl(JSContext* cx, const JS::CallArgs& args);
36 static bool use(JSContext* cx, unsigned argc, JS::Value* vp);
37 static bool adopt_impl(JSContext* cx, const JS::CallArgs& args);
38 static bool adopt(JSContext* cx, unsigned argc, JS::Value* vp);
39 static bool defer_impl(JSContext* cx, const JS::CallArgs& args);
40 static bool defer(JSContext* cx, unsigned argc, JS::Value* vp);
41 static bool move_impl(JSContext* cx, const JS::CallArgs& args);
42 static bool move(JSContext* cx, unsigned argc, JS::Value* vp);
43 static bool disposed_impl(JSContext* cx, const JS::CallArgs& args);
44 static bool disposed(JSContext* cx, unsigned argc, JS::Value* vp);
45 };
46
47 } /* namespace js */
48
49 #endif /* builtin_DisposableStackObject_h */