2013-08-07 09:43:25 +08:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
* vim: set ts=8 sts=4 et sw=4 tw=99:
|
2012-10-19 11:48:42 +08:00
|
|
|
* 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/. */
|
2012-08-28 02:41:49 +08:00
|
|
|
|
2013-10-30 21:55:19 +08:00
|
|
|
#ifndef jswrapper_h
|
|
|
|
#define jswrapper_h
|
2012-08-28 02:41:49 +08:00
|
|
|
|
|
|
|
#include "mozilla/Attributes.h"
|
|
|
|
|
|
|
|
#include "jsapi.h"
|
|
|
|
#include "jsproxy.h"
|
|
|
|
|
|
|
|
namespace js {
|
|
|
|
|
|
|
|
class DummyFrameGuard;
|
|
|
|
|
2012-10-19 11:48:42 +08:00
|
|
|
/*
|
2013-02-27 16:57:36 +08:00
|
|
|
* A wrapper is a proxy with a target object to which it generally forwards
|
|
|
|
* operations, but may restrict access to certain operations or instrument
|
|
|
|
* the trap operations in various ways. A wrapper is distinct from a Direct Proxy
|
|
|
|
* Handler in the sense that it can be "unwrapped" in C++, exposing the underlying
|
|
|
|
* object (Direct Proxy Handlers have an underlying target object, but don't
|
|
|
|
* expect to expose this object via any kind of unwrapping operation). Callers
|
|
|
|
* should be careful to avoid unwrapping security wrappers in the wrong context.
|
2012-08-28 02:41:49 +08:00
|
|
|
*/
|
2013-02-27 16:57:36 +08:00
|
|
|
class JS_FRIEND_API(Wrapper) : public DirectProxyHandler
|
2012-08-28 02:41:49 +08:00
|
|
|
{
|
|
|
|
unsigned mFlags;
|
2013-02-27 16:57:36 +08:00
|
|
|
bool mSafeToUnwrap;
|
2012-10-19 11:48:42 +08:00
|
|
|
|
2012-08-28 02:41:49 +08:00
|
|
|
public:
|
2013-06-27 16:06:05 +08:00
|
|
|
using BaseProxyHandler::Action;
|
2012-08-28 02:41:49 +08:00
|
|
|
|
2012-10-19 11:48:42 +08:00
|
|
|
enum Flags {
|
|
|
|
CROSS_COMPARTMENT = 1 << 0,
|
|
|
|
LAST_USED_FLAG = CROSS_COMPARTMENT
|
|
|
|
};
|
2012-08-28 02:41:49 +08:00
|
|
|
|
2013-02-27 16:57:36 +08:00
|
|
|
/*
|
|
|
|
* Wrappers can explicitly specify that they are unsafe to unwrap from a
|
|
|
|
* security perspective (as is the case for SecurityWrappers). If a wrapper
|
|
|
|
* is not safe to unwrap, operations requiring full access to the underlying
|
2013-08-07 09:43:25 +08:00
|
|
|
* object (via CheckedUnwrap) will throw. Otherwise, they will succeed.
|
2013-02-27 16:57:36 +08:00
|
|
|
*/
|
2013-04-10 11:19:43 +08:00
|
|
|
void setSafeToUnwrap(bool safe) { mSafeToUnwrap = safe; }
|
2013-08-07 09:43:25 +08:00
|
|
|
bool isSafeToUnwrap() { return mSafeToUnwrap; }
|
2012-10-19 11:48:42 +08:00
|
|
|
|
|
|
|
static JSObject *New(JSContext *cx, JSObject *obj, JSObject *proto,
|
|
|
|
JSObject *parent, Wrapper *handler);
|
|
|
|
|
2013-02-27 16:57:36 +08:00
|
|
|
static JSObject *Renew(JSContext *cx, JSObject *existing, JSObject *obj, Wrapper *handler);
|
|
|
|
|
2013-08-07 09:43:25 +08:00
|
|
|
static Wrapper *wrapperHandler(JSObject *wrapper);
|
2012-10-19 11:48:42 +08:00
|
|
|
|
2013-08-07 09:43:25 +08:00
|
|
|
static JSObject *wrappedObject(JSObject *wrapper);
|
2012-10-19 11:48:42 +08:00
|
|
|
|
|
|
|
unsigned flags() const {
|
|
|
|
return mFlags;
|
|
|
|
}
|
|
|
|
|
2013-02-27 16:57:36 +08:00
|
|
|
explicit Wrapper(unsigned flags, bool hasPrototype = false);
|
2012-10-19 11:48:42 +08:00
|
|
|
|
2013-02-27 16:57:36 +08:00
|
|
|
virtual ~Wrapper();
|
2012-10-19 11:48:42 +08:00
|
|
|
|
2013-02-27 16:57:36 +08:00
|
|
|
static Wrapper singleton;
|
|
|
|
static Wrapper singletonWithPrototype;
|
2012-08-28 02:41:49 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Base class for all cross compartment wrapper handlers. */
|
2013-02-27 16:57:36 +08:00
|
|
|
class JS_FRIEND_API(CrossCompartmentWrapper) : public Wrapper
|
2012-08-28 02:41:49 +08:00
|
|
|
{
|
|
|
|
public:
|
2012-10-31 10:33:43 +08:00
|
|
|
CrossCompartmentWrapper(unsigned flags, bool hasPrototype = false);
|
2012-08-28 02:41:49 +08:00
|
|
|
|
|
|
|
virtual ~CrossCompartmentWrapper();
|
|
|
|
|
2013-06-27 16:06:05 +08:00
|
|
|
virtual bool finalizeInBackground(Value priv) MOZ_OVERRIDE;
|
|
|
|
|
2012-08-28 02:41:49 +08:00
|
|
|
/* ES5 Harmony fundamental wrapper traps. */
|
2013-06-27 16:06:05 +08:00
|
|
|
virtual bool preventExtensions(JSContext *cx, HandleObject wrapper) MOZ_OVERRIDE;
|
|
|
|
virtual bool getPropertyDescriptor(JSContext *cx, HandleObject wrapper, HandleId id,
|
2013-04-10 11:19:43 +08:00
|
|
|
PropertyDescriptor *desc, unsigned flags) MOZ_OVERRIDE;
|
2013-06-27 16:06:05 +08:00
|
|
|
virtual bool getOwnPropertyDescriptor(JSContext *cx, HandleObject wrapper, HandleId id,
|
2013-04-10 11:19:43 +08:00
|
|
|
PropertyDescriptor *desc, unsigned flags) MOZ_OVERRIDE;
|
2013-06-27 16:06:05 +08:00
|
|
|
virtual bool defineProperty(JSContext *cx, HandleObject wrapper, HandleId id,
|
2012-08-28 02:41:49 +08:00
|
|
|
PropertyDescriptor *desc) MOZ_OVERRIDE;
|
2013-06-27 16:06:05 +08:00
|
|
|
virtual bool getOwnPropertyNames(JSContext *cx, HandleObject wrapper,
|
|
|
|
AutoIdVector &props) MOZ_OVERRIDE;
|
|
|
|
virtual bool delete_(JSContext *cx, HandleObject wrapper, HandleId id, bool *bp) MOZ_OVERRIDE;
|
|
|
|
virtual bool enumerate(JSContext *cx, HandleObject wrapper, AutoIdVector &props) MOZ_OVERRIDE;
|
2012-08-28 02:41:49 +08:00
|
|
|
|
|
|
|
/* ES5 Harmony derived wrapper traps. */
|
2013-06-27 16:06:05 +08:00
|
|
|
virtual bool has(JSContext *cx, HandleObject wrapper, HandleId id, bool *bp) MOZ_OVERRIDE;
|
|
|
|
virtual bool hasOwn(JSContext *cx, HandleObject wrapper, HandleId id, bool *bp) MOZ_OVERRIDE;
|
|
|
|
virtual bool get(JSContext *cx, HandleObject wrapper, HandleObject receiver,
|
|
|
|
HandleId id, MutableHandleValue vp) MOZ_OVERRIDE;
|
|
|
|
virtual bool set(JSContext *cx, HandleObject wrapper, HandleObject receiver,
|
|
|
|
HandleId id, bool strict, MutableHandleValue vp) MOZ_OVERRIDE;
|
|
|
|
virtual bool keys(JSContext *cx, HandleObject wrapper, AutoIdVector &props) MOZ_OVERRIDE;
|
|
|
|
virtual bool iterate(JSContext *cx, HandleObject wrapper, unsigned flags,
|
|
|
|
MutableHandleValue vp) MOZ_OVERRIDE;
|
2012-08-28 02:41:49 +08:00
|
|
|
|
|
|
|
/* Spidermonkey extensions. */
|
2013-10-30 21:55:19 +08:00
|
|
|
virtual bool isExtensible(JSContext *cx, HandleObject wrapper, bool *extensible) MOZ_OVERRIDE;
|
2013-08-07 09:43:25 +08:00
|
|
|
virtual bool call(JSContext *cx, HandleObject wrapper, const CallArgs &args) MOZ_OVERRIDE;
|
|
|
|
virtual bool construct(JSContext *cx, HandleObject wrapper, const CallArgs &args) MOZ_OVERRIDE;
|
2012-10-31 10:33:43 +08:00
|
|
|
virtual bool nativeCall(JSContext *cx, IsAcceptableThis test, NativeImpl impl,
|
|
|
|
CallArgs args) MOZ_OVERRIDE;
|
2013-06-27 16:06:05 +08:00
|
|
|
virtual bool hasInstance(JSContext *cx, HandleObject wrapper, MutableHandleValue v,
|
|
|
|
bool *bp) MOZ_OVERRIDE;
|
2013-08-07 09:43:25 +08:00
|
|
|
virtual const char *className(JSContext *cx, HandleObject proxy) MOZ_OVERRIDE;
|
2013-06-27 16:06:05 +08:00
|
|
|
virtual JSString *fun_toString(JSContext *cx, HandleObject wrapper,
|
|
|
|
unsigned indent) MOZ_OVERRIDE;
|
|
|
|
virtual bool regexp_toShared(JSContext *cx, HandleObject proxy, RegExpGuard *g) MOZ_OVERRIDE;
|
|
|
|
virtual bool defaultValue(JSContext *cx, HandleObject wrapper, JSType hint,
|
|
|
|
MutableHandleValue vp) MOZ_OVERRIDE;
|
|
|
|
virtual bool getPrototypeOf(JSContext *cx, HandleObject proxy, MutableHandleObject protop);
|
2012-08-28 02:41:49 +08:00
|
|
|
|
|
|
|
static CrossCompartmentWrapper singleton;
|
2012-10-31 10:33:43 +08:00
|
|
|
static CrossCompartmentWrapper singletonWithPrototype;
|
2012-08-28 02:41:49 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Base class for security wrappers. A security wrapper is potentially hiding
|
|
|
|
* all or part of some wrapped object thus SecurityWrapper defaults to denying
|
|
|
|
* access to the wrappee. This is the opposite of Wrapper which tries to be
|
|
|
|
* completely transparent.
|
|
|
|
*
|
|
|
|
* NB: Currently, only a few ProxyHandler operations are overridden to deny
|
|
|
|
* access, relying on derived SecurityWrapper to block access when necessary.
|
|
|
|
*/
|
|
|
|
template <class Base>
|
|
|
|
class JS_FRIEND_API(SecurityWrapper) : public Base
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SecurityWrapper(unsigned flags);
|
|
|
|
|
2013-10-30 21:55:19 +08:00
|
|
|
virtual bool isExtensible(JSContext *cx, HandleObject wrapper, bool *extensible) MOZ_OVERRIDE;
|
2013-06-27 16:06:05 +08:00
|
|
|
virtual bool preventExtensions(JSContext *cx, HandleObject wrapper) MOZ_OVERRIDE;
|
|
|
|
virtual bool enter(JSContext *cx, HandleObject wrapper, HandleId id, Wrapper::Action act,
|
2013-02-27 16:57:36 +08:00
|
|
|
bool *bp) MOZ_OVERRIDE;
|
2012-10-31 10:33:43 +08:00
|
|
|
virtual bool nativeCall(JSContext *cx, IsAcceptableThis test, NativeImpl impl,
|
|
|
|
CallArgs args) MOZ_OVERRIDE;
|
2013-08-07 09:43:25 +08:00
|
|
|
virtual bool defaultValue(JSContext *cx, HandleObject wrapper, JSType hint,
|
|
|
|
MutableHandleValue vp) MOZ_OVERRIDE;
|
2013-06-27 16:06:05 +08:00
|
|
|
virtual bool objectClassIs(HandleObject obj, ESClassValue classValue,
|
|
|
|
JSContext *cx) MOZ_OVERRIDE;
|
|
|
|
virtual bool regexp_toShared(JSContext *cx, HandleObject proxy, RegExpGuard *g) MOZ_OVERRIDE;
|
|
|
|
virtual bool defineProperty(JSContext *cx, HandleObject wrapper, HandleId id,
|
2013-05-22 17:31:07 +08:00
|
|
|
PropertyDescriptor *desc) MOZ_OVERRIDE;
|
2013-02-27 16:57:36 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Allow our subclasses to select the superclass behavior they want without
|
|
|
|
* needing to specify an exact superclass.
|
|
|
|
*/
|
|
|
|
typedef Base Permissive;
|
|
|
|
typedef SecurityWrapper<Base> Restrictive;
|
2012-08-28 02:41:49 +08:00
|
|
|
};
|
|
|
|
|
2013-02-27 16:57:36 +08:00
|
|
|
typedef SecurityWrapper<Wrapper> SameCompartmentSecurityWrapper;
|
2012-08-28 02:41:49 +08:00
|
|
|
typedef SecurityWrapper<CrossCompartmentWrapper> CrossCompartmentSecurityWrapper;
|
|
|
|
|
2012-10-19 11:48:42 +08:00
|
|
|
class JS_FRIEND_API(DeadObjectProxy) : public BaseProxyHandler
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static int sDeadObjectFamily;
|
|
|
|
|
|
|
|
explicit DeadObjectProxy();
|
|
|
|
|
|
|
|
/* ES5 Harmony fundamental wrapper traps. */
|
2013-06-27 16:06:05 +08:00
|
|
|
virtual bool preventExtensions(JSContext *cx, HandleObject proxy) MOZ_OVERRIDE;
|
|
|
|
virtual bool getPropertyDescriptor(JSContext *cx, HandleObject wrapper, HandleId id,
|
2013-04-10 11:19:43 +08:00
|
|
|
PropertyDescriptor *desc, unsigned flags) MOZ_OVERRIDE;
|
2013-06-27 16:06:05 +08:00
|
|
|
virtual bool getOwnPropertyDescriptor(JSContext *cx, HandleObject wrapper, HandleId id,
|
2013-04-10 11:19:43 +08:00
|
|
|
PropertyDescriptor *desc, unsigned flags) MOZ_OVERRIDE;
|
2013-06-27 16:06:05 +08:00
|
|
|
virtual bool defineProperty(JSContext *cx, HandleObject wrapper, HandleId id,
|
2012-10-19 11:48:42 +08:00
|
|
|
PropertyDescriptor *desc) MOZ_OVERRIDE;
|
2013-06-27 16:06:05 +08:00
|
|
|
virtual bool getOwnPropertyNames(JSContext *cx, HandleObject wrapper,
|
|
|
|
AutoIdVector &props) MOZ_OVERRIDE;
|
|
|
|
virtual bool delete_(JSContext *cx, HandleObject wrapper, HandleId id, bool *bp) MOZ_OVERRIDE;
|
|
|
|
virtual bool enumerate(JSContext *cx, HandleObject wrapper, AutoIdVector &props) MOZ_OVERRIDE;
|
2012-10-19 11:48:42 +08:00
|
|
|
|
|
|
|
/* Spidermonkey extensions. */
|
2013-10-30 21:55:19 +08:00
|
|
|
virtual bool isExtensible(JSContext *cx, HandleObject proxy, bool *extensible) MOZ_OVERRIDE;
|
2013-08-07 09:43:25 +08:00
|
|
|
virtual bool call(JSContext *cx, HandleObject proxy, const CallArgs &args) MOZ_OVERRIDE;
|
|
|
|
virtual bool construct(JSContext *cx, HandleObject proxy, const CallArgs &args) MOZ_OVERRIDE;
|
2012-10-31 10:33:43 +08:00
|
|
|
virtual bool nativeCall(JSContext *cx, IsAcceptableThis test, NativeImpl impl,
|
|
|
|
CallArgs args) MOZ_OVERRIDE;
|
2013-08-07 09:43:25 +08:00
|
|
|
virtual bool hasInstance(JSContext *cx, HandleObject proxy, MutableHandleValue v,
|
|
|
|
bool *bp) MOZ_OVERRIDE;
|
|
|
|
virtual bool objectClassIs(HandleObject obj, ESClassValue classValue,
|
|
|
|
JSContext *cx) MOZ_OVERRIDE;
|
|
|
|
virtual const char *className(JSContext *cx, HandleObject proxy) MOZ_OVERRIDE;
|
|
|
|
virtual JSString *fun_toString(JSContext *cx, HandleObject proxy, unsigned indent) MOZ_OVERRIDE;
|
|
|
|
virtual bool regexp_toShared(JSContext *cx, HandleObject proxy, RegExpGuard *g) MOZ_OVERRIDE;
|
|
|
|
virtual bool defaultValue(JSContext *cx, HandleObject obj, JSType hint,
|
|
|
|
MutableHandleValue vp) MOZ_OVERRIDE;
|
2013-06-27 16:06:05 +08:00
|
|
|
virtual bool getElementIfPresent(JSContext *cx, HandleObject obj, HandleObject receiver,
|
2013-08-07 09:43:25 +08:00
|
|
|
uint32_t index, MutableHandleValue vp,
|
|
|
|
bool *present) MOZ_OVERRIDE;
|
|
|
|
virtual bool getPrototypeOf(JSContext *cx, HandleObject proxy,
|
|
|
|
MutableHandleObject protop) MOZ_OVERRIDE;
|
2012-10-19 11:48:42 +08:00
|
|
|
|
|
|
|
static DeadObjectProxy singleton;
|
|
|
|
};
|
|
|
|
|
2012-08-28 02:41:49 +08:00
|
|
|
extern JSObject *
|
2013-08-07 09:43:25 +08:00
|
|
|
TransparentObjectWrapper(JSContext *cx, HandleObject existing, HandleObject obj,
|
|
|
|
HandleObject wrappedProto, HandleObject parent,
|
2012-08-28 02:41:49 +08:00
|
|
|
unsigned flags);
|
|
|
|
|
|
|
|
// Proxy family for wrappers. Public so that IsWrapper() can be fully inlined by
|
|
|
|
// jsfriendapi users.
|
|
|
|
extern JS_FRIEND_DATA(int) sWrapperFamily;
|
|
|
|
|
|
|
|
inline bool
|
2013-08-07 09:43:25 +08:00
|
|
|
IsWrapper(JSObject *obj)
|
2012-08-28 02:41:49 +08:00
|
|
|
{
|
|
|
|
return IsProxy(obj) && GetProxyHandler(obj)->family() == &sWrapperFamily;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Given a JSObject, returns that object stripped of wrappers. If
|
|
|
|
// stopAtOuter is true, then this returns the outer window if it was
|
|
|
|
// previously wrapped. Otherwise, this returns the first object for
|
|
|
|
// which JSObject::isWrapper returns false.
|
2012-10-19 11:48:42 +08:00
|
|
|
JS_FRIEND_API(JSObject *)
|
2013-08-07 09:43:25 +08:00
|
|
|
UncheckedUnwrap(JSObject *obj, bool stopAtOuter = true, unsigned *flagsp = NULL);
|
2012-08-28 02:41:49 +08:00
|
|
|
|
|
|
|
// Given a JSObject, returns that object stripped of wrappers. At each stage,
|
|
|
|
// the security wrapper has the opportunity to veto the unwrap. Since checked
|
|
|
|
// code should never be unwrapping outer window wrappers, we always stop at
|
|
|
|
// outer windows.
|
2012-10-19 11:48:42 +08:00
|
|
|
JS_FRIEND_API(JSObject *)
|
2013-08-07 09:43:25 +08:00
|
|
|
CheckedUnwrap(JSObject *obj, bool stopAtOuter = true);
|
2012-10-19 11:48:42 +08:00
|
|
|
|
2012-10-31 10:33:43 +08:00
|
|
|
// Unwrap only the outermost security wrapper, with the same semantics as
|
|
|
|
// above. This is the checked version of Wrapper::wrappedObject.
|
|
|
|
JS_FRIEND_API(JSObject *)
|
2013-08-07 09:43:25 +08:00
|
|
|
UnwrapOneChecked(JSObject *obj, bool stopAtOuter = true);
|
2012-10-31 10:33:43 +08:00
|
|
|
|
2012-10-19 11:48:42 +08:00
|
|
|
JS_FRIEND_API(bool)
|
2013-08-07 09:43:25 +08:00
|
|
|
IsCrossCompartmentWrapper(JSObject *obj);
|
2012-08-28 02:41:49 +08:00
|
|
|
|
2013-02-27 16:57:36 +08:00
|
|
|
bool
|
2013-08-07 09:43:25 +08:00
|
|
|
IsDeadProxyObject(JSObject *obj);
|
2013-02-27 16:57:36 +08:00
|
|
|
|
2012-10-19 11:48:42 +08:00
|
|
|
JSObject *
|
|
|
|
NewDeadProxyObject(JSContext *cx, JSObject *parent);
|
2012-08-28 02:41:49 +08:00
|
|
|
|
|
|
|
void
|
2013-01-09 13:42:21 +08:00
|
|
|
NukeCrossCompartmentWrapper(JSContext *cx, JSObject *wrapper);
|
2012-08-28 02:41:49 +08:00
|
|
|
|
2012-10-19 11:48:42 +08:00
|
|
|
bool
|
|
|
|
RemapWrapper(JSContext *cx, JSObject *wobj, JSObject *newTarget);
|
|
|
|
|
|
|
|
JS_FRIEND_API(bool)
|
|
|
|
RemapAllWrappersForObject(JSContext *cx, JSObject *oldTarget,
|
|
|
|
JSObject *newTarget);
|
|
|
|
|
|
|
|
// API to recompute all cross-compartment wrappers whose source and target
|
|
|
|
// match the given filters.
|
|
|
|
JS_FRIEND_API(bool)
|
|
|
|
RecomputeWrappers(JSContext *cx, const CompartmentFilter &sourceFilter,
|
|
|
|
const CompartmentFilter &targetFilter);
|
|
|
|
|
2013-02-27 16:57:36 +08:00
|
|
|
/*
|
|
|
|
* This auto class should be used around any code, such as brain transplants,
|
2013-05-22 17:31:07 +08:00
|
|
|
* that may touch dead zones. Brain transplants can cause problems
|
2013-02-27 16:57:36 +08:00
|
|
|
* because they operate on all compartments, whether live or dead. A brain
|
|
|
|
* transplant can cause a formerly dead object to be "reanimated" by causing a
|
|
|
|
* read or write barrier to be invoked on it during the transplant. In this way,
|
2013-05-22 17:31:07 +08:00
|
|
|
* a zone becomes a zombie, kept alive by repeatedly consuming
|
2013-02-27 16:57:36 +08:00
|
|
|
* (transplanted) brains.
|
|
|
|
*
|
|
|
|
* To work around this issue, we observe when mark bits are set on objects in
|
2013-05-22 17:31:07 +08:00
|
|
|
* dead zones. If this happens during a brain transplant, we do a full,
|
2013-02-27 16:57:36 +08:00
|
|
|
* non-incremental GC at the end of the brain transplant. This will clean up any
|
|
|
|
* objects that were improperly marked.
|
|
|
|
*/
|
2013-05-22 17:31:07 +08:00
|
|
|
struct JS_FRIEND_API(AutoMaybeTouchDeadZones)
|
2013-02-27 16:57:36 +08:00
|
|
|
{
|
|
|
|
// The version that takes an object just uses it for its runtime.
|
2013-05-22 17:31:07 +08:00
|
|
|
AutoMaybeTouchDeadZones(JSContext *cx);
|
|
|
|
AutoMaybeTouchDeadZones(JSObject *obj);
|
|
|
|
~AutoMaybeTouchDeadZones();
|
2013-02-27 16:57:36 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
JSRuntime *runtime;
|
|
|
|
unsigned markCount;
|
|
|
|
bool inIncremental;
|
2013-05-22 17:31:07 +08:00
|
|
|
bool manipulatingDeadZones;
|
2013-02-27 16:57:36 +08:00
|
|
|
};
|
|
|
|
|
2012-08-28 02:41:49 +08:00
|
|
|
} /* namespace js */
|
|
|
|
|
2013-10-30 21:55:19 +08:00
|
|
|
#endif /* jswrapper_h */
|