Closed
Bug 1275945
Opened 8 years ago
Closed 8 years ago
Don't create the AutoJSContext in nsNodeUtils::CloneAndAdopt if we don't have an aReparentScope
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file)
1.95 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
The changes in bug 839467 made CloneAndAdopt always push stuff on the JSContext stack. This isn't very desirable, both for performance reasons and because it lands a null-compartment thing on the stack. In practice, we only use this AutoJSContext when aReparentScope is non-null, so we should only construct it in that case.
Assignee | ||
Comment 1•8 years ago
|
||
This prevents us from pushing stuff on the JSContext stack unnecessarily when we're just cloning, not adopting. It's OK that we're doing it in a narrow scope that doesn't include our recursion into children, because in practice when aReparentScope is non-null we came from nsIDocument::AdoptNode which already does AutoJSContext. So we're not going to continuously push/pop the JSContext stack in that situation, since something already got pushed on it.
Attachment #8756900 -
Flags: review?(mrbkap)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Updated•8 years ago
|
Attachment #8756900 -
Flags: review?(mrbkap) → review+
Comment 3•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/72ea7eafc5e5
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•