If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Remove MochiKit dependency and unite XHR calls

RESOLVED FIXED

Status

Other Applications
QA Companion
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: harth, Assigned: harth)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

9 years ago
We're using MochiKit for JSON handling and url encoding. Since we won't be supporting Firefox 2.0 for the next release, we can use the native JSON support and the native encodeURIComponent instead of including something as big as MochiKit. We should just make our own JSON/XHR handing functions for common use. We also have some extra code with respect to Bugzilla access that we don't use at all, so that should be taken out.
(Assignee)

Comment 1

9 years ago
Created attachment 361303 [details] [diff] [review]
just my changes

patch just showing my changes.
This adds getJSON, getText, getXML, and urlEncode functions to common.js to replace the previous MochiKit functionality. This also removes the "login to Bugzilla" and "write to Bugzilla" functions from bugAccess.js as we don't use these at all right now and changes the way we parse bug lists - it now retrieves bug lists in the "atom" format and queries the xml.
(Assignee)

Comment 2

9 years ago
Created attachment 361304 [details] [diff] [review]
patch that removes MochiKit

patch with that has above changes and removes MochiKit
Attachment #361304 - Flags: review?(ctalbert)
(Assignee)

Comment 3

9 years ago
oh, I forgot to add that this patch also:

* fixes bug that surfaced after JSON changes where onselect fires on litmus test list the first time the listbox is loaded, so it tries to load an "undefined" test at first. added check to "handleSelect" function in litmus.js.

* turns bugAccess into a literal object, I don't think we need more than one instance of a bugAccess object and it doesn't need to hold any state anyways, just functions.

Comment 4

9 years ago
Comment on attachment 361304 [details] [diff] [review]
patch that removes MochiKit

This is awesome.  In my testing it feels about 5-10 times faster!! Nice work!
Attachment #361304 - Flags: review?(ctalbert) → review+

Comment 5

9 years ago
Checked in:
h-203:qac clint$ svn commit -m "bug 477640 patch by harthur - remove mochikit dependency and unite XHR calls r=ctalbert"
Sending        chrome/content/MochiKit/MochiKit.js
Sending        chrome/content/MochiKit/__package__.js
Sending        chrome/content/accountcreate.xul
Sending        chrome/content/browserOverlays.xul
Sending        chrome/content/common.js
Sending        chrome/content/litmus.js
Sending        chrome/content/qa.xul
Sending        chrome/content/setup.xul
Sending        chrome/content/tabs/bugAccess.js
Sending        chrome/content/tabs/bugzilla.js
Transmitting file data ..........

And also svn delete'd chrome/content/MochiKit

Updated

9 years ago
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.