/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
/** * Proxy handler for observable array exotic object. * * The indexed properties are stored in the backing list object in reserved slot * of the proxy object with special treatment intact. * * The additional properties are stored in the proxy target object.
*/
class ObservableArrayProxyHandler : public js::ForwardingProxyHandler { public: explicit constexpr ObservableArrayProxyHandler()
: js::ForwardingProxyHandler(&family) {}
// Implementations of methods that can be implemented in terms of // other lower-level methods. bool defineProperty(JSContext* aCx, JS::Handle<JSObject*> aProxy,
JS::Handle<JS::PropertyKey> aId,
JS::Handle<JS::PropertyDescriptor> aDesc,
JS::ObjectOpResult& aResult) const override;
// Hook for subclasses to invoke the setting the indexed value steps which // would invoke DeleteAlgorithm/SetAlgorithm defined and implemented per // interface. Returns false and throw exception on failure. virtualbool SetIndexedValue(JSContext* aCx, JS::Handle<JSObject*> aProxy,
JS::Handle<JSObject*> aBackingList,
uint32_t aIndex, JS::Handle<JS::Value> aValue,
JS::ObjectOpResult& aResult) const = 0;
// Hook for subclasses to invoke the DeleteAlgorithm defined and implemented // per interface. Returns false and throw exception on failure. virtualbool OnDeleteItem(JSContext* aCx, JS::Handle<JSObject*> aProxy,
JS::Handle<JS::Value> aValue,
uint32_t aIndex) const = 0;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.