Closed
Bug 1311223
Opened 8 years ago
Closed 8 years ago
Stop using nsISupportsArray for window args
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: erahm, Assigned: erahm)
References
Details
Attachments
(1 file)
27.54 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
WindowWatcher allows for either nsIArray or nsISupports array to be passed in
for the arguments param. This converts all internal usage to nsIArray.
MozReview-Commit-ID: DQjtIkobik0
Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8802363 -
Flags: review?(nfroyd)
Assignee | ||
Comment 2•8 years ago
|
||
Assignee | ||
Comment 3•8 years ago
|
||
Comment on attachment 8802363 [details] [diff] [review]
Stop using nsISupportsArray for window args
Review of attachment 8802363 [details] [diff] [review]:
-----------------------------------------------------------------
This is pretty straightforward. Basically:
- "supports-array" => "array"
- "nsISupportsArray" => "nsIMutableArray"
- js code: 'AppendElement' => "appendElement"
- (A|a)ppendElement gets extra "/*weak =*/ false" param
Comment 4•8 years ago
|
||
Comment on attachment 8802363 [details] [diff] [review]
Stop using nsISupportsArray for window args
Review of attachment 8802363 [details] [diff] [review]:
-----------------------------------------------------------------
I really wonder if anybody ever passes /*weak*/=true to nsIMutableArray.appendElement. r=me with changes below.
::: browser/components/nsBrowserContentHandler.js
@@ +223,5 @@
> return Services.ww.openWindow(parent, url, target, features, argArray);
> }
>
> function openPreferences() {
> + var sa = Components.classes["@mozilla.org/array;1"]
Might as well rename this to |args| to make it more idiomatic.
@@ +252,5 @@
> var submission = engine.getSubmission(searchTerm, null, "system");
>
> // fill our nsISupportsArray with uri-as-wstring, null, null, postData
> + var sa = Components.classes["@mozilla.org/array;1"]
> + .createInstance(Components.interfaces.nsIMutableArray);
Likewise here.
Attachment #8802363 -
Flags: review?(nfroyd) → review+
Assignee | ||
Comment 5•8 years ago
|
||
Assignee | ||
Comment 6•8 years ago
|
||
(In reply to Nathan Froyd [:froydnj] from comment #4)
> Comment on attachment 8802363 [details] [diff] [review]
> Stop using nsISupportsArray for window args
>
> Review of attachment 8802363 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> I really wonder if anybody ever passes /*weak*/=true to
> nsIMutableArray.appendElement. r=me with changes below.
I *highly* doubt it.
>
> ::: browser/components/nsBrowserContentHandler.js
> @@ +223,5 @@
> > return Services.ww.openWindow(parent, url, target, features, argArray);
> > }
> >
> > function openPreferences() {
> > + var sa = Components.classes["@mozilla.org/array;1"]
>
> Might as well rename this to |args| to make it more idiomatic.
>
> @@ +252,5 @@
> > var submission = engine.getSubmission(searchTerm, null, "system");
> >
> > // fill our nsISupportsArray with uri-as-wstring, null, null, postData
> > + var sa = Components.classes["@mozilla.org/array;1"]
> > + .createInstance(Components.interfaces.nsIMutableArray);
>
> Likewise here.
Will update.
Assignee | ||
Comment 7•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/313dee79ed92abf7fcf85c2a89a3d8d52500bcba
Bug 1311223 - Stop using nsISupportsArray for window args. r=froydnj
Comment 8•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in
before you can comment on or make changes to this bug.
Description
•