Closed Bug 298559 Opened 20 years ago Closed 16 years ago

JavaScript split function does not work in XPI install.js

Categories

(Core Graveyard :: Installer: XPInstall Engine, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: dverspui, Unassigned)

Details

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
Build Identifier: Mozilla/5.0 (1.7.5)

The split method of strings in an XPInstall installer script (install.js) does 
not seem to work, while it surely does exist because Install.alert((new String
("test")).split show "function".

Reproducible: Always

Steps to Reproduce:
1. var sStr="test1,test2"; Install.alert(sStr.split(",").length);
2. Install.alert((new String("test1,test2")).split(",").length);
3. Install.alert((new String("test1,test2")).split(new RegExp(",","")).length);
Actual Results:  
1. error: sStr.split is not a function
2. error: undefined is not a constructor
3. error: undefined is not a constructor

Expected Results:  
1. alertbox with "2"
2. alertbox with "2"
3. alertbox with "2"

I start the installer using the InstallTrigger.install method in an custom XUL 
application run with Firefox 1.0.4
Component: Core → XULRunner
Product: Rhino → Toolkit
Version: other → unspecified
Component: XULRunner → Extension/Theme Manager
Product: Toolkit → Firefox
Version: unspecified → 1.0 Branch
fixing product and component
Component: Extension/Theme Manager → Installer: XPInstall Engine
Product: Firefox → Core
Version: 1.0 Branch → Trunk
Assignee: igor → xpi-engine
QA Contact: core
install.js is no longer supported
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.