Closed Bug 871460 Opened 12 years ago Closed 12 years ago

Crash in mozilla::dom::NotificationPermissionRequest::Run() with extension managing desktop notification

Categories

(Core :: DOM: Core & HTML, defect)

22 Branch
All
Windows 7
defect
Not set
critical

Tracking

()

RESOLVED DUPLICATE of bug 874090
Tracking Status
firefox21 --- unaffected
firefox22 --- affected
firefox23 --- affected

People

(Reporter: pwp824, Unassigned)

References

Details

(Keywords: crash, regression, testcase)

Crash Data

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31 Steps to reproduce: I'm developing a firefox extension with tranditional XUL. This firefox extension opens connection with server and will popup a desktop notification if it receives certain messages. Actual results: I tried the desktop notification with Aurora version 22.0a2. But each time the extension call the Notification, the Aurora crashed. Even I called Notification.permission or Notification.requestPermission(callback), the Aurora crashed too. This sample http://jsbin.com/notification/571/edit works fine. So, desktop notification not supported in extension?
Component: Untriaged → Extension Compatibility
Could you type about:crashes in URL bar and post some crash reports (bp-...). In addition, is it possible to attach a simple extension with desktop notification crashing Firefox?
Flags: needinfo?(pwp824)
Keywords: testcase-wanted
Extension to show how the desktop notification works in aurora. By clicking the submenu Hello World of menu helloworld should show the desktop notification but the firefox crashed.
Flags: needinfo?(pwp824)
Attachment #748748 - Attachment mime type: application/octet-stream → application/x-xpinstall
Thanks for the extension testcase, crash confirmed. CR on FF23: https://crash-stats.mozilla.com/report/index/bp-d6312654-89ed-4193-a064-e7ef72130513
Severity: normal → critical
Status: UNCONFIRMED → NEW
Crash Signature: [@ mozilla::dom::NotificationPermissionRequest::Run() ]
Ever confirmed: true
Summary: Desktop notification not working in extension? → Crash in mozilla::dom::NotificationPermissionRequest::Run() with extension managing desktop notification
Component: Extension Compatibility → DOM
Product: Firefox → Core
good=2013-03-18 bad=2013-03-19 http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=b03bb3ce8cee&tochange=e23e43a2c14e There are many patches in bug 782211, maybe narrowing down will help.
Blocks: 782211
(In reply to Loic from comment #5) > There are many patches in bug 782211, maybe narrowing down will help. It's part 7 based on the first frame of the stack trace.
110 mPrincipal->GetURI(getter_AddRefs(uri)); 111 bool isFile; 112 uri->SchemeIs("file", &isFile); This will crash with a null-deref as here if mPrincipal is system, right?
Flags: needinfo?(wchen)
Duplicated. I proposed a patch here Bug 874090
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
bz yes, that was the reason.
Flags: needinfo?(wchen)
Happy to see that this bug is fixed. I have one question but I do not know where to post, sorry if caused any spam. I view the W3C Web Notification(http://www.w3.org/TR/notifications/#notification-lists) specification and it listed that developer can set the notification show timeout with: new Notification("New Email Received", { iconUrl: "mail.png", onshow: function() { setTimeout(notification.close(), 15000); } }); As I didn't find any other docs for this in firefox, so I followed the setTimeout here, but seems the timeout not working, no matter I set it to 15 secs or 60 secs etc, the notification just closed within several secs, very short time. So, did I miss something on setting timeout? Is it supported or not?
That spec has a buggy example. You want setTimeout(notification.close, 15000), without the extra "()".
Thanks, without "()" no error shown up, but the timeout has not taken effect. Both tried: notification.onshow = function() { setTimeout(notification.close, 60000); } and var notification = new Notification("This is a title", { dir: "auto", lang: "", body: "This is a notification body", tag: "sometag", onshow: function() { setTimeout(notification.close, 60000); } }); Notification just closed maybe as default timeout?
No idea on that...
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: