[Webkit-unassigned] [Bug 72589] [GTK] Expose accessibility hierarchy in WebKit2 to ATK/AT-SPI based ATs

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 4 00:47:46 PST 2012


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





--- Comment #12 from Carlos Garcia Campos <cgarcia at igalia.com>  2012-01-04 00:47:46 PST ---
(In reply to comment #8)
> Created an attachment (id=120955)
 --> (https://bugs.webkit.org/attachment.cgi?id=120955&action=review) [details]
> Patch proposal

> > > Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp:64
> > > +    // Change the child's stdout file descriptor to be non-blocking.
> > > +    if (fcntl(child_stdout, F_SETFL, fcntl(child_stdout, F_GETFL) | O_NONBLOCK) == -1) {
> > > +        perror("Error calling fcntl over child's stdout file descriptor");
> > > +        return FALSE;
> > > +    }
> > 
> > You could use ia GIOChannel for this:
> > 
> > outChannel = g_io_channel_unix_new(childStdout);
> > GOwnPtr<GError> error;
> > g_io_channel_set_flags(outChannel, G_IO_FLAG_NONBLOCK, &error.outPtr());
> > if (error) {
> >     g_printerr("Error bla bla bla: %s\n", error->message);
> >     return FALSE;
> > }
> > 
> > > Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp:66
> > > +    // Wait for child to say it's ready till MAX_WAIT_FOR_CHILD.
> > 
> > Using a io channel you can just add a watch for this:
> > 
> > g_io_add_watch(outChannel, G_IO_IN, readStdoutFunction, 0);
> 
> Already thought of that, but I can't use a GIO channel here because it uses sources and the main loop to handle events through that callback, and I can't afford that because it would mean that the execution of the test function's code will continue after adding the watch, therefore finishing the test before having a chance to handle the input data coming through the channel.
> 
> Instead, I need to *block* on that point and wait either until some data has been received from the child process or a timeout has ocurred, in order to know that I'm ready to start testing things.
> 
> So, I haven't changed anything in this regard. It still looks to me like the current approach is the one we need in here.
> 

If you need to block, why don't use g_spawn_sync() instead of the async version?

-- 
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