GM_xmlhttpRequest really needs a synchronous mode. #1269

Closed
wants to merge 7 commits into
from

Conversation

Projects
None yet
4 participants
@meh
Contributor

meh commented Jan 28, 2011

Shouldn't be a problem to merge to master.

Or reimplement it in some other way, this was just a fast hack to get something I needed working.

Thanks.

@meh

This comment has been minimized.

Show comment
Hide comment
@meh

meh Jan 28, 2011

Contributor

Eh, obvious security bugs, didn't read the setupRequestEvent properly.

There shouldn't be security issues now.

Contributor

meh commented Jan 28, 2011

Eh, obvious security bugs, didn't read the setupRequestEvent properly.

There shouldn't be security issues now.

@erikvold

This comment has been minimized.

Show comment
Hide comment
@erikvold

erikvold Apr 16, 2011

Contributor

why is a synchronous mode needed? it's a terrible thing to do..

Contributor

erikvold commented Apr 16, 2011

why is a synchronous mode needed? it's a terrible thing to do..

@meh

This comment has been minimized.

Show comment
Hide comment
@meh

meh Apr 16, 2011

Contributor

Because asynchronous requests aren't always the best way, and I don't see why not giving the developer the chance to use synchronous requests.

Contributor

meh commented Apr 16, 2011

Because asynchronous requests aren't always the best way, and I don't see why not giving the developer the chance to use synchronous requests.

@erikvold

This comment has been minimized.

Show comment
Hide comment
@erikvold

erikvold Apr 16, 2011

Contributor

Because asynchronous requests aren't always the best way

when is it not?

Contributor

erikvold commented Apr 16, 2011

Because asynchronous requests aren't always the best way

when is it not?

@meh

This comment has been minimized.

Show comment
Hide comment
@meh

meh Apr 16, 2011

Contributor

In my case I had to try multiple lyrics website one after another if the previous failed, and setting up it to work with asynchronous requests would be an useless overengineering when there's synchronous mode.

Contributor

meh commented Apr 16, 2011

In my case I had to try multiple lyrics website one after another if the previous failed, and setting up it to work with asynchronous requests would be an useless overengineering when there's synchronous mode.

@erikvold

This comment has been minimized.

Show comment
Hide comment
@erikvold

erikvold Apr 16, 2011

Contributor

In my case I had to try multiple lyrics website one after another if the previous failed, and setting up it to work with asynchronous requests would be an useless overengineering when there's synchronous mode.

It's not useless.. synchronous xhr locks the ui, asynchronous requests do not lock the ui..

Contributor

erikvold commented Apr 16, 2011

In my case I had to try multiple lyrics website one after another if the previous failed, and setting up it to work with asynchronous requests would be an useless overengineering when there's synchronous mode.

It's not useless.. synchronous xhr locks the ui, asynchronous requests do not lock the ui..

@meh

This comment has been minimized.

Show comment
Hide comment
@meh

meh Apr 17, 2011

Contributor

It doesn't lock the UI for me.

And once again, leave the choice to the developer.

Contributor

meh commented Apr 17, 2011

It doesn't lock the UI for me.

And once again, leave the choice to the developer.

@na-ji

This comment has been minimized.

Show comment
Hide comment
@na-ji

na-ji Apr 28, 2011

That right, the possibility to have a synchronous mode for the function GM_xmlhttprequest will really help the developers. In some case, it can be very usefull.

That why as meh said, leave the choice to the developer is a great solution.

Thanks.

na-ji commented Apr 28, 2011

That right, the possibility to have a synchronous mode for the function GM_xmlhttprequest will really help the developers. In some case, it can be very usefull.

That why as meh said, leave the choice to the developer is a great solution.

Thanks.

Merge remote-tracking branch 'upstream/master'
Conflicts:
	content/xmlhttprequester.js

arantius added a commit to arantius/greasemonkey that referenced this pull request Aug 5, 2011

Merge commit '51e17b7c703c75c074811a57e230690ef2fc077d'
Conflicts:
	content/xmlhttprequester.js

Fixes: #1269

@arantius arantius closed this Aug 5, 2011

@arantius

This comment has been minimized.

Show comment
Hide comment
@arantius

arantius Aug 9, 2011

Collaborator

In at least some circumstances, this is currently failing with
Error: Permission denied for <http://arantius.com> to get property Object.status Source File: file:///.../gm_scripts/sync_gm_xhr_test/sync_gm_xhr_test.user.js Line: 14
Though I'm sure I saw it work at least once, also.
Currently testing in: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110628 Ubuntu/10.04 (lucid) Firefox/3.6.18

Test case: https://gist.github.com/1134362

Collaborator

arantius commented Aug 9, 2011

In at least some circumstances, this is currently failing with
Error: Permission denied for <http://arantius.com> to get property Object.status Source File: file:///.../gm_scripts/sync_gm_xhr_test/sync_gm_xhr_test.user.js Line: 14
Though I'm sure I saw it work at least once, also.
Currently testing in: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110628 Ubuntu/10.04 (lucid) Firefox/3.6.18

Test case: https://gist.github.com/1134362

@arantius arantius reopened this Aug 9, 2011

@arantius

This comment has been minimized.

Show comment
Hide comment
@arantius

arantius Aug 9, 2011

Collaborator

Working on Mozilla/5.0 (X11; Linux i686 on x86_64; rv:7.0a2) Gecko/20110809 Firefox/7.0a2.

Collaborator

arantius commented Aug 9, 2011

Working on Mozilla/5.0 (X11; Linux i686 on x86_64; rv:7.0a2) Gecko/20110809 Firefox/7.0a2.

@arantius

This comment has been minimized.

Show comment
Hide comment
@arantius

arantius Aug 9, 2011

Collaborator

Also working: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1.

So, failing in 3 only, working in 4+.

Collaborator

arantius commented Aug 9, 2011

Also working: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1.

So, failing in 3 only, working in 4+.

@arantius arantius closed this in c12141c Aug 10, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment