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

Commit c62295c

Browse files
committed
Bug 864727 part 6. Make all the WrapNode methods take a handle for the scope object. r=ms2ger
1 parent b834439 commit c62295c

260 files changed

Lines changed: 406 additions & 286 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/nsINode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ class nsINode : public mozilla::dom::EventTarget
387387
* does some additional checks and fix-up that's common to all nodes. WrapNode
388388
* should just call the DOM binding's Wrap function.
389389
*/
390-
virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope)
390+
virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aScope)
391391
{
392392
MOZ_ASSERT(!IsDOMBinding(), "Someone forgot to override WrapNode");
393393
return nullptr;

content/base/src/Comment.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Comment::List(FILE* out, int32_t aIndent) const
6161
#endif
6262

6363
JSObject*
64-
Comment::WrapNode(JSContext *aCx, JSObject *aScope)
64+
Comment::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aScope)
6565
{
6666
return CommentBinding::Wrap(aCx, aScope, this);
6767
}

content/base/src/Comment.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ class Comment : public nsGenericDOMDataNode,
6767
#endif
6868

6969
protected:
70-
virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope) MOZ_OVERRIDE;
70+
virtual JSObject* WrapNode(JSContext *aCx,
71+
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
7172
};
7273

7374
} // namespace dom

content/base/src/DocumentFragment.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace mozilla {
2222
namespace dom {
2323

2424
JSObject*
25-
DocumentFragment::WrapNode(JSContext *aCx, JSObject *aScope)
25+
DocumentFragment::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aScope)
2626
{
2727
return DocumentFragmentBinding::Wrap(aCx, aScope, this);
2828
}

content/base/src/DocumentFragment.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ class DocumentFragment : public FragmentOrElement,
7070
{
7171
}
7272

73-
virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope) MOZ_OVERRIDE;
73+
virtual JSObject* WrapNode(JSContext *aCx,
74+
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
7475

7576
// nsIContent
7677
virtual already_AddRefed<nsINodeInfo>

content/base/src/DocumentType.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ namespace mozilla {
6060
namespace dom {
6161

6262
JSObject*
63-
DocumentType::WrapNode(JSContext *cx, JSObject *scope)
63+
DocumentType::WrapNode(JSContext *cx, JS::Handle<JSObject*> scope)
6464
{
6565
return DocumentTypeBinding::Wrap(cx, scope, this);
6666
}

content/base/src/DocumentType.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ class DocumentType : public DocumentTypeForward
7676
virtual nsIDOMNode* AsDOMNode() { return this; }
7777

7878
protected:
79-
virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
79+
virtual JSObject* WrapNode(JSContext *cx,
80+
JS::Handle<JSObject*> scope) MOZ_OVERRIDE;
8081

8182
nsString mPublicId;
8283
nsString mSystemId;

content/base/src/nsTextNode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ NS_IMPL_ISUPPORTS_INHERITED3(nsTextNode, nsGenericDOMDataNode, nsIDOMNode,
9898
nsIDOMText, nsIDOMCharacterData)
9999

100100
JSObject*
101-
nsTextNode::WrapNode(JSContext *aCx, JSObject *aScope)
101+
nsTextNode::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aScope)
102102
{
103103
return TextBinding::Wrap(aCx, aScope, this);
104104
}

content/base/src/nsTextNode.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ class nsTextNode : public mozilla::dom::Text,
8080
#endif
8181

8282
protected:
83-
virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope) MOZ_OVERRIDE;
83+
virtual JSObject* WrapNode(JSContext *aCx,
84+
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
8485
};
8586

8687
#endif // nsTextNode_h

content/html/content/public/HTMLAudioElement.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ class HTMLAudioElement : public HTMLMediaElement,
6666
uint64_t MozCurrentSampleOffset(ErrorResult& aRv);
6767

6868
protected:
69-
virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
69+
virtual JSObject* WrapNode(JSContext* aCx,
70+
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
7071
};
7172

7273
} // namespace dom

0 commit comments

Comments
 (0)