Closed Bug 380877 Opened 13 years ago Closed 12 years ago

FUEL: Application object is undefined on OSX after a clobber

Categories

(Firefox :: General, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: mfinkle, Assigned: mossop)

References

()

Details

Attachments

(1 file)

Only in OSX and only after a clobber. Unit tests fail with following errors:

*** 0 INFO SimpleTest START
*** 1 INFO Running /tests/browser/fuel/test/test_Application.html...
*** 2 ERROR FAIL | Error thrown during test: Application is not defined | got 0, expected 1
*** 4 INFO Running /tests/browser/fuel/test/test_ApplicationPrefs.html...
*** 5 ERROR FAIL | Error thrown during test: Application is not defined | got 0, expected 1
*** 7 INFO Running /tests/browser/fuel/test/test_ApplicationStorage.html...
*** 8 ERROR FAIL | Error thrown during test: Application is not defined | got 0, expected 1
*** 10 INFO Running /tests/browser/fuel/test/test_Extensions.html...
*** 11 ERROR FAIL | Error thrown during test: Application is not defined | got 0, expected 1
We thought this only happened on tinderboxes (due to some configuration issue) but that is not the case. It can happen in local builds and even (1 reported case) in nightlies.
I believe that what's happening is this: when the DOM is first initialized on first-run, it ends up in nsScriptNameSpaceManager::Init very early in the loading process (I don't know exactly when, but I'm going to assume that it's before XPCOM component registration, sometime during xpconnect initialization). This is what loads global objects. Because the FUEL component isn't registered in the category manager yet, it won't load that property.

Subsequent runs will already have FUEL in the category manager and will load correctly.

I'm a bit hazy on how the scriptnamespacemanager actually interacts with JS component loading: if we update the hashtable with new loaders as they are registered in the category manager, will they automatically show up on existing JS component scopes?
I believe it's actually because the app bundle is getting built before fuel. and so contains whatever version of fuel was there previously (in a clobber build nothing). Moving the fuel dir before app would fix it I think.

http://mxr.mozilla.org/seamonkey/source/browser/Makefile.in#45
This builds fuel before the app bundle which I think should work
Assignee: nobody → dtownsend
Status: NEW → ASSIGNED
Attachment #281154 - Flags: review?
Attachment #281154 - Flags: review? → review?(benjamin)
Comment on attachment 281154 [details] [diff] [review]
change build order

duh, yeah
Attachment #281154 - Flags: review?(benjamin)
Attachment #281154 - Flags: review+
Attachment #281154 - Flags: approval1.9+
Checked in, going to see if I can do a clobber of the mac unit tester to check that this worked.

Checking in browser/Makefile.in;
/cvsroot/mozilla/browser/Makefile.in,v  <--  Makefile.in
new revision: 1.18; previous revision: 1.17
done
Clobber build passed all fuel tests.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.