зеркало из https://github.com/mozilla/gecko-dev.git
Fix for bug 778152 (Content window does not have an XMLHttpRequest property when accessed via an Xray wrapper in a subscript) - move some code. r=bz.
--HG-- extra : rebase_source : 524e537ee6c6b30fdb67cbced3dbb574de83be28
This commit is contained in:
Родитель
2d58c35ce6
Коммит
2f66678f37
|
@ -317,47 +317,12 @@ DestroyProtoAndIfaceCache(JSObject* obj)
|
|||
delete [] protoAndIfaceArray;
|
||||
}
|
||||
|
||||
struct ConstantSpec
|
||||
{
|
||||
const char* name;
|
||||
JS::Value value;
|
||||
};
|
||||
|
||||
/**
|
||||
* Add constants to an object.
|
||||
*/
|
||||
bool
|
||||
DefineConstants(JSContext* cx, JSObject* obj, ConstantSpec* cs);
|
||||
|
||||
template<typename T>
|
||||
struct Prefable {
|
||||
// A boolean indicating whether this set of specs is enabled
|
||||
bool enabled;
|
||||
// Array of specs, terminated in whatever way is customary for T.
|
||||
// Null to indicate a end-of-array for Prefable, when such an
|
||||
// indicator is needed.
|
||||
T* specs;
|
||||
};
|
||||
|
||||
struct NativeProperties
|
||||
{
|
||||
Prefable<JSFunctionSpec>* staticMethods;
|
||||
jsid* staticMethodIds;
|
||||
JSFunctionSpec* staticMethodsSpecs;
|
||||
Prefable<JSFunctionSpec>* methods;
|
||||
jsid* methodIds;
|
||||
JSFunctionSpec* methodsSpecs;
|
||||
Prefable<JSPropertySpec>* attributes;
|
||||
jsid* attributeIds;
|
||||
JSPropertySpec* attributeSpecs;
|
||||
Prefable<JSPropertySpec>* unforgeableAttributes;
|
||||
jsid* unforgeableAttributeIds;
|
||||
JSPropertySpec* unforgeableAttributeSpecs;
|
||||
Prefable<ConstantSpec>* constants;
|
||||
jsid* constantIds;
|
||||
ConstantSpec* constantSpecs;
|
||||
};
|
||||
|
||||
/*
|
||||
* Create a DOM interface object (if constructorClass is non-null) and/or a
|
||||
* DOM interface prototype object (if protoClass is non-null).
|
||||
|
|
|
@ -43,6 +43,41 @@ typedef bool
|
|||
(* EnumerateProperties)(JSContext* cx, JSObject* wrapper,
|
||||
JS::AutoIdVector& props);
|
||||
|
||||
struct ConstantSpec
|
||||
{
|
||||
const char* name;
|
||||
JS::Value value;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct Prefable {
|
||||
// A boolean indicating whether this set of specs is enabled
|
||||
bool enabled;
|
||||
// Array of specs, terminated in whatever way is customary for T.
|
||||
// Null to indicate a end-of-array for Prefable, when such an
|
||||
// indicator is needed.
|
||||
T* specs;
|
||||
};
|
||||
|
||||
struct NativeProperties
|
||||
{
|
||||
Prefable<JSFunctionSpec>* staticMethods;
|
||||
jsid* staticMethodIds;
|
||||
JSFunctionSpec* staticMethodsSpecs;
|
||||
Prefable<JSFunctionSpec>* methods;
|
||||
jsid* methodIds;
|
||||
JSFunctionSpec* methodsSpecs;
|
||||
Prefable<JSPropertySpec>* attributes;
|
||||
jsid* attributeIds;
|
||||
JSPropertySpec* attributeSpecs;
|
||||
Prefable<JSPropertySpec>* unforgeableAttributes;
|
||||
jsid* unforgeableAttributeIds;
|
||||
JSPropertySpec* unforgeableAttributeSpecs;
|
||||
Prefable<ConstantSpec>* constants;
|
||||
jsid* constantIds;
|
||||
ConstantSpec* constantSpecs;
|
||||
};
|
||||
|
||||
struct NativePropertyHooks
|
||||
{
|
||||
ResolveProperty mResolveOwnProperty;
|
||||
|
|
Загрузка…
Ссылка в новой задаче