Bug 84825

Summary: New Notification constructor does not take security origin permissions into account
Product: WebKit Reporter: Jon Lee <jonlee>
Component: WebCore Misc.Assignee: Jon Lee <jonlee>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, jianli, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.7   
Attachments:
Description Flags
Patch darin: review+

Jon Lee
Reported 2012-04-24 21:52:29 PDT
Running new Notification() show the notification regardless of whether the security origin has permission to do so. It should instead be calling the onerror() callback.
Attachments
Patch (3.76 KB, patch)
2012-04-24 22:23 PDT, Jon Lee
darin: review+
Radar WebKit Bug Importer
Comment 1 2012-04-24 21:53:02 PDT
Jon Lee
Comment 2 2012-04-24 22:23:39 PDT
Darin Adler
Comment 3 2012-04-24 22:27:13 PDT
Comment on attachment 138738 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=138738&action=review > Source/WebCore/ChangeLog:18 > + (WebCore::Notification::dispatchErrorEvent): The default constructor of ErrorEvent doesn't > + create the proper event object. Create it using Event::create(). Is there a test showing that this was wrong?
Jon Lee
Comment 4 2012-04-24 22:49:19 PDT
(In reply to comment #3) > (From update of attachment 138738 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=138738&action=review > > > Source/WebCore/ChangeLog:18 > > + (WebCore::Notification::dispatchErrorEvent): The default constructor of ErrorEvent doesn't > > + create the proper event object. Create it using Event::create(). > > Is there a test showing that this was wrong? No. The only tests available are of the legacy API, which threw an exception when creating the notification, so there was no situation in which the error event got dispatched. The new behavior based on the latest draft of the spec utilizes this event. There are a series of tasks already in bugzilla for bringing the notifications tests up to date once support for notifications is available on the mac.
Jon Lee
Comment 5 2012-04-24 22:51:55 PDT
Note You need to log in before you can comment on or make changes to this bug.