Closed
Bug 807410
Opened 12 years ago
Closed 12 years ago
Pass some things to the nsJSContext constructor instead of using setters
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla19
People
(Reporter: Ms2ger, Assigned: Ms2ger)
Details
Attachments
(2 files)
6.48 KB,
patch
|
jst
:
review+
|
Details | Diff | Splinter Review |
10.22 KB,
patch
|
jst
:
review+
|
Details | Diff | Splinter Review |
SetGCOnDestruction and SetGlobalObject are only used right after we constructed the object. Making those constructor arguments makes that clearer.
Attachment #677075 -
Flags: review?(jst)
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #677077 -
Flags: review?(jst)
Comment 2•12 years ago
|
||
Comment on attachment 677075 [details] [diff] [review]
Part a: Global object
- In class nsJSRuntime:
- virtual already_AddRefed<nsIScriptContext> CreateContext();
+ virtual already_AddRefed<nsIScriptContext> CreateContext(nsIScriptGlobalObject* aGlobalObject = nullptr);
Why a default value? I'd much rather see callers of this being explicit.
Assignee | ||
Comment 3•12 years ago
|
||
Because only nsGlobalWindow passed one, but sure.
Comment 4•12 years ago
|
||
Comment on attachment 677075 [details] [diff] [review]
Part a: Global object
r=jst, but please remove the default argument and make the few callers of CreateContext() be explicit about what they want to pass in.
Attachment #677075 -
Flags: review?(jst) → review+
Comment 5•12 years ago
|
||
Comment on attachment 677077 [details] [diff] [review]
Part b: GC on destruction
r=jst. Thanks for the patches!
Attachment #677077 -
Flags: review?(jst) → review+
Assignee | ||
Comment 6•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/40e08e6b0fda
https://hg.mozilla.org/mozilla-central/rev/8e21cdfce89c
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•