Closed Bug 11166 Opened 25 years ago Closed 25 years ago

[PP]Gestalt: Mac only method unexpectedly returns nothing

Categories

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

PowerPC
Mac System 8.5

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jimmykenlee, Assigned: samir_bugzilla)

Details

Build: 7/30/99 SeaMonkey build

1. From http://jimbob/trigger2.html, trigger
   http:://jimbob/jars/a_mac_gestalt.jar

Install.StartInstall("Acceptance: a_mac_gestalt", "acceptance", vi, 0);
f = Install.Gestalt("sysv", "myVersion");
g = Install.Gestalt("ram ", "myRAMSize");
mySystemVersion = myVersion;
myPhysicalRAMSize = myRAMSize;
Install.LogComment("gestaltSystemVersion returns = " + mySystemVersion);
Install.LogComment("gestaltPhysicalRAMSize returns = " + myRAMSize);

RESULT:
The Mac system values requested are not returned.  The Install.log shows:
---------------------------------------------------------------------------
http://jimbob/jars/a_mac_gestalt.jar  --  08/03/1999  10:36:03
---------------------------------------------------------------------------

Acceptance: a_mac_gestalt

Finished Installation  08/03/1999 10:36:04

EXPECTED RESULT:
The Mac system values requested are written to the Install.log file.
Summary: Gestalt: Mac only method unexpectedly returns nothing → [PP]Gestalt: Mac only method unexpectedly returns nothing
Putting on [PP] radar
Assignee: cathleen → sgehani
Target Milestone: M11
Status: NEW → ASSIGNED
The call to Gestalt in the cited install script is not compliant with the
currently exported interface for Install.Gestalt. Docs for 4.5 reflect that an
out param (long*) for response would be filled on return. In Mozilla, the method
sig will be:

     int Install.Gestalt(String selector);

where the returned int is the response value. If the number is negative it
reflects the OSErr value returned by the native Gestalt() we call. Per Gestalt
Manager docs possible returned err codes are:

         0     No error
     -5550     Could not obtain the response
     -5551     Undefined selector

Note that the noErr value (0) will be masked by the response if the response is
in fact valid.

An example install script using this API can be viewed at:
http://puma/xpinstall/test/gestalt/install.js
The corresponding jar exists at:
http://puma/xpinstall/test/gestalt.jar
and can be triggered from the testcase pulldown on the trigger page:
http://puma/xpinstall/test/trigger.html (tescase = Gestalt CPU Type)
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Amongst the problems with this API we were calling ourselves recursively (and
due to lucky circumstances were not looping infintely). We are now calling the
native ::Gestalt(). The four char code extracted from the selector string passed
in was not being cast properly. We are ensuring this through direct bit
manipulation now. Fix checked in.
Status: RESOLVED → VERIFIED
Build 8/25/99 M10

Looks good.
Bulk move of XPInstall (component to be deleted) bugs to Installer: XPInstall
Engine
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.