Closed Bug 1034312 Opened 12 years ago Closed 12 years ago

Telephony uses NS_DECL_NSITELEPHONYLISTENER, but does not inherit from nsITelephonyListener

Categories

(Firefox OS Graveyard :: RIL, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: khuey, Assigned: khuey)

References

Details

Attachments

(1 file, 2 obsolete files)

We should keep the current setup with the other object that is the "real" nsITelephonyListener that forwards to the Telephony object, but we can inherit directly from nsITelephonyListener too.
Attached patch Patch (obsolete) — — Splinter Review
Assignee: nobody → khuey
Status: NEW → ASSIGNED
Attachment #8450578 - Flags: review?(htsai)
Comment on attachment 8450578 [details] [diff] [review] Patch Review of attachment 8450578 [details] [diff] [review]: ----------------------------------------------------------------- Can you also fix all similar components: dom/voicemail/Voicemail.h dom/telephony/Telephony.h dom/mobileconnection/src/MobileConnection.h dom/cellbroadcast/src/CellBroadcast.h
Attachment #8450578 - Flags: review?(htsai)
I bet none of the others are built on desktop. I haven't tried a b2g build with the patch from bug 1034302 yet.
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #3) > I bet none of the others are built on desktop. I haven't tried a b2g build > with the patch from bug 1034302 yet. Hey, this suddenly reminds me that we have these strange listeners for the reason that xpconnect forbid us exposing non-DOM interfaces on DOM objects, so Telephony just couldn't inherit nsITelephonyListener. Since we have converted these nodes to WebIDL, this problem has gone and we can simply remove those Foo::Listener classes.
JavascriptException: JavascriptException: NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "aListener.enumerateCallStateComplete is not a function" {file: "jar:file:///system/b2g/omni.ja!/components/TelephonyService.js" line: 397}]'[JavaScript Error: "aListener.enumerateCallStateComplete is not a function" {file: "jar:file:///system/b2g/omni.ja!/components/TelephonyService.js" line: 397}]' when calling method: [nsITelephonyService::enumerateCalls] at: app://system.gaiamobile.org/js/screen_manager.js line: 403
[JavaScript Error: "No handler for notifyRadioStateChanged" {file: "jar:file:///system/b2g/omni.ja!/components/RILContentHelper.js" line: 2140}] [JavaScript Error: "No handler for notifyVoiceChanged" {file: "jar:file:///system/b2g/omni.ja!/components/RILContentHelper.js" line: 2140}] [JavaScript Error: "No handler for notifyDataChanged" {file: "jar:file:///system/b2g/omni.ja!/components/RILContentHelper.js" line: 2140}] [JavaScript Error: "No handler for notifyVoiceChanged" {file: "jar:file:///system/b2g/omni.ja!/components/RILContentHelper.js" line: 2140}] [JavaScript Error: "No handler for notifyDataChanged" {file: "jar:file:///system/b2g/omni.ja!/components/RILContentHelper.js" line: 2140}] [JavaScript Error: "No handler for notifyIccChanged" {file: "jar:file:///system/b2g/omni.ja!/components/RILContentHelper.js" line: 2140}] [JavaScript Error: "No handler for notifyVoiceChanged" {file: "jar:file:///system/b2g/omni.ja!/components/RILContentHelper.js" line: 2140}] [JavaScript Error: "No handler for notifyDataChanged" {file: "jar:file:///system/b2g/omni.ja!/components/RILContentHelper.js" line: 2140}] [JavaScript Error: "No handler for notifyStatusChanged" {file: "jar:file:///system/b2g/omni.ja!/components/RILContentHelper.js" line: 2140}] Looks like it just can't be done in this way?
You have to make them [ChromeOnly] methods on the WebIDL object to expose them to JS.
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #7) > You have to make them [ChromeOnly] methods on the WebIDL object to expose > them to JS. But nsITelephonyListener is a XPIDL interface? Or you mean I have to duplicate them into Telephony.webidl? But then the C++ function signatures are still different, so I'm supposed to overload these listener methods? That make me feel I shouldn't have this right now. I'd rather take your revision instead.
Attached patch Patch — — Splinter Review
The commit message needs to be updated. Consider that done.
Attachment #8450578 - Attachment is obsolete: true
Attachment #8455143 - Attachment is obsolete: true
Attachment #8468568 - Flags: review?(vyang)
Comment on attachment 8468568 [details] [diff] [review] Patch Review of attachment 8468568 [details] [diff] [review]: ----------------------------------------------------------------- mobileconnection part may need rebase. Thank you :)
Attachment #8468568 - Flags: review?(vyang) → review+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: