Closed Bug 596498 Opened 15 years ago Closed 15 years ago

E10: remote AlertsService

Categories

(Core :: IPC, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dougt, Assigned: dougt)

References

Details

Attachments

(1 file)

Attached patch patch v.1Splinter Review
We should forward alerts service.
Attachment #475439 - Attachment is patch: true
Attachment #475439 - Attachment mime type: application/octet-stream → text/plain
Attachment #475439 - Flags: review?(josh)
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 on attachment 475439 [details] [diff] [review] patch v.1 Tested via desktop notifications in Fennec
Attachment #475439 - Flags: approval2.0+
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
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.
Depends on: 624740
Assignee: nobody → doug.turner
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: