There should be a NotificationPresenter API to cancel permission request, if the ScriptExecutionContext that issued the request is gone. Loading the following page in Chromium, and clicking the button shows the problem. the request is still visible to the user, even though the NotificationCenter that created it is gone. <html> <script> function remove() { document.getElementById("par").innerHTML="Do not crash"; } </script> Click this button to remove the iframe <button onclick="remove();">click me</button><br> <div id="par"><iframe src="http://slides.html5rocks.com/#slide12" width=800 height=800></iframe></div> </html>
Created attachment 60788 [details] Patch This patch is preparation work for https://bugs.webkit.org/show_bug.cgi?id=41413. It adds a new API NotificationPresenter::cancelRequestsForPermission, but it does not implement or test the API yet. It also changes the parameters passed in NotificationPresenter::checkPermission and NotificationPresenter::requestPermission. These API now use ScriptExecutionContext instead of origin, to provide more information to the client about who issued the request.
Attachment 60788 [details] did not build on chromium: Build output: http://webkit-commit-queue.appspot.com/results/3400376
Created attachment 60871 [details] Patch Attempt to fix Chromium build
That patch seems reasonable to me.
(In reply to comment #4) > That patch seems reasonable to me. Thanks!
Comment on attachment 60871 [details] Patch Looks good to me too as well, r+.
Comment on attachment 60871 [details] Patch Clearing flags on attachment: 60871 Committed r62939: <http://trac.webkit.org/changeset/62939>
All reviewed patches have been landed. Closing bug.
Revision r62939 cherry-picked into qtwebkit-2.1 with commit 58536183c1385be9fa93b1e7c5f875fef0736c93