[Webkit-unassigned] [Bug 63615] Allow notification origin permission request when no js callback is provided

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 25 02:53:37 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=63615





--- Comment #9 from Alexandre Mazari <scaroo at gmail.com>  2011-10-25 02:53:38 PST ---
Eric, Darin, Phillipe,

thanks for your reviews and pardon my late answer, I was dragged out by other stuffs.

I did not include a specific test for that patch because checkPermission is already called without argument within the existing 'fast/notifications/notifications-document-close-crash.html' test.
Is a specific test case required, then ?


eric: "I mgiht have used a local object for the global object to make this line more readable, but this is also OK."
darin: "But I’m not sure why you added a local variable for the global object. I personally don’t think it enhances readability."

Little puzzled here :)


darin: "Also, if we declared the callback local variable outside of the if statement we would not need an else."

I remember trying that, but compiler complained of a re-affectation of the RefPtr. Would something like the following match your comment:

JSCustomVoidCallback* callback = 0;
if (exec->argument(0).isObject()) {
   callback = JSCustomVoidCallback::create(exec->argument(0).getObject(),
            toJSDOMGlobalObject(static_cast<Document*>(context), exec)).release();
}
impl()->requestPermission(callback);

Again, thanks for having a look at it !

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list