Closed Bug 748086 Opened 13 years ago Closed 12 years ago

Factors out usages of synchronous XHR requests and rewrite it to use channel instead

Categories

(Add-on SDK Graveyard :: General, defect, P2)

x86_64
Windows 7
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ochameau, Assigned: zer0)

References

Details

Attachments

(1 file, 3 obsolete files)

We are currently using synchronous XHR request in multiple places. We first need to factors out these usages. Then we need to use nsIChannel instead as synchronous xhr requests introduce dark magic side effects.
Assignee: nobody → zer0
Irakli, I've opened this followup bug of html localization. Matteo seems to be already working on this.
Pointer to Github pull-request
Attachment #656867 - Flags: review?(evold)
Attachment #659052 - Flags: review?(zer0) → review-
Attachment #659052 - Flags: review- → review?(zer0)
Attachment #656867 - Flags: review?(evold) → review-
I forked your branch @ZER0 The branch adds some tests and updates the async method slightly.
Attachment #659052 - Flags: review?(zer0) → review+
Commits pushed to master at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/f89e9bb0d3ec1bf2fb27835d70b8701f2d83dde3 Bug 748086 - Factors out usages of synchronous XHR requests - Introduced `api-utils/url/io` module - Added docs and unit test - Updated modules to use the new modules (except `tab-browser` because is going to be deprecated) - Deprecated `require("api-utils/utils/data").getChromeURIContent`, left for internal uses. - Replaced `console.warn` with `console.error` for deprecated functions in `data.js` (see bug 785826) https://github.com/mozilla/addon-sdk/commit/59aa19043e765eac57d4e20c2f7b79b4c9d47ef0 Merge remote-tracking branch 'upstream/master' into readURI/Bug748086 https://github.com/mozilla/addon-sdk/commit/ecdd2049963d78463044ab5eb0b0bf35535f8178 Merge remote-tracking branch 'origin/readURI/Bug748086' into readURI/Bug748086 https://github.com/mozilla/addon-sdk/commit/9fde5ac5df1ea124196965ffef702335c035b807 Merge remote-tracking branch 'upstream/master' into readURI/Bug748086 Conflicts: packages/api-utils/lib/traceback.js https://github.com/mozilla/addon-sdk/commit/a86beb02fa63d9e1b8b559bc1940c776f488bd07 Merge pull request #542 from ZER0/readURI/Bug748086 Fix Bug 748086 - Factors out usages of synchronous XHR requests r=@erikvold
Pointer to Github pull-request
Attachment #660471 - Flags: review?(evold)
Attachment #660471 - Flags: review?(evold) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Commit pushed to master at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/5339863d6c864bef094bd4ac687c8033f47abcc1 Revert "Merge pull request #542 from ZER0/readURI/Bug748086" This reverts commit a86beb02fa63d9e1b8b559bc1940c776f488bd07, reversing changes made to 9f77a34f698efefb4fb3406a2f0f61f30aee621d.
This is the new pull request that fix the issue on `cfx testcfx` introduced with https://github.com/mozilla/addon-sdk/pull/542. Basically now that `self` module uses `readURI` (and therefore `url/io` module), the smallest XPI possible contains at least `self`, `url/io`, and its dependencies (`promise` and `utils/object`). This patch has all the previous code from pull #542 plus the fix for `testcfx`.
Attachment #659052 - Attachment is obsolete: true
Attachment #660471 - Attachment is obsolete: true
Attachment #660867 - Flags: review?(evold)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #660867 - Flags: review?(evold) → review+
Commits pushed to master at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/832f7de819d6f948a4515220ac2c37d5938f7868 Bug 748086 - Factors out usages of synchronous XHR requests - Introduced api-utils/url/io module - Added docs and unit test - Updated modules to use the new modules (except tab-browser because is going to be deprecated) - Deprecated require("api-utils/utils/data").getChromeURIContent, left for internal uses. - Replaced console.warn with console.error for deprecated functions in data.js (see bug 785826) - Fixed testcfx adding new modules dependecies https://github.com/mozilla/addon-sdk/commit/fd2bbd2d3fff3d1d11bf1f61d4b6dc7d4639ad9c Merge pull request #570 from ZER0/readURI-fixed/Bug748086 Fix Bug 748086 - Factors out usages of synchronous XHR requests r=@erikvold
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: