Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv

The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp.  The
rest of this diff was generated by running the following commands:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
This commit is contained in:
Boris Zbarsky 2015-03-19 10:13:33 -04:00
parent b97b658efd
commit 988b8e01be
933 changed files with 1577 additions and 1572 deletions

View File

@ -25,9 +25,9 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(Activity, DOMRequest)
NS_IMPL_CYCLE_COLLECTION_TRACE_END
/* virtual */ JSObject*
Activity::WrapObject(JSContext* aCx)
Activity::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return MozActivityBinding::Wrap(aCx, this);
return MozActivityBinding::Wrap(aCx, this, aGivenProto);
}
nsresult

View File

@ -21,7 +21,7 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(Activity, DOMRequest)
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
static already_AddRefed<Activity>
Constructor(const GlobalObject& aOwner,

View File

@ -66,9 +66,9 @@ NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(Animation, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(Animation, Release)
JSObject*
Animation::WrapObject(JSContext* aCx)
Animation::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return AnimationBinding::Wrap(aCx, this);
return AnimationBinding::Wrap(aCx, this, aGivenProto);
}
already_AddRefed<AnimationEffect>

View File

@ -189,7 +189,7 @@ public:
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(Animation)
nsIDocument* GetParentObject() const { return mDocument; }
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
// FIXME: If we succeed in moving transition-specific code to a type of
// AnimationEffect (as per the Web Animations API) we should remove these

View File

@ -15,9 +15,9 @@ NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(AnimationEffect, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(AnimationEffect, Release)
JSObject*
AnimationEffect::WrapObject(JSContext* aCx)
AnimationEffect::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return AnimationEffectBinding::Wrap(aCx, this);
return AnimationEffectBinding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom

View File

@ -27,7 +27,7 @@ public:
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(AnimationEffect)
Animation* GetParentObject() const { return mAnimation; }
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
// AnimationEffect interface
void GetName(nsString& aRetVal) const {

View File

@ -26,9 +26,9 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(AnimationPlayer)
NS_INTERFACE_MAP_END
JSObject*
AnimationPlayer::WrapObject(JSContext* aCx)
AnimationPlayer::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return dom::AnimationPlayerBinding::Wrap(aCx, this);
return dom::AnimationPlayerBinding::Wrap(aCx, this, aGivenProto);
}
void

View File

@ -64,7 +64,7 @@ public:
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(AnimationPlayer)
AnimationTimeline* GetParentObject() const { return mTimeline; }
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
virtual CSSAnimationPlayer* AsCSSAnimationPlayer() { return nullptr; }
virtual CSSTransitionPlayer* AsCSSTransitionPlayer() { return nullptr; }

View File

@ -21,9 +21,9 @@ NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(AnimationTimeline, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(AnimationTimeline, Release)
JSObject*
AnimationTimeline::WrapObject(JSContext* aCx)
AnimationTimeline::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return AnimationTimelineBinding::Wrap(aCx, this);
return AnimationTimelineBinding::Wrap(aCx, this, aGivenProto);
}
Nullable<TimeDuration>

View File

@ -41,7 +41,7 @@ public:
{
return mWindow;
}
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
// AnimationTimeline methods
Nullable<TimeDuration> GetCurrentTime() const;

View File

@ -61,9 +61,9 @@ ArchiveReader::~ArchiveReader()
}
/* virtual */ JSObject*
ArchiveReader::WrapObject(JSContext* aCx)
ArchiveReader::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return ArchiveReaderBinding::Wrap(aCx, this);
return ArchiveReaderBinding::Wrap(aCx, this, aGivenProto);
}
nsresult

View File

@ -51,7 +51,7 @@ public:
return mWindow;
}
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
already_AddRefed<ArchiveRequest> GetFilenames();
already_AddRefed<ArchiveRequest> GetFile(const nsAString& filename);

View File

@ -77,9 +77,9 @@ ArchiveRequest::PreHandleEvent(EventChainPreVisitor& aVisitor)
}
/* virtual */ JSObject*
ArchiveRequest::WrapObject(JSContext* aCx)
ArchiveRequest::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return ArchiveRequestBinding::Wrap(aCx, this);
return ArchiveRequestBinding::Wrap(aCx, this, aGivenProto);
}
ArchiveReader*

View File

@ -26,7 +26,7 @@ BEGIN_ARCHIVEREADER_NAMESPACE
class ArchiveRequest : public mozilla::dom::DOMRequest
{
public:
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
ArchiveReader* Reader() const;

View File

@ -384,9 +384,9 @@ Attr::Shutdown()
}
JSObject*
Attr::WrapNode(JSContext* aCx)
Attr::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return AttrBinding::Wrap(aCx, this);
return AttrBinding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom

View File

@ -82,7 +82,7 @@ public:
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
// WebIDL
virtual JSObject* WrapNode(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
// XPCOM GetName() is OK
// XPCOM GetValue() is OK

View File

@ -34,9 +34,9 @@ BarProp::GetParentObject() const
}
JSObject*
BarProp::WrapObject(JSContext* aCx)
BarProp::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return BarPropBinding::Wrap(aCx, this);
return BarPropBinding::Wrap(aCx, this, aGivenProto);
}
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(BarProp, mDOMWindow)

View File

@ -40,7 +40,7 @@ public:
nsPIDOMWindow* GetParentObject() const;
virtual JSObject*
WrapObject(JSContext* aCx) MOZ_OVERRIDE;
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
virtual bool GetVisible(ErrorResult& aRv) = 0;
virtual void SetVisible(bool aVisible, ErrorResult& aRv) = 0;

View File

@ -74,9 +74,9 @@ Comment::Constructor(const GlobalObject& aGlobal,
}
JSObject*
Comment::WrapNode(JSContext *aCx)
Comment::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
{
return CommentBinding::Wrap(aCx, this);
return CommentBinding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom

View File

@ -72,7 +72,7 @@ public:
ErrorResult& aRv);
protected:
virtual JSObject* WrapNode(JSContext *aCx) MOZ_OVERRIDE;
virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
};
} // namespace dom

View File

@ -722,9 +722,9 @@ Console::Observe(nsISupports* aSubject, const char* aTopic,
}
JSObject*
Console::WrapObject(JSContext* aCx)
Console::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return ConsoleBinding::Wrap(aCx, this);
return ConsoleBinding::Wrap(aCx, this, aGivenProto);
}
#define METHOD(name, string) \

View File

@ -44,7 +44,7 @@ public:
}
virtual JSObject*
WrapObject(JSContext* aCx) MOZ_OVERRIDE;
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
void
Log(JSContext* aCx, const Sequence<JS::Value>& aData);

View File

@ -46,9 +46,9 @@ Crypto::Init(nsIGlobalObject* aParent)
}
/* virtual */ JSObject*
Crypto::WrapObject(JSContext* aCx)
Crypto::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return CryptoBinding::Wrap(aCx, this);
return CryptoBinding::Wrap(aCx, this, aGivenProto);
}
void

View File

@ -50,7 +50,7 @@ public:
}
virtual JSObject*
WrapObject(JSContext* aCx) MOZ_OVERRIDE;
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
static uint8_t*
GetRandomValues(uint32_t aLength);

View File

@ -76,9 +76,9 @@ DOMCursor::Continue(ErrorResult& aRv)
}
/* virtual */ JSObject*
DOMCursor::WrapObject(JSContext* aCx)
DOMCursor::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return DOMCursorBinding::Wrap(aCx, this);
return DOMCursorBinding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom

View File

@ -27,7 +27,7 @@ public:
DOMCursor(nsPIDOMWindow* aWindow, nsICursorContinueCallback *aCallback);
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
bool Done() const
{

View File

@ -55,9 +55,9 @@ DOMError::~DOMError()
}
JSObject*
DOMError::WrapObject(JSContext* aCx)
DOMError::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return DOMErrorBinding::Wrap(aCx, this);
return DOMErrorBinding::Wrap(aCx, this, aGivenProto);
}
/* static */ already_AddRefed<DOMError>

View File

@ -59,7 +59,7 @@ public:
}
virtual JSObject*
WrapObject(JSContext* aCx) MOZ_OVERRIDE;
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
static already_AddRefed<DOMError>
Constructor(const GlobalObject& global, const nsAString& name,

View File

@ -490,9 +490,9 @@ Exception::Initialize(const nsACString& aMessage, nsresult aResult,
}
JSObject*
Exception::WrapObject(JSContext* cx)
Exception::WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto)
{
return ExceptionBinding::Wrap(cx, this);
return ExceptionBinding::Wrap(cx, this, aGivenProto);
}
void
@ -706,9 +706,9 @@ DOMException::Constructor(GlobalObject& /* unused */,
}
JSObject*
DOMException::WrapObject(JSContext* aCx)
DOMException::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return DOMExceptionBinding::Wrap(aCx, this);
return DOMExceptionBinding::Wrap(aCx, this, aGivenProto);
}
/* static */already_AddRefed<DOMException>

View File

@ -63,7 +63,7 @@ public:
void StowJSVal(JS::Value& aVp);
// WebIDL API
virtual JSObject* WrapObject(JSContext* cx)
virtual JSObject* WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto)
MOZ_OVERRIDE;
nsISupports* GetParentObject() const { return nullptr; }
@ -136,7 +136,7 @@ public:
NS_IMETHOD ToString(nsACString& aReturn) MOZ_OVERRIDE;
// nsWrapperCache overrides
virtual JSObject* WrapObject(JSContext* aCx)
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
MOZ_OVERRIDE;
static already_AddRefed<DOMException>

View File

@ -29,9 +29,9 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(DOMImplementation)
NS_IMPL_CYCLE_COLLECTING_RELEASE(DOMImplementation)
JSObject*
DOMImplementation::WrapObject(JSContext* aCx)
DOMImplementation::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return DOMImplementationBinding::Wrap(aCx, this);
return DOMImplementationBinding::Wrap(aCx, this, aGivenProto);
}
bool

View File

@ -52,7 +52,7 @@ public:
return mOwner;
}
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
// nsIDOMDOMImplementation
NS_DECL_NSIDOMDOMIMPLEMENTATION

View File

@ -658,9 +658,9 @@ DOMMatrix::SetMatrixValue(const nsAString& aTransformList, ErrorResult& aRv)
}
JSObject*
DOMMatrix::WrapObject(JSContext* aCx)
DOMMatrix::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return DOMMatrixBinding::Wrap(aCx, this);
return DOMMatrixBinding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom

View File

@ -166,7 +166,7 @@ public:
Constructor(const GlobalObject& aGlobal, const Sequence<double>& aNumberSequence, ErrorResult& aRv);
nsISupports* GetParentObject() const { return mParent; }
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
#define Set2DMatrixMember(entry2D, entry3D) \
{ \

View File

@ -75,9 +75,9 @@ public:
return mOwner;
}
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE
{
return mozilla::dom::DOMParserBinding::Wrap(aCx, this);
return mozilla::dom::DOMParserBinding::Wrap(aCx, this, aGivenProto);
}
private:

View File

@ -37,7 +37,7 @@ DOMPoint::Constructor(const GlobalObject& aGlobal, double aX, double aY,
}
JSObject*
DOMPoint::WrapObject(JSContext* aCx)
DOMPoint::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return DOMPointBinding::Wrap(aCx, this);
return DOMPointBinding::Wrap(aCx, this, aGivenProto);
}

View File

@ -64,7 +64,7 @@ public:
double aZ, double aW, ErrorResult& aRV);
nsISupports* GetParentObject() const { return mParent; }
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
void SetX(double aX) { mX = aX; }
void SetY(double aY) { mY = aY; }

View File

@ -38,9 +38,9 @@ DOMQuad::~DOMQuad()
}
JSObject*
DOMQuad::WrapObject(JSContext* aCx)
DOMQuad::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return DOMQuadBinding::Wrap(aCx, this);
return DOMQuadBinding::Wrap(aCx, this, aGivenProto);
}
already_AddRefed<DOMQuad>

View File

@ -35,7 +35,7 @@ public:
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMQuad)
nsISupports* GetParentObject() const { return mParent; }
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
static already_AddRefed<DOMQuad>
Constructor(const GlobalObject& aGlobal,

View File

@ -21,10 +21,10 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMRectReadOnly)
NS_INTERFACE_MAP_END
JSObject*
DOMRectReadOnly::WrapObject(JSContext* aCx)
DOMRectReadOnly::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
MOZ_ASSERT(mParent);
return DOMRectReadOnlyBinding::Wrap(aCx, this);
return DOMRectReadOnlyBinding::Wrap(aCx, this, aGivenProto);
}
// -----------------------------------------------------------------------------
@ -47,10 +47,10 @@ FORWARD_GETTER(Width)
FORWARD_GETTER(Height)
JSObject*
DOMRect::WrapObject(JSContext* aCx)
DOMRect::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
MOZ_ASSERT(mParent);
return DOMRectBinding::Wrap(aCx, this);
return DOMRectBinding::Wrap(aCx, this, aGivenProto);
}
already_AddRefed<DOMRect>
@ -99,9 +99,9 @@ DOMRectList::Item(uint32_t aIndex, nsIDOMClientRect** aReturn)
}
JSObject*
DOMRectList::WrapObject(JSContext *cx)
DOMRectList::WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto)
{
return mozilla::dom::DOMRectListBinding::Wrap(cx, this);
return mozilla::dom::DOMRectListBinding::Wrap(cx, this, aGivenProto);
}
static double

View File

@ -43,7 +43,7 @@ public:
MOZ_ASSERT(mParent);
return mParent;
}
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
virtual double X() const = 0;
virtual double Y() const = 0;
@ -98,7 +98,7 @@ public:
Constructor(const GlobalObject& aGlobal, double aX, double aY,
double aWidth, double aHeight, ErrorResult& aRV);
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
void SetRect(float aX, float aY, float aWidth, float aHeight) {
mX = aX; mY = aY; mWidth = aWidth; mHeight = aHeight;
@ -161,7 +161,7 @@ public:
NS_DECL_NSIDOMCLIENTRECTLIST
virtual JSObject* WrapObject(JSContext *cx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
nsISupports* GetParentObject()
{

View File

@ -66,9 +66,9 @@ NS_IMPL_ADDREF_INHERITED(DOMRequest, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(DOMRequest, DOMEventTargetHelper)
/* virtual */ JSObject*
DOMRequest::WrapObject(JSContext* aCx)
DOMRequest::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return DOMRequestBinding::Wrap(aCx, this);
return DOMRequestBinding::Wrap(aCx, this, aGivenProto);
}
NS_IMPL_EVENT_HANDLER(DOMRequest, success)

View File

@ -47,7 +47,7 @@ public:
return GetOwner();
}
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
// WebIDL Interface
DOMRequestReadyState ReadyState() const

View File

@ -24,9 +24,9 @@ DOMStringList::~DOMStringList()
}
JSObject*
DOMStringList::WrapObject(JSContext* aCx)
DOMStringList::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return DOMStringListBinding::Wrap(aCx, this);
return DOMStringListBinding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom

View File

@ -24,7 +24,7 @@ public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMStringList)
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
nsISupports* GetParentObject()
{
return nullptr;

View File

@ -24,9 +24,9 @@ namespace mozilla {
namespace dom {
JSObject*
DocumentFragment::WrapNode(JSContext *aCx)
DocumentFragment::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
{
return DocumentFragmentBinding::Wrap(aCx, this);
return DocumentFragmentBinding::Wrap(aCx, this, aGivenProto);
}
bool

View File

@ -65,7 +65,7 @@ public:
Init();
}
virtual JSObject* WrapNode(JSContext *aCx) MOZ_OVERRIDE;
virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
// nsIContent
nsresult SetAttr(int32_t aNameSpaceID, nsIAtom* aName,

View File

@ -60,9 +60,9 @@ namespace mozilla {
namespace dom {
JSObject*
DocumentType::WrapNode(JSContext *cx)
DocumentType::WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto)
{
return DocumentTypeBinding::Wrap(cx, this);
return DocumentTypeBinding::Wrap(cx, this, aGivenProto);
}
DocumentType::DocumentType(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,

View File

@ -77,7 +77,7 @@ public:
protected:
virtual ~DocumentType();
virtual JSObject* WrapNode(JSContext *cx) MOZ_OVERRIDE;
virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
nsString mPublicId;
nsString mSystemId;

View File

@ -406,9 +406,9 @@ Element::GetBindingURL(nsIDocument *aDocument, css::URLValue **aResult)
}
JSObject*
Element::WrapObject(JSContext *aCx)
Element::WrapObject(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
{
JS::Rooted<JSObject*> obj(aCx, nsINode::WrapObject(aCx));
JS::Rooted<JSObject*> obj(aCx, nsINode::WrapObject(aCx, aGivenProto));
if (!obj) {
return nullptr;
}
@ -1108,9 +1108,9 @@ DestinationInsertionPointList::IndexOf(nsIContent* aContent)
}
JSObject*
DestinationInsertionPointList::WrapObject(JSContext* aCx)
DestinationInsertionPointList::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return NodeListBinding::Wrap(aCx, this);
return NodeListBinding::Wrap(aCx, this, aGivenProto);
}
already_AddRefed<DestinationInsertionPointList>

View File

@ -960,7 +960,7 @@ public:
nsIDOMHTMLCollection** aResult);
void GetClassList(nsISupports** aClassList);
virtual JSObject* WrapObject(JSContext *aCx) MOZ_FINAL MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) MOZ_FINAL MOZ_OVERRIDE;
nsINode* GetScopeChainParent() const MOZ_OVERRIDE;
@ -1315,7 +1315,7 @@ public:
virtual int32_t IndexOf(nsIContent* aContent) MOZ_OVERRIDE;
virtual nsINode* GetParentObject() MOZ_OVERRIDE { return mParent; }
virtual uint32_t Length() const;
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
protected:
virtual ~DestinationInsertionPointList();

View File

@ -265,9 +265,9 @@ EventSource::Init(nsISupports* aOwner,
}
/* virtual */ JSObject*
EventSource::WrapObject(JSContext* aCx)
EventSource::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return EventSourceBinding::Wrap(aCx, this);
return EventSourceBinding::Wrap(aCx, this, aGivenProto);
}
/* static */ already_AddRefed<EventSource>

View File

@ -58,7 +58,7 @@ public:
NS_DECL_NSIINTERFACEREQUESTOR
// nsWrapperCache
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
// WebIDL
nsPIDOMWindow*

View File

@ -559,10 +559,10 @@ File::IsMemoryFile()
}
JSObject*
File::WrapObject(JSContext* aCx)
File::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return IsFile() ? FileBinding::Wrap(aCx, this)
: BlobBinding::Wrap(aCx, this);
return IsFile() ? FileBinding::Wrap(aCx, this, aGivenProto)
: BlobBinding::Wrap(aCx, this, aGivenProto);
}
/* static */ already_AddRefed<File>
@ -1235,9 +1235,9 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(FileList)
NS_IMPL_CYCLE_COLLECTING_RELEASE(FileList)
JSObject*
FileList::WrapObject(JSContext *cx)
FileList::WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto)
{
return mozilla::dom::FileListBinding::Wrap(cx, this);
return mozilla::dom::FileListBinding::Wrap(cx, this, aGivenProto);
}
NS_IMETHODIMP

View File

@ -189,7 +189,7 @@ public:
const ChromeFilePropertyBag& aBag,
ErrorResult& aRv);
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
uint64_t GetSize(ErrorResult& aRv);
@ -828,7 +828,7 @@ public:
NS_DECL_NSIDOMFILELIST
virtual JSObject* WrapObject(JSContext *cx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
nsISupports* GetParentObject()
{

View File

@ -401,9 +401,9 @@ NS_INTERFACE_TABLE_HEAD(nsChildContentList)
NS_INTERFACE_MAP_END
JSObject*
nsChildContentList::WrapObject(JSContext *cx)
nsChildContentList::WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto)
{
return NodeListBinding::Wrap(cx, this);
return NodeListBinding::Wrap(cx, this, aGivenProto);
}
NS_IMETHODIMP

View File

@ -56,7 +56,7 @@ public:
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS(nsChildContentList)
// nsWrapperCache
virtual JSObject* WrapObject(JSContext *cx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
// nsIDOMNodeList interface
NS_DECL_NSIDOMNODELIST

View File

@ -81,9 +81,9 @@ MessageChannel::~MessageChannel()
}
JSObject*
MessageChannel::WrapObject(JSContext* aCx)
MessageChannel::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return MessageChannelBinding::Wrap(aCx, this);
return MessageChannelBinding::Wrap(aCx, this, aGivenProto);
}
/* static */ already_AddRefed<MessageChannel>

View File

@ -40,7 +40,7 @@ public:
}
virtual JSObject*
WrapObject(JSContext* aCx) MOZ_OVERRIDE;
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
static already_AddRefed<MessageChannel>
Constructor(const GlobalObject& aGlobal, ErrorResult& aRv);

View File

@ -223,7 +223,7 @@ PostMessageReadTransferStructuredClone(JSContext* aCx,
port->BindToOwner(scInfo->mPort->GetOwner());
scInfo->mPorts.Put(port, nullptr);
JS::Rooted<JSObject*> obj(aCx, port->WrapObject(aCx));
JS::Rooted<JSObject*> obj(aCx, port->WrapObject(aCx, JS::NullPtr()));
if (!obj || !JS_WrapObject(aCx, &obj)) {
return false;
}
@ -414,9 +414,9 @@ MessagePort::~MessagePort()
}
JSObject*
MessagePort::WrapObject(JSContext* aCx)
MessagePort::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return MessagePortBinding::Wrap(aCx, this);
return MessagePortBinding::Wrap(aCx, this, aGivenProto);
}
void

View File

@ -64,7 +64,7 @@ public:
explicit MessagePort(nsPIDOMWindow* aWindow);
virtual JSObject*
WrapObject(JSContext* aCx) MOZ_OVERRIDE;
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
virtual void
PostMessageMoz(JSContext* aCx, JS::Handle<JS::Value> aMessage,

View File

@ -20,9 +20,9 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(MessagePortList)
NS_INTERFACE_MAP_END
JSObject*
MessagePortList::WrapObject(JSContext* aCx)
MessagePortList::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return MessagePortListBinding::Wrap(aCx, this);
return MessagePortListBinding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom

View File

@ -41,7 +41,7 @@ public:
}
virtual JSObject*
WrapObject(JSContext* aCx) MOZ_OVERRIDE;
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
uint32_t
Length() const

View File

@ -2234,9 +2234,9 @@ Navigator::GetOwnPropertyNames(JSContext* aCx, nsTArray<nsString>& aNames,
}
JSObject*
Navigator::WrapObject(JSContext* cx)
Navigator::WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto)
{
return NavigatorBinding::Wrap(cx, this);
return NavigatorBinding::Wrap(cx, this, aGivenProto);
}
/* static */

View File

@ -324,7 +324,7 @@ public:
return GetWindow();
}
virtual JSObject* WrapObject(JSContext* cx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
// GetWindowFromGlobal returns the inner window for this global, if
// any, else null.

View File

@ -34,7 +34,7 @@ PerformanceEntry::~PerformanceEntry()
}
JSObject*
PerformanceEntry::WrapObject(JSContext* aCx)
PerformanceEntry::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return mozilla::dom::PerformanceEntryBinding::Wrap(aCx, this);
return mozilla::dom::PerformanceEntryBinding::Wrap(aCx, this, aGivenProto);
}

View File

@ -27,7 +27,7 @@ public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(PerformanceEntry)
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
nsPerformance* GetParentObject() const
{

View File

@ -21,7 +21,7 @@ PerformanceMark::~PerformanceMark()
}
JSObject*
PerformanceMark::WrapObject(JSContext* aCx)
PerformanceMark::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return PerformanceMarkBinding::Wrap(aCx, this);
return PerformanceMarkBinding::Wrap(aCx, this, aGivenProto);
}

View File

@ -18,7 +18,7 @@ public:
PerformanceMark(nsPerformance* aPerformance,
const nsAString& aName);
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
virtual DOMHighResTimeStamp StartTime() const MOZ_OVERRIDE
{

View File

@ -24,7 +24,7 @@ PerformanceMeasure::~PerformanceMeasure()
}
JSObject*
PerformanceMeasure::WrapObject(JSContext* aCx)
PerformanceMeasure::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return PerformanceMeasureBinding::Wrap(aCx, this);
return PerformanceMeasureBinding::Wrap(aCx, this, aGivenProto);
}

View File

@ -20,7 +20,7 @@ public:
DOMHighResTimeStamp aStartTime,
DOMHighResTimeStamp aEndTime);
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
virtual DOMHighResTimeStamp StartTime() const MOZ_OVERRIDE
{

View File

@ -43,7 +43,7 @@ PerformanceResourceTiming::StartTime() const
}
JSObject*
PerformanceResourceTiming::WrapObject(JSContext* aCx)
PerformanceResourceTiming::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return PerformanceResourceTimingBinding::Wrap(aCx, this);
return PerformanceResourceTimingBinding::Wrap(aCx, this, aGivenProto);
}

View File

@ -31,7 +31,7 @@ public:
nsPerformance* aPerformance,
const nsAString& aName);
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
virtual DOMHighResTimeStamp StartTime() const MOZ_OVERRIDE;

View File

@ -58,7 +58,7 @@ public:
}
virtual nsIPrincipal* GetPrincipal() MOZ_OVERRIDE { return mPrincipal; }
virtual JSObject* WrapObject(JSContext* cx) MOZ_OVERRIDE
virtual JSObject* WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE
{
MOZ_CRASH("ProcessGlobal doesn't use DOM bindings!");
}

View File

@ -104,9 +104,9 @@ ShadowRoot::~ShadowRoot()
}
JSObject*
ShadowRoot::WrapObject(JSContext* aCx)
ShadowRoot::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return mozilla::dom::ShadowRootBinding::Wrap(aCx, this);
return mozilla::dom::ShadowRootBinding::Wrap(aCx, this, aGivenProto);
}
ShadowRoot*

View File

@ -103,7 +103,7 @@ public:
nsIContent* GetPoolHost() { return mPoolHost; }
nsTArray<HTMLShadowElement*>& ShadowDescendants() { return mShadowDescendants; }
JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
static bool IsPooledNode(nsIContent* aChild, nsIContent* aContainer,
nsIContent* aHost);

View File

@ -23,9 +23,9 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(StyleSheetList)
NS_IMPL_CYCLE_COLLECTING_RELEASE(StyleSheetList)
/* virtual */ JSObject*
StyleSheetList::WrapObject(JSContext* aCx)
StyleSheetList::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return StyleSheetListBinding::Wrap(aCx, this);
return StyleSheetListBinding::Wrap(aCx, this, aGivenProto);
}
NS_IMETHODIMP

View File

@ -24,7 +24,7 @@ public:
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(StyleSheetList)
NS_DECL_NSIDOMSTYLESHEETLIST
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE MOZ_FINAL;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE MOZ_FINAL;
virtual nsINode* GetParentObject() const = 0;

View File

@ -29,9 +29,9 @@ SubtleCrypto::SubtleCrypto(nsIGlobalObject* aParent)
}
JSObject*
SubtleCrypto::WrapObject(JSContext* aCx)
SubtleCrypto::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return SubtleCryptoBinding::Wrap(aCx, this);
return SubtleCryptoBinding::Wrap(aCx, this, aGivenProto);
}
#define SUBTLECRYPTO_METHOD_BODY(Operation, aRv, ...) \

View File

@ -38,7 +38,7 @@ public:
return mParent;
}
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
already_AddRefed<Promise> Encrypt(JSContext* cx,
const ObjectOrString& algorithm,

View File

@ -30,9 +30,9 @@ URLSearchParams::~URLSearchParams()
}
JSObject*
URLSearchParams::WrapObject(JSContext* aCx)
URLSearchParams::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return URLSearchParamsBinding::Wrap(aCx, this);
return URLSearchParamsBinding::Wrap(aCx, this, aGivenProto);
}
/* static */ already_AddRefed<URLSearchParams>

View File

@ -44,7 +44,7 @@ public:
}
virtual JSObject*
WrapObject(JSContext* aCx) MOZ_OVERRIDE;
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
static already_AddRefed<URLSearchParams>
Constructor(const GlobalObject& aGlobal, const nsAString& aInit,

View File

@ -909,9 +909,9 @@ WebSocket::~WebSocket()
}
JSObject*
WebSocket::WrapObject(JSContext* cx)
WebSocket::WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto)
{
return WebSocketBinding::Wrap(cx, this);
return WebSocketBinding::Wrap(cx, this, aGivenProto);
}
//---------------------------------------------------------------------------

View File

@ -62,7 +62,7 @@ public:
// nsWrapperCache
nsPIDOMWindow* GetParentObject() { return GetOwner(); }
virtual JSObject* WrapObject(JSContext* cx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
public: // static helpers:

View File

@ -147,9 +147,9 @@ NS_IMPL_ADDREF_INHERITED(nsSimpleContentList, nsBaseContentList)
NS_IMPL_RELEASE_INHERITED(nsSimpleContentList, nsBaseContentList)
JSObject*
nsSimpleContentList::WrapObject(JSContext *cx)
nsSimpleContentList::WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto)
{
return NodeListBinding::Wrap(cx, this);
return NodeListBinding::Wrap(cx, this, aGivenProto);
}
// Hashtable for storing nsContentLists
@ -259,16 +259,16 @@ const nsCacheableFuncStringContentList::ContentListType
#endif
JSObject*
nsCacheableFuncStringNodeList::WrapObject(JSContext *cx)
nsCacheableFuncStringNodeList::WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto)
{
return NodeListBinding::Wrap(cx, this);
return NodeListBinding::Wrap(cx, this, aGivenProto);
}
JSObject*
nsCacheableFuncStringHTMLCollection::WrapObject(JSContext *cx)
nsCacheableFuncStringHTMLCollection::WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto)
{
return HTMLCollectionBinding::Wrap(cx, this);
return HTMLCollectionBinding::Wrap(cx, this, aGivenProto);
}
// Hashtable for storing nsCacheableFuncStringContentList
@ -469,9 +469,9 @@ nsContentList::~nsContentList()
}
JSObject*
nsContentList::WrapObject(JSContext *cx)
nsContentList::WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto)
{
return HTMLCollectionBinding::Wrap(cx, this);
return HTMLCollectionBinding::Wrap(cx, this, aGivenProto);
}
NS_IMPL_ISUPPORTS_INHERITED(nsContentList, nsBaseContentList,

View File

@ -87,7 +87,7 @@ public:
virtual int32_t IndexOf(nsIContent *aContent, bool aDoFlush);
virtual JSObject* WrapObject(JSContext *cx)
virtual JSObject* WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto)
MOZ_OVERRIDE = 0;
void SetCapacity(uint32_t aCapacity)
@ -125,7 +125,7 @@ public:
{
return mRoot;
}
virtual JSObject* WrapObject(JSContext *cx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
protected:
virtual ~nsSimpleContentList() {}
@ -251,7 +251,7 @@ public:
// nsWrapperCache
using nsWrapperCache::GetWrapperPreserveColor;
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
protected:
virtual ~nsContentList();
@ -536,7 +536,7 @@ public:
#endif
}
virtual JSObject* WrapObject(JSContext *cx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
#ifdef DEBUG
static const ContentListType sType;
@ -560,7 +560,7 @@ public:
#endif
}
virtual JSObject* WrapObject(JSContext *cx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
#ifdef DEBUG
static const ContentListType sType;

View File

@ -587,7 +587,7 @@ nsDOMAttributeMap::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
}
/* virtual */ JSObject*
nsDOMAttributeMap::WrapObject(JSContext* aCx)
nsDOMAttributeMap::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return NamedNodeMapBinding::Wrap(aCx, this);
return NamedNodeMapBinding::Wrap(aCx, this, aGivenProto);
}

View File

@ -140,7 +140,7 @@ public:
{
return mContent;
}
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
// WebIDL
Attr* GetNamedItem(const nsAString& aAttrName);

View File

@ -56,9 +56,9 @@ nsDOMCaretPosition::GetClientRect() const
}
JSObject*
nsDOMCaretPosition::WrapObject(JSContext *aCx)
nsDOMCaretPosition::WrapObject(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
{
return mozilla::dom::CaretPositionBinding::Wrap(aCx, this);
return mozilla::dom::CaretPositionBinding::Wrap(aCx, this, aGivenProto);
}
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(nsDOMCaretPosition,

View File

@ -85,7 +85,7 @@ public:
return GetOffsetNode();
}
virtual JSObject* WrapObject(JSContext *aCx)
virtual JSObject* WrapObject(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
MOZ_OVERRIDE MOZ_FINAL;
protected:

View File

@ -53,9 +53,9 @@ nsDOMDataChannel::~nsDOMDataChannel()
}
/* virtual */ JSObject*
nsDOMDataChannel::WrapObject(JSContext* aCx)
nsDOMDataChannel::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return DataChannelBinding::Wrap(aCx, this);
return DataChannelBinding::Wrap(aCx, this, aGivenProto);
}
NS_IMPL_CYCLE_COLLECTION_CLASS(nsDOMDataChannel)

View File

@ -42,7 +42,7 @@ public:
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsDOMDataChannel,
mozilla::DOMEventTargetHelper)
virtual JSObject* WrapObject(JSContext* aCx)
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
MOZ_OVERRIDE;
nsPIDOMWindow* GetParentObject() const
{

View File

@ -530,7 +530,7 @@ nsDOMFileReader::GetAsDataURL(nsIDOMBlob *aFile,
}
/* virtual */ JSObject*
nsDOMFileReader::WrapObject(JSContext* aCx)
nsDOMFileReader::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return FileReaderBinding::Wrap(aCx, this);
return FileReaderBinding::Wrap(aCx, this, aGivenProto);
}

View File

@ -62,7 +62,7 @@ public:
{
return GetOwner();
}
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
// WebIDL
static already_AddRefed<nsDOMFileReader>

View File

@ -48,9 +48,9 @@ public:
return mOwner;
}
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE
{
return mozilla::dom::MutationRecordBinding::Wrap(aCx, this);
return mozilla::dom::MutationRecordBinding::Wrap(aCx, this, aGivenProto);
}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
@ -461,9 +461,9 @@ public:
mozilla::dom::MutationCallback& aCb,
mozilla::ErrorResult& aRv);
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE
{
return mozilla::dom::MutationObserverBinding::Wrap(aCx, this);
return mozilla::dom::MutationObserverBinding::Wrap(aCx, this, aGivenProto);
}
nsISupports* GetParentObject() const

View File

@ -48,9 +48,9 @@ public:
return mOwner;
}
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE
{
return mozilla::dom::XMLSerializerBinding::Wrap(aCx, this);
return mozilla::dom::XMLSerializerBinding::Wrap(aCx, this, aGivenProto);
}
private:

View File

@ -21,7 +21,7 @@ nsDOMSettableTokenList::SetValue(const nsAString& aValue, mozilla::ErrorResult&
}
JSObject*
nsDOMSettableTokenList::WrapObject(JSContext *cx)
nsDOMSettableTokenList::WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto)
{
return mozilla::dom::DOMSettableTokenListBinding::Wrap(cx, this);
return mozilla::dom::DOMSettableTokenListBinding::Wrap(cx, this, aGivenProto);
}

View File

@ -22,7 +22,7 @@ public:
nsDOMSettableTokenList(mozilla::dom::Element* aElement, nsIAtom* aAttrAtom)
: nsDOMTokenList(aElement, aAttrAtom) {}
virtual JSObject* WrapObject(JSContext *cx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
// WebIDL
void GetValue(nsAString& aResult) { Stringify(aResult); }

View File

@ -309,8 +309,8 @@ nsDOMTokenList::Stringify(nsAString& aResult)
}
JSObject*
nsDOMTokenList::WrapObject(JSContext *cx)
nsDOMTokenList::WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto)
{
return DOMTokenListBinding::Wrap(cx, this);
return DOMTokenListBinding::Wrap(cx, this, aGivenProto);
}

View File

@ -37,7 +37,7 @@ public:
nsDOMTokenList(Element* aElement, nsIAtom* aAttrAtom);
virtual JSObject* WrapObject(JSContext *cx) MOZ_OVERRIDE;
virtual JSObject* WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
Element* GetParentObject()
{

Some files were not shown because too many files have changed in this diff Show More