/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* 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/. */
/** * JS::EnvironmentChain stores a list of objects to put on the environment * chain. * * Internally the engine will create a non-syntactic 'with' environment for each * of these objects. Note that 'with' environments aren't optimized well so you * should use this class only if you really have to. * * The SupportUnscopables enum class controls whether these non-syntactic 'with' * environments support Symbol.unscopables similar to syntactic 'with' * statements in JS. * * Passing SupportUnscopables::No is better for performance because it lets us * skip the Symbol.unscopables property lookup. Some Web APIs require supporting * Symbol.unscopables though. In Firefox, SupportUnscopables::Yes is used for * event handlers.
*/ class MOZ_RAII JS_PUBLIC_API EnvironmentChain {
JS::RootedObjectVector chain_;
SupportUnscopables supportUnscopables_;
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 und die Messung sind noch experimentell.