Я определил наблюдателя http-on-modify-request
в Addon Builder в Mozilla и хочу перенаправить запросы (изменение subject.URI.spec
), но Firefox жалуется на:
Error: An exception occurred.
Traceback (most recent call last):
File "http://chrome.angrybirds.com/", line 2536, in null
File "http://chrome.angrybirds.com/", line 2344, in null
File "http://chrome.angrybirds.com/", line 2988, in wi
File "http://chrome.angrybirds.com/", line 1756, in ti
File "http://chrome.angrybirds.com/", line 1231, in Ji
File "http://chrome.angrybirds.com/", line 3366, in Ri
File "http://chrome.angrybirds.com/", line 2381, in Di
File "http://chrome.angrybirds.com/", line 2956, in Ni
File "http://chrome.angrybirds.com/", line 3366, in DHb
File "http://chrome.angrybirds.com/", line 3340, in oHb
File "http://chrome.angrybirds.com/", line 1869, in Eic
File "http://chrome.angrybirds.com/", line 3285, in BS
File "http://chrome.angrybirds.com/", line 3362, in _Jb
File "http://chrome.angrybirds.com/", line 3054, in _Bb
File "http://chrome.angrybirds.com/", line 2020, in dJb
File "http://chrome.angrybirds.com/", line 2889, in fJb
File "resource://jid0-[snipped id]-api-utils-lib/observer-service.js", line 176, in null
this.callback(subject, data);
File "resource://jid0-[snipped id]-moddedbirds-url-rewriter-lib/main.js", line 11, in null
if(endsWith(s.URI.spec,search)) s.URI.spec=replace;
[Exception... "Component returned failure code: 0x80004004 (NS_ERROR_ABORT)
[nsIURI.spec]" nsresult: "0x80004004 (NS_ERROR_ABORT)" location: "JS frame
:: resource://jid0-[snipped id]-api-utils-lib/securable-module.js
-> resource://jid0-[snipped id]-moddedbirds-url-rewriter-lib/main.js ::
<TOP_LEVEL> :: line 11" data: no]
Почему это не работает?
Может быть, я не могу использовать наблюдателя http-on-modify-request
для перезаписи URI?
Как мне это сделать?