Closed Bug 763280 Opened 13 years ago Closed 13 years ago

Cannot access settings manager from chrome code

Categories

(Firefox OS Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: gerard-majax, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120531 Firefox/14.0a2 Build ID: 20120531042008 Steps to reproduce: Trying to access the settings manager from code running in chrome Actual results: E/GeckoConsole( 568): [JavaScript Error: "NS_ERROR_NOT_IMPLEMENTED: 'Method not implemented' when calling method: [nsIDOMSettingsLock::get]" {file: "jar:file:///system/b2g/omni.ja!/components/WifiWorker.js" line: 931}] Expected results: I should have been able to query the settings manager
Adding some printf debug in SettingsManager.js, this is what I get when request is refused: I/Gecko ( 568): -*- SettingsManager: get lock! I/Gecko ( 568): -*- SettingsManager: SettingsLock._settingsManager == [object Object] I/Gecko ( 568): -*- SettingsManager: read == undefined I/Gecko ( 568): -*- SettingsManager: write == undefined I/Gecko ( 568): -*- SettingsManager: get not allowed
Forgot this, which explains the previous: 126 debug("SettingsLock._settingsManager == " + this._settingsManager); 127 debug("read == " + this._settingsManager.hasReadPrivileges); 128 debug("write == " + this._settingsManager.hasReadWritePrivileges);
Did you meant worker code instead of chrome code? Do we have any plan to allow this?
Yep, worker, sorry.
Using SettingsService from the WifiWorker.js file works, I'll go down this road.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.