Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GM_xmlhttpRequest - ftp, invalid url, network error #2423

Closed

Conversation

janekptacijarabaci
Copy link
Contributor

@janekptacijarabaci janekptacijarabaci commented Aug 20, 2016

1)

FTP

Firefox throws an errors in the Error Console:
Component returned failure code: 0x80004002 (NS_NOINTERFACE) [nsISupports.QueryInterface]

2)

Invalid url (e.g. http://?http://www.example.org)

Issue was fixed (Firefox 50):

Last bad: 50.0a1 (2016-07-13)
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
Built from https://hg.mozilla.org/mozilla-central/rev/04821a70c739a00d12e12df651c0989441e22728

First good: 50.0a1 (2016-07-14)
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
Built from https://hg.mozilla.org/mozilla-central/rev/08f8a5aacd8308a73f6040fe522be7ba38497561

Pushlog
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=04821a70c739a00d12e12df651c0989441e22728&tochange=08f8a5aacd8308a73f6040fe522be7ba38497561

The suspects are: 1207233, 1275746 + 1274250 (refferer).

Network error (e.g. http://nonexistent-origin.w3c-test.org}:80 - synchronous: true)
Issue was fixed (Firefox 51): https://bugzilla.mozilla.org/show_bug.cgi?id=918751

Firefox throws an errors in the Error Console (empty string):
_invalidurl

arantius and others added 30 commits May 29, 2015 11:16
Content can see resource: but not chrome: URLs.  And chrome: works fine for JSM import.

Fixes greasemonkey#1787
Start much smaller, allow the user to change the size, remember the size.

Fixes greasemonkey#2191
1) Store menu commmands' data in a private closure, *in the sandbox*.
2) To list registered commands:
  a) Parent/chrome passes a message to child/frame.
  b) Frame passes an event (visible to content) into the sandbox.
  c) Sandbox passes private-closure-scoped commands' data to a frame-scoped callback.
  d) Frame passes data up to parent as a message.
  e) Chrome uses this data to populate the menu, at popupshowing time.
3) To run a command:
  a) User clicks on the menu item.
  b) Chrome sends a message to the frame.
  c) Frame sends an event to the sandbox.
  d) Sandbox finds the related registered command, calls its callback.

Phew!  But no references to documents/windows/browsers are ever stored anywhere, so they can't possibly leak anymore.

Along the way, simplify frame script by moving object methods to standalone functions; less state, less binding to fix "this" references.  The ContentObserver object is now really just there for `.observe()`.

TODO: Restore "delayed execution" feature, the only other usage of the (removed) ScriptRunner structure.

Refs: greasemonkey#2200
Refs: greasemonkey#2067
Just in case, so the command object cannot be changed.
Prevent event propagation when appropriate.  Add a random suffix to the event names, so content cannot predict the event name, and thus cannot listen for it.
I.e. from an old Sync record which did not specify user matches.  Default to nothing.

Fixes greasemonkey#2188
It's too late.  IDs are set.  Changing them would be a giant mess.
by default sandboxes are created in the system zone which has a lifetime
equal to that of the process and has a fairly large footprint.

Since GM sandboxes are scoped to individual content pages they should be
allocated in the same GC zone as the content. This allows them to be
discarded together and also reduces the footprint (and thus GC overhead)
for the system zone.
Framescripts get loaded for each tab, this means each tab registered a
callback with the global observer service.

Move the observer registration to a module and dispatch from a hash
table instead, that reduces the number of callbacks called per
document-element-inserted from N to 1.
arantius and others added 23 commits August 2, 2016 11:51
# Conflicts:
#	components/greasemonkey.js
#	modules/scriptProtocol.js
By optimizing for speed over reliability.  Generally by moving things from disk to memory.

Fixes greasemonkey#2197
Un-translated English for new strings, at least.
@janekptacijarabaci janekptacijarabaci changed the title GM_xmlhttpRequest - ftp, invalid url (the fix of the problem) GM_xmlhttpRequest - ftp, invalid url, network error Sep 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants