Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Prevent segmentation fault when Render does not have 3 arguments. #298

Closed
wants to merge 2 commits into from
Closed

Prevent segmentation fault when Render does not have 3 arguments. #298

wants to merge 2 commits into from

Conversation

chobie
Copy link

@chobie chobie commented Mar 17, 2012

Hi, i'll try to use webkit_server with socket.

Render command cause segmentation fault when it does not have correct argument count.

Thanks,
Shuhei

@jferris
Copy link
Member

jferris commented Mar 23, 2012

Thanks for the patch. However, we don't pull in anything without tests. Can you please add tests for this?

@chobie
Copy link
Author

chobie commented Mar 24, 2012

Okay, I'll write test case for this patch. By the way, It seems there are no test cases for webkit_server.
Should I use QTestLib?

@jferris
Copy link
Member

jferris commented Mar 24, 2012

All the tests are in Ruby, and test the Ruby interface. If there isn't a way to expose an issue without using the Ruby interface, we don't consider that a bug, since the Javascript and network interfaces are internal.

@chobie
Copy link
Author

chobie commented Mar 25, 2012

Thank you for your advice.

I've added test case for it.

Capybara::Driver::Webkit.render checks their options. So basically, webkit_server doesn't cause segmentation fault.
for now, I've used command method and invoke Render command directly at this time.
As I'd like to check webkit_server cause segmentation fault.

please close issue if you think this modification are too much :)

@jferris
Copy link
Member

jferris commented Mar 25, 2012

@chobie Out of curiosity, why are you calling command directly?

@chobie
Copy link
Author

chobie commented Mar 25, 2012

As the render function fixed width and height when given arguments are weird.
I don't have a good idea for reproducing the issue. so I choose using command directly.

Why I create this issue: One day, I looked into the webkit_server implementation.
As I'd like to know how capybara-webkit works fine. It's very straight forward for me.
But some commands has possibility for segmentation fault. IMHO, The webkit_server should not die when
whatever commands given. so I sent the pull request.

Thank you for reading.

@mike-burns
Copy link
Member

@chobie I'm slightly confused: were you able to reproduce this in a real app, or is this just a precaution?

@chobie
Copy link
Author

chobie commented Mar 30, 2012

@mike-burns I'm sorry for making you confused. It's just a precaution.

@jferris
Copy link
Member

jferris commented Apr 3, 2012

Thanks for looking into this, but since there's no realistic way to run into this while using capybara-webkit, I don't think we want to pull this in. The added test will just lengthen the test suite and make it a little harder to refactor.

@jferris jferris closed this Apr 3, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants