Closed
Bug 868727
Opened 12 years ago
Closed 12 years ago
Pass an nsAString to nsGlobalWindow::GetChildWindow
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla23
People
(Reporter: Ms2ger, Assigned: Ms2ger)
References
Details
Attachments
(1 file)
6.14 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
I don't think we should be using jsids here.
Attachment #745510 -
Flags: review?(bzbarsky)
![]() |
||
Comment 1•12 years ago
|
||
Comment on attachment 745510 [details] [diff] [review]
Patch v1
Could you file a followup bug to make the nsDependentJSString constructor take a Handle<jsid>, perhaps? Bonus points for fixing it. ;)
r=me
Attachment #745510 -
Flags: review?(bzbarsky) → review+
Comment 2•12 years ago
|
||
Comment on attachment 745510 [details] [diff] [review]
Patch v1
>+nsGlobalWindow::GetChildWindow(const nsAString& aName)
>+{
> nsCOMPtr<nsIDocShellTreeNode> dsn(do_QueryInterface(GetDocShell()));
> NS_ENSURE_TRUE(dsn, nullptr);
>
> nsCOMPtr<nsIDocShellTreeItem> child;
>- dsn->FindChildWithName(reinterpret_cast<const PRUnichar*>(chars),
>+ dsn->FindChildWithName(PromiseFlatString(aName).get(),
All the callers pass an nsString of some sort, so if you make aName const nsString& you can just call .get() directly.
Assignee | ||
Comment 3•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
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
•