Closed
Bug 102657
Opened 24 years ago
Closed 24 years ago
Turbo mode should use an API to check availablity, not an #ifdef
Categories
(Core Graveyard :: QuickLaunch (AKA turbo mode), defect)
Core Graveyard
QuickLaunch (AKA turbo mode)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.6
People
(Reporter: mkaply, Assigned: law)
Details
Attachments
(1 file, 1 obsolete file)
|
704 bytes,
patch
|
law
:
review+
|
Details | Diff | Splinter Review |
Currently, in nsAppRunner.cpp, there is an #ifdef to make turbo mode
work. This is wrong. This means that any time a platform adds turbo
mode it has to modify this #ifdef.
This bug adds a new API, supportsServerMode, to nsNativeAppSupport.
This allows any platform that wants to support turbo mode to simply
override this method and set the value to true.
Diff attached for Windows and Os/2
| Reporter | ||
Comment 1•24 years ago
|
||
| Reporter | ||
Comment 2•24 years ago
|
||
Copying dp since he did this work in nsAppRunner
Comment 3•24 years ago
|
||
->turbo/quicklaunch
Assignee: pchen → law
Component: XP Apps → QuickLaunch (AKA turbo mode)
QA Contact: sairuh → gbush
| Reporter | ||
Updated•24 years ago
|
| Reporter | ||
Comment 4•24 years ago
|
||
Comment on attachment 51647 [details] [diff] [review]
Add a new API to check for server mode availability
My fix is overkill for this problem.
Since GetIsServerMode returns FALSE in the default case and GetShouldShowUI returns TRUE in the default case, we don't need to check anything else at all.
This #ifdef should simply be removed. All platforms will work fine without this #ifdef and then if someone wants to implement turbo mode, they just modify their nsNativeAppSupportPlatform
This is critical to get turbo mode working on OS/2.
Attachment #51647 -
Attachment is obsolete: true
Mike, I think it is not mandatory that a platform have an implementation of
nsINativeAppSupport. Because of that, nsIAppShellService::GetNativeAppSupport
might return NULL. I think you should modify the newly-exposed code to check
for that before calling through the nativeApp pointer.
| Reporter | ||
Comment 6•24 years ago
|
||
if GetNativeAppSupport returns NULL, wouldn't the NS_SUCCEEDED on rv fail?
Or is there a case where you would get NS_SUCCEEDED yet nativeApp would be NULL?
| Reporter | ||
Comment 7•24 years ago
|
||
More info.
Platforms must have an nsNativeAppSupport to implement NS_CreateSplashScreen,
NS_CanRun, and NS_CreateNativeAppSupport.
Secondly, there is other code in nsAppRunner that relies on nativeAppSupport as
well:
http://lxr.mozilla.org/seamonkey/source/xpfe/bootstrap/nsAppRunner.cpp#898
http://lxr.mozilla.org/seamonkey/source/xpfe/bootstrap/nsAppRunner.cpp#1278
And this code is not in an #ifdef
The solution here is to remove the #ifdef XP_WIN32.
You're right. Conrad changed nsAppShellService::GetNativeAppSupport a while
back so it doesn't return NS_OK for a null/missing nsINativeAppSupport.
So r=law on the removal of the #ifdef (for which you should really attach a new
patch, even though it is a trivial change).
| Reporter | ||
Comment 9•24 years ago
|
||
| Assignee | ||
Comment 10•24 years ago
|
||
Comment on attachment 52244 [details] [diff] [review]
Final patch - just remove the #ifdef
r=law
Attachment #52244 -
Flags: review+
Comment 11•24 years ago
|
||
sr=blake
| Assignee | ||
Comment 12•24 years ago
|
||
fixed
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•