Closed
Bug 596498
Opened 15 years ago
Closed 15 years ago
E10: remote AlertsService
Categories
(Core :: IPC, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: dougt, Assigned: dougt)
References
Details
Attachments
(1 file)
13.49 KB,
patch
|
jdm
:
review+
mfinkle
:
approval2.0+
|
Details | Diff | Splinter Review |
We should forward alerts service.
Assignee | ||
Updated•15 years ago
|
Attachment #475439 -
Attachment is patch: true
Attachment #475439 -
Attachment mime type: application/octet-stream → text/plain
Attachment #475439 -
Flags: review?(josh)
Comment 1•15 years ago
|
||
Comment on attachment 475439 [details] [diff] [review]
patch v.1
>+ // auto remove when alertfinished is recv
s/recv/received
>+ContentChild::AddRemoteAlertObserver(const nsString& aData,
>+ nsIObserver* aObserver)
align.
Looks good. r=me
Attachment #475439 -
Flags: review?(josh) → review+
Comment 2•15 years ago
|
||
Comment on attachment 475439 [details] [diff] [review]
patch v.1
Tested via desktop notifications in Fennec
Attachment #475439 -
Flags: approval2.0+
Assignee | ||
Comment 3•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 4•15 years ago
|
||
Comment on attachment 475439 [details] [diff] [review]
patch v.1
> NS_IMETHODIMP nsAlertsService::ShowAlertNotification(const nsAString & aImageUrl, const nsAString & aAlertTitle,
> const nsAString & aAlertText, PRBool aAlertTextClickable,
> const nsAString & aAlertCookie,
> nsIObserver * aAlertListener,
> const nsAString & aAlertName)
> {
>+#ifdef MOZ_IPC
>+ if (XRE_GetProcessType() == GeckoProcessType_Content) {
>+ ContentChild* cpc = ContentChild::GetSingleton();
>+
>+ if (aAlertListener)
>+ cpc->AddRemoteAlertObserver(nsDependentString(aAlertCookie), aAlertListener);
>+
>+ cpc->SendShowAlertNotification(nsAutoString(aImageUrl),
>+ nsAutoString(aAlertTitle),
>+ nsAutoString(aAlertText),
>+ aAlertTextClickable,
>+ nsAutoString(aAlertCookie),
>+ nsAutoString(aAlertName));
nsAString isn't guaranteed to be null-terminated. So you can't safely wrap it in an nsDependentString. (I don't know why nsDependentString has an nsAString constructor.) nsAutoString does work, although it's a waste of stack space as nsString would suffice.
Updated•14 years ago
|
Assignee: nobody → doug.turner
You need to log in
before you can comment on or make changes to this bug.
Description
•