Remove nsIPref from tree

RESOLVED FIXED in mozilla1.9.3a3

Status

()

Core
Preferences: Backend
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: m_kato, Assigned: m_kato)

Tracking

Trunk
mozilla1.9.3a3
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

8 years ago
All depended codes are replaced with nsIPrefBranch. (About embedding tree, see Bug 482171 comment #3)  So we should remove nsIPref from mozilla-central.

Also, we should fix comment of nsContentUtils::RegisterCallback. (See bug 182954 comment #19).
(Assignee)

Updated

8 years ago
Blocks: 175193
(Assignee)

Updated

8 years ago
Blocks: 214796
Depends on: 182954
Depends on: 482171, 181975
(Assignee)

Comment 1

8 years ago
Created attachment 425754 [details] [diff] [review]
patch v1
(Assignee)

Comment 2

8 years ago
Created attachment 429087 [details] [diff] [review]
patch v2
Attachment #425754 - Attachment is obsolete: true
(Assignee)

Comment 3

8 years ago
Created attachment 431268 [details] [diff] [review]
patch v2.1
Attachment #429087 - Attachment is obsolete: true
(Assignee)

Updated

8 years ago
Attachment #431268 - Flags: superreview?(benjamin)
Attachment #431268 - Flags: review?(benjamin)

Comment 4

8 years ago
Comment on attachment 431268 [details] [diff] [review]
patch v2.1

>diff --git a/modules/libpref/src/nsPrefsFactory.cpp b/modules/libpref/src/nsPrefsFactory.cpp

>-
>-  { // remove this when nsPref goes away
>-    NS_PREF_CLASSNAME, 
>-    NS_PREF_CID,
>-    NS_PREF_CONTRACTID, 
>-    nsPrefConstructor
>-  },

Let's leave the old contractID available for extension-compat reasons (in case they are using the preferences;1 contract instead of pref-service;1). Just hard-code the old contractid and repeat NS_PREFSERVICE_CLASSNAME/NS_PREFSERVICE_CID from above.

r=me with that change. Thanks for finally getting this done!
Attachment #431268 - Flags: superreview?(benjamin)
Attachment #431268 - Flags: superreview+
Attachment #431268 - Flags: review?(benjamin)
Attachment #431268 - Flags: review+
(Assignee)

Comment 5

8 years ago
landed
http://hg.mozilla.org/mozilla-central/rev/31cfc221aa1f

It keeps "@mozilla.org/preferences;1" for compatibility.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a3
Depends on: 552339
I think this patch might have caused Fennec OS X build bustage:

Compiling Java interfaces
find ../../../../_javagen/default -name "*.java"  ! -name "*nsIPref.java" > java.files
"/usr/bin/javac" -source 1.4 -classpath _ifaces 		\
		-d _ifaces -sourcepath ../../../../_javagen/default @java.files
"/usr/bin/jar" cf MozillaInterfaces.jar -C _ifaces org
/builds/slave/macosx-fennec-trunk-nightly/build/mozilla-central/objdir/xulrunner/config/nsinstall -D org/mozilla/xpcom
/usr/bin/perl /builds/slave/macosx-fennec-trunk-nightly/build/mozilla-central/extensions/java/xpcom/interfaces/gen-nsError.pl < /builds/slave/macosx-fennec-trunk-nightly/build/mozilla-central/xpcom/base/nsError.h > org/mozilla/xpcom/IXPCOMError.java
"/usr/bin/javac" -source 1.4 -classpath ".:MozillaInterfaces.jar" \
			-sourcepath ".:/builds/slave/macosx-fennec-trunk-nightly/build/mozilla-central/extensions/java/xpcom/interfaces" -d _java /builds/slave/macosx-fennec-trunk-nightly/build/mozilla-central/extensions/java/xpcom/interfaces/org/mozilla/xpcom/Mozilla.java
"/usr/bin/jar" cf MozillaGlue.jar -C _java .
"/usr/bin/jar" cf MozillaInterfaces-src.jar -C ../../../../_javagen/default org
/usr/bin/zip -d MozillaInterfaces-src.jar  org/mozilla/interfaces/nsIPref.java
	zip warning: name not matched: org/mozilla/interfaces/nsIPref.java

zip error: Nothing to do! (MozillaInterfaces-src.jar)
make[7]: *** [MozillaInterfaces-src.jar] Error 12
make[7]: *** Deleting file `MozillaInterfaces-src.jar'
make[6]: *** [libs] Error 2
make[5]: *** [libs] Error 2
make[4]: *** [libs_tier_app] Error 2
make[3]: *** [tier_app] Error 2
make[2]: *** [default] Error 2
make[1]: *** [build] Error 2
make: *** [build] Error 2
This broke YASS (smooth scrolling) extension on Windows Vista.
https://addons.mozilla.org/en-US/firefox/addon/5846

Error: uncaught exception: [Exception... "Component returned failure code: 0x80570018 (NS_ERROR_XPC_BAD_IID) [nsIJSCID.getService]"  nsresult: "0x80570018 (NS_ERROR_XPC_BAD_IID)"  location: "JS frame :: chrome://yass/content/main.js :: <TOP_LEVEL> :: line 4"  data: no]
(Assignee)

Comment 9

8 years ago
(In reply to comment #6)
> I think this patch might have caused Fennec OS X build bustage:

bug 552339. I am waiting for reviewing.
(Assignee)

Comment 10

8 years ago
(In reply to comment #8)
> This broke YASS (smooth scrolling) extension on Windows Vista.
> https://addons.mozilla.org/en-US/firefox/addon/5846
> 
> Error: uncaught exception: [Exception... "Component returned failure code:
> 0x80570018 (NS_ERROR_XPC_BAD_IID) [nsIJSCID.getService]"  nsresult: "0x80570018
> (NS_ERROR_XPC_BAD_IID)"  location: "JS frame :: chrome://yass/content/main.js
> :: <TOP_LEVEL> :: line 4"  data: no]

nsIPref is deprecated interface from 5 years ago.  They should use nsIPrefBranch instead of.
You need to log in before you can comment on or make changes to this bug.