Closed Bug 189685 Opened 22 years ago Closed 22 years ago

Allow cookieservice to run without access to the profile directory

Categories

(Core :: Networking: Cookies, enhancement)

x86
Windows 2000
enhancement
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: timeless, Assigned: timeless)

Details

Attachments

(1 file)

as part of xpcshell testing i need to be able to create and probe arbitrary
services without setting up a full environment. this would have allowed me to
detect that bug 137512 was fixed.

The change will not affect normal consumers.
Attached patch patchSplinter Review
Attachment #111974 - Flags: superreview?(darin)
Attachment #111974 - Flags: review?(dwitte)
(qa) steps to reproduce (and verify):
[linux] ./run-mozilla.sh ./xpcshell
[windows] xpcshell

js>
Components.classes["@mozilla.org/cookieService;1"].getService(Components.interfaces.nsICookieService)

current output:
uncaught exception: [Exception... "Component returned failure code: 0x80570016
(NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]"  nsresult: "0x80570016
(NS_ERROR_XPC_GS_RETURNED_FAILURE)"  location: "JS frame :: typein ::
<TOP_LEVEL> :: line 1"  data: no]

desired output:
[xpconnect wrapped nsICookieService @ 0xa29640]

(the number will vary).
Status: NEW → ASSIGNED
Comment on attachment 111974 [details] [diff] [review]
patch

Looks fine, r=dwitte. We have nullchecks in the cookie code for checking
whether the cookies have been read correctly; so this shouldn't affect
anything.
Attachment #111974 - Flags: review?(dwitte) → review+
Attachment #111974 - Flags: superreview?(darin) → superreview+
checked in
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
timeless: this is a whitebox bug.

Is there any post-checkin xpc results you can put here so you can verify this
yourself?
post-checkin xpc results:
chb@frodo:~/mozilla/debug/dist/bin$ ./run-mozilla.sh ./xpcshell
Type Manifest File: /home/chb/mozilla/debug/dist/bin/components/xpti.dat
nsNativeComponentLoader: autoregistering begins.
nsNativeComponentLoader: autoregistering succeeded
nNCL: registering deferred (0)
js>
Components.classes["@mozilla.org/cookieService;1"].getService(Components.interfaces.nsICookieService)
WARNING: Trying to set p, file
/home/chb/mozilla/modules/libpref/src/prefapi.cpp, line 1017
[xpconnect wrapped nsICookieService @ 0x80f51e8]
js>

so this bug is fixed, marking verified.

however, timeless: is that "trying to set p" line ok? should a bug be filed for it?
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: