Closed Bug 839467 Opened 11 years ago Closed 11 years ago

Remove JSContext switching in AdoptNode

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: bholley, Assigned: bholley)

References

Details

Attachments

(2 files)

Followup from bug 834732 part 10.
Right now it has to be kept in sync with the nullness of aNewScope. Let's just
rely on the cx stack here and kill the param.
Attachment #732539 - Flags: review?(mrbkap)
Attachment #732538 - Flags: review?(mrbkap) → review+
Comment on attachment 732539 [details] [diff] [review]
Part 2 - Remove aCx parameter to CloneAndAdopt. v1

Review of attachment 732539 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/base/src/nsDocument.cpp
@@ -6578,5 @@
>    nsCOMArray<nsINode> nodesWithProperties;
>    rv = nsNodeUtils::Adopt(adoptedNode, sameDocument ? nullptr : mNodeInfoManager,
> -                          // The nsNodeUtils API requires that cx be non-null iff
> -                          // newscope is non-null.
> -                          newScope ? (JSContext*) cx : nullptr,

I was going to ask for a static_cast, but then I realized that this patch nuked that line anyway.
Attachment #732539 - Flags: review?(mrbkap) → review+
https://hg.mozilla.org/mozilla-central/rev/96a501b8fb84
https://hg.mozilla.org/mozilla-central/rev/e10b37c57162
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Depends on: 1275945
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: