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)
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.
Reporter | ||
Comment 1•13 years ago
|
||
Here is synchronous xhr usages:
https://github.com/mozilla/addon-sdk/blob/master/packages/api-utils/lib/l10n/core.js#L28-35
https://github.com/mozilla/addon-sdk/blob/master/packages/api-utils/lib/self!.js#L14-22
Here is synchronous "non-binary"? channel usages:
https://github.com/mozilla/addon-sdk/blob/master/packages/addon-kit/lib/page-mod.js#L75-92
https://github.com/mozilla/addon-sdk/blob/master/packages/api-utils/lib/traceback.js#L13-29
And in bootstrap.js but we can't easily factor its out
Binary synchronous channel usages:
https://github.com/mozilla/addon-sdk/blob/master/packages/api-utils/lib/tab-browser.js#L717-729
Actually, there already is an exposed implementation of synchronous binary channel:
https://github.com/mozilla/addon-sdk/blob/master/packages/api-utils/lib/utils/data.js#L43-60
Reporter | ||
Updated•13 years ago
|
Assignee: nobody → zer0
Reporter | ||
Comment 2•13 years ago
|
||
Irakli, I've opened this followup bug of html localization.
Matteo seems to be already working on this.
Priority: -- → P2
Assignee | ||
Comment 3•12 years ago
|
||
Pointer to Github pull-request
Assignee | ||
Updated•12 years ago
|
Attachment #656867 -
Flags: review?(evold)
Comment 4•12 years ago
|
||
Pointer to Github pull-request
Updated•12 years ago
|
Attachment #659052 -
Flags: review?(zer0)
Updated•12 years ago
|
Attachment #659052 -
Flags: review?(zer0) → review-
Updated•12 years ago
|
Attachment #659052 -
Flags: review- → review?(zer0)
Updated•12 years ago
|
Attachment #656867 -
Flags: review?(evold) → review-
Comment 5•12 years ago
|
||
I forked your branch @ZER0
The branch adds some tests and updates the async method slightly.
Attachment #656867 -
Attachment is obsolete: true
Updated•12 years ago
|
Attachment #659052 -
Flags: review?(zer0) → review+
Updated•12 years ago
|
Attachment #659052 -
Flags: review+
Comment 6•12 years ago
|
||
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
Assignee | ||
Comment 7•12 years ago
|
||
Pointer to Github pull-request
Assignee | ||
Updated•12 years ago
|
Attachment #660471 -
Flags: review?(evold)
Updated•12 years ago
|
Attachment #660471 -
Flags: review?(evold) → review+
Assignee | ||
Updated•12 years ago
|
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 8•12 years ago
|
||
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.
Assignee | ||
Comment 9•12 years ago
|
||
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)
Assignee | ||
Updated•12 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•12 years ago
|
Attachment #660867 -
Flags: review?(evold) → review+
Comment 10•12 years ago
|
||
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
Assignee | ||
Updated•12 years ago
|
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Depends on: 793035
You need to log in
before you can comment on or make changes to this bug.
Description
•