Closed Bug 477640 Opened 15 years ago Closed 15 years ago

Remove MochiKit dependency and unite XHR calls

Categories

(Other Applications Graveyard :: QA Companion, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: harth, Assigned: harth)

Details

Attachments

(2 files)

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.
Attached patch just my changesSplinter Review
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.
patch with that has above changes and removes MochiKit
Attachment #361304 - Flags: review?(ctalbert)
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 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+
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
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: