[Project_owners] Defining new array methods (SeaMonkey vs Firefox).

Philip Chee philip.chee at gmail.com
Fri Jun 23 16:19:15 EDT 2006

On Fri, 23 Jun 2006 04:02:31 +0400, Peter B. Shalimoff wrote:
> Philip Chee wrote:

>> Anybody know why the following code causes problems in SeaMonkey 1.0.2
>> but not in Firefox
>> Array.prototype.inArray = function (value) {
>> In SM there are random js errors in both SM code and extension
>> code, I think when functions access arrays in certain ways.

> Because of this, I guess:
> http://www.mozdev.org/source/browse/pagebookmarks/src/content/pagebookmarks/
> pgbm-ecma-Array.js?rev=1.2&content-type=text/x-cvsweb-markup

Bingo! "Error: prefName.substr is not a function" Same error here.

But can anybody explain why this happens?

// TODO: To thank that character who wrote that piece of code
// in navigator.js that uses for-in to enumerate array elements
// w/o any type checks.

I don't see how this line in navigator.js could have worked anyway:

var array = pref.getChildList(this.domain, {});

since according to XULPlanet, getChildList() is defined as:

void getChildList ( char* startingAt , out PRUint32 count , out arrayof
char* childArray


Philip Chee <philip at aleytys.pc.my>, <philip.chee at gmail.com>
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.
[ ]When you know, you know; when you don't know, admit it.
* TagZilla 0.059

More information about the Project_owners mailing list