tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

AsyncDisposableStackObject.h (1826B)


      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_AsyncDisposableStackObject_h
      8 #define builtin_AsyncDisposableStackObject_h
      9 
     10 #include "builtin/DisposableStackObjectBase.h"
     11 #include "vm/JSObject.h"
     12 
     13 namespace js {
     14 
     15 class AsyncDisposableStackObject : public DisposableStackObjectBase {
     16 public:
     17  static const JSClass class_;
     18  static const JSClass protoClass_;
     19 
     20  static AsyncDisposableStackObject* 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 
     32  static bool construct(JSContext* cx, unsigned argc, JS::Value* vp);
     33  static bool use_impl(JSContext* cx, const JS::CallArgs& args);
     34  static bool use(JSContext* cx, unsigned argc, JS::Value* vp);
     35  static bool disposed_impl(JSContext* cx, const JS::CallArgs& args);
     36  static bool disposed(JSContext* cx, unsigned argc, JS::Value* vp);
     37  static bool move_impl(JSContext* cx, const JS::CallArgs& args);
     38  static bool move(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 adopt_impl(JSContext* cx, const JS::CallArgs& args);
     42  static bool adopt(JSContext* cx, unsigned argc, JS::Value* vp);
     43 };
     44 
     45 } /* namespace js */
     46 
     47 #endif /* builtin_AsyncDisposableStackObject_h */