Closed Bug 960149 Opened 10 years ago Closed 10 years ago

ShellService Fixups. Port Some Firefox bugs (Bug 531174, Bug 784739, Bug 791694, Bug 945245, Bug 949821)

Categories

(SeaMonkey :: OS Integration, defect)

defect
Not set
normal

Tracking

(seamonkey2.26 fixed, seamonkey2.27 fixed)

RESOLVED FIXED
seamonkey2.27
Tracking Status
seamonkey2.26 --- fixed
seamonkey2.27 --- fixed

People

(Reporter: philip.chee, Assigned: philip.chee)

References

Details

Attachments

(1 file)

Port Some Firefox shell service bugs:

Bug 531174 [@ WriteBitmap] (Crash)
Bug 784739 Switch from NULL to nullptr
Bug 791694 Use XRE_EXECUTABLE_FILE in browser shell instead of guesswork from NS_XPCOM_CURRENT_PROCESS_DIR and MOZ_APP_NAME.
Bug 945245 Fixed misc char16_t/wchar_t mismatches
Bug 949821 use MOZ_UTF16 more and NS_LITERAL_STRING less
Bug 927728 Replace PRUnichar with char16_t
Attached patch Patch v1.0Splinter Review
> +++ b/suite/shell/src/nsGNOMEShellService.cpp
> +++ b/suite/shell/src/nsMacShellService.cpp
I'm unable to test these as I don't have a Linux or OSX box.

> -  char16_t currValue[MAX_BUF];
> +  wchar_t currValue[MAX_BUF];

q.v. Bug 945245 - Fixed misc char16_t/wchar_t mismatches
Ehsan bitrotted me :P It goes like this:
PRUnichar -> char16_t
char16_t -> wchar_t

>    nsCOMPtr<nsIDOMHTMLImageElement> imgElement(do_QueryInterface(aElement));
>    if (!imgElement) {
>      // XXX write background loading stuff!
> +    return NS_ERROR_NOT_AVAILABLE;
q.v. Bug 531174 [@ WriteBitmap] (Crash)

>    nsCOMPtr<nsIFile> appHelper;
> -  rv = directoryService->Get(NS_XPCOM_CURRENT_PROCESS_DIR,
> +  rv = directoryService->Get(XRE_EXECUTABLE_FILE,
This gets C:\foo\bin\seamonkey.exe

>                               NS_GET_IID(nsIFile),
>                               getter_AddRefs(appHelper));
>    NS_ENSURE_SUCCESS(rv, rv);
 
> -  rv = appHelper->AppendNative(NS_LITERAL_CSTRING("uninstall"));
> +  rv = appHelper->SetNativeLeafName(NS_LITERAL_CSTRING("uninstall"));
C:\foo\bin\seamonkey.exe becomes C:\foo\bin\uninstall\

>    NS_ENSURE_SUCCESS(rv, rv);

>    rv = appHelper->AppendNative(NS_LITERAL_CSTRING("helper.exe"));
C:\foo\bin\uninstall\ becomes C:\foo\bin\uninstall\helper.exe

>    NS_ENSURE_SUCCESS(rv, rv);
q.v. Bug 791694 - Use XRE_EXECUTABLE_FILE in browser shell instead of guesswork from NS_XPCOM_CURRENT_PROCESS_DIR and MOZ_APP_NAME.

This patch compiles on windows for me. I've tested that the set backgound function works as usual. I'll need to test that uninstall still works.
Attachment #8360526 - Flags: review?(neil)
Comment on attachment 8360526 [details] [diff] [review]
Patch v1.0

r? to Stefan for the mac shell service part.
Attachment #8360526 - Flags: review?(stefanh)
Comment on attachment 8360526 [details] [diff] [review]
Patch v1.0

r=me by code inspection.
Attachment #8360526 - Flags: review?(neil) → review+
My build fails due to another reason atm, but give me a few days and I'll look into it again.
Comment on attachment 8360526 [details] [diff] [review]
Patch v1.0

Looks/builds fine, thanks.
Attachment #8360526 - Flags: review?(stefanh) → review+
Pushed to comm-central:
http://hg.mozilla.org/comm-central/rev/4907aaa40806
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.27
Blocks: 1018792
Landed on comm-release for SeaMonkey 2.26.1

$ hg tip
changeset:   20179:64aa494ec68c
branch:      SEA_2_26_1_RELBRANCH
tag:         tip
user:        Philip Chee <philip.chee@gmail.com>
date:        Thu Feb 20 01:44:17 2014 +0800
summary:     Bug 960149 ShellService Fixups. Port Some Firefox bugs (Bug 531174, Bug 784739, Bug 791694, Bug 945245, Bug 949821)
r= Neil
You need to log in before you can comment on or make changes to this bug.