Closed Bug 107104 Opened 23 years ago Closed 23 years ago

Throbber busted; js error since complexvalue, not string, returned

Categories

(SeaMonkey :: UI Design, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jrgmorrison, Assigned: bnesse)

Details

Attachments

(1 file)

Almost hate to file this after that supah checkin to clean up all the pref stuff but there was a problem with one of the changes. The throbber is broken since the change in utilityOverlay.js which is pulling out a complex value instead of what was formerly a string. The error is 'url.indexOf is not a function, line 233, utilityOverlay.js' but the problem starts with the caller goClickThrobber(). I have a patch (but just wondering if there are any other similar changes that need a tweak).
Comment on attachment 55372 [details] [diff] [review] holy five character patch (adds .data) r=jag
Attachment #55372 - Flags: review+
Fixed.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Wierd. Alec and I discussed this on aim, and came to the conclusion that it shouldn't be necessary. I wonder if the PrefLocalizedString is not correctly handling the toString conversion...
QA Contact: sairuh → claudius
Why would toString() be called on an object if I call a method on it? Copying some of the code, commenting out the |.data|: 203 url = pref.getComplexValue(urlPref, Components.interfaces.nsIPrefLocalizedString) /*.data*/; 211 openTopWin(url); 224 function openTopWin( url ) 230 if ((url == null) || (url == "")) return; 233 if (url.indexOf("urn:") == 0) ^^^ url is still a nsIPrefLocalizedString here, which doesn't have an |indexOf| method. |toString()| conversion only automatically happens when an object is evaluated in a string context, I think (e.g. dump, ""+obj).
You are definitely correct. After looking at it this morning I realized the same thing. Bad thought processes on my part.
mass-verifying claudius' Fixed bugs which haven't changed since 2001.12.31. if you think this particular bug is not fixed, please make sure of the following before reopening: a. retest with a *recent* trunk build. b. query bugzilla to see if there's an existing, open bug (new, reopened, assigned) that covers your issue. c. if this does need to be reopened, make sure there are specific steps to reproduce (unless already provided and up-to-date). thanks! [set your search string in mail to "AmbassadorKoshNaranek" to filter out these messages.]
Status: RESOLVED → VERIFIED
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: