Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit b834439

Browse files
committed
Bug 864727 part 5. Make all the WrapObject methods take a handle for the scope object. r=ms2ger
1 parent 47de9d3 commit b834439

257 files changed

Lines changed: 442 additions & 302 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

content/base/public/Element.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ class Element : public FragmentOrElement
885885
void GetClassList(nsISupports** aClassList);
886886

887887
virtual JSObject* WrapObject(JSContext *aCx,
888-
JSObject *aScope) MOZ_FINAL MOZ_OVERRIDE;
888+
JS::Handle<JSObject*> aScope) MOZ_FINAL MOZ_OVERRIDE;
889889

890890
/**
891891
* Locate an nsIEditor rooted at this content node, if there is one.

content/base/public/FragmentOrElement.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ class nsChildContentList MOZ_FINAL : public nsINodeList
5454
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS(nsChildContentList)
5555

5656
// nsWrapperCache
57-
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
57+
virtual JSObject* WrapObject(JSContext *cx,
58+
JS::Handle<JSObject*> scope) MOZ_OVERRIDE;
5859

5960
// nsIDOMNodeList interface
6061
NS_DECL_NSIDOMNODELIST

content/base/public/nsDOMFile.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,8 @@ class nsDOMFileList MOZ_FINAL : public nsIDOMFileList,
437437

438438
NS_DECL_NSIDOMFILELIST
439439

440-
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
440+
virtual JSObject* WrapObject(JSContext *cx,
441+
JS::Handle<JSObject*> scope) MOZ_OVERRIDE;
441442

442443
nsISupports* GetParentObject()
443444
{

content/base/public/nsINode.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,8 @@ class nsINode : public mozilla::dom::EventTarget
378378
*/
379379
virtual bool IsNodeOfType(uint32_t aFlags) const = 0;
380380

381-
virtual JSObject* WrapObject(JSContext *aCx, JSObject *aScope) MOZ_OVERRIDE;
381+
virtual JSObject* WrapObject(JSContext *aCx,
382+
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
382383

383384
protected:
384385
/**

content/base/src/Attr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ Attr::Shutdown()
377377
}
378378

379379
JSObject*
380-
Attr::WrapObject(JSContext* aCx, JSObject* aScope)
380+
Attr::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
381381
{
382382
return AttrBinding::Wrap(aCx, aScope, this);
383383
}

content/base/src/Attr.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ class Attr : public nsIAttribute,
8181
virtual nsIDOMNode* AsDOMNode() { return this; }
8282

8383
// WebIDL
84-
virtual JSObject* WrapObject(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
84+
virtual JSObject* WrapObject(JSContext* aCx,
85+
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
8586

8687
// XPCOM GetName() is OK
8788
// XPCOM GetValue() is OK

content/base/src/DOMImplementation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(DOMImplementation)
2727
NS_IMPL_CYCLE_COLLECTING_RELEASE(DOMImplementation)
2828

2929
JSObject*
30-
DOMImplementation::WrapObject(JSContext* aCx, JSObject* aScope)
30+
DOMImplementation::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
3131
{
3232
return DOMImplementationBinding::Wrap(aCx, aScope, this);
3333
}

content/base/src/DOMImplementation.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ class DOMImplementation MOZ_FINAL : public nsIDOMDOMImplementation
5353
return mOwner;
5454
}
5555

56-
virtual JSObject* WrapObject(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
56+
virtual JSObject* WrapObject(JSContext* aCx,
57+
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
5758

5859
// nsIDOMDOMImplementation
5960
NS_DECL_NSIDOMDOMIMPLEMENTATION

content/base/src/Element.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ Element::GetBindingURL(nsIDocument *aDocument, css::URLValue **aResult)
341341
}
342342

343343
JSObject*
344-
Element::WrapObject(JSContext *aCx, JSObject *aScope)
344+
Element::WrapObject(JSContext *aCx, JS::Handle<JSObject*> aScope)
345345
{
346346
JSObject* obj = nsINode::WrapObject(aCx, aScope);
347347
if (!obj) {

content/base/src/EventSource.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ EventSource::Init(nsISupports* aOwner,
278278
}
279279

280280
/* virtual */ JSObject*
281-
EventSource::WrapObject(JSContext* aCx, JSObject* aScope)
281+
EventSource::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
282282
{
283283
return EventSourceBinding::Wrap(aCx, aScope, this);
284284
}

0 commit comments

Comments
 (0)