Closed Bug 908681 Opened 8 years ago Closed 8 years ago

B2G Telephony: remove Telephony::CheckPermission and re-use Navigator::CheckPermission

Categories

(Firefox OS Graveyard :: RIL, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 915604

People

(Reporter: vicamo, Unassigned)

Details

Telephony::CheckPermission is actually a dup of Navigator::CheckPermission.  Just re-use the code and move that MOZ_ASSERT into Telephony::Create() will do.  See bug 865403 comment 7.
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #0)
> Telephony::CheckPermission is actually a dup of Navigator::CheckPermission. 
> Just re-use the code and move that MOZ_ASSERT into Telephony::Create() will
> do.  See bug 865403 comment 7.

I have read the comments but not really understand it. What is the reason for checking IsInnerWindow()?

I know that the only caller of Telephony::Create is Navigator, and that always has an inner window. It is just like the case of CellBroadcast::Create. However, from this point, it just show that adding the assertion is OK (will not fail) but do not show why we need the assertion.
The long term goal is to split the nsPIDOMWindow class into two separate classes, one for inner and one for outer windows. Functions that accept both inner and outer windows make that harder to accomplish, so if there's no need to accept both, we should not.
Telephony::CheckPermission is removed in bug 915604.
Status: NEW → RESOLVED
Closed: 8 years ago
Component: DOM: Device Interfaces → RIL
Product: Core → Boot2Gecko
Resolution: --- → DUPLICATE
Duplicate of bug: 915604
You need to log in before you can comment on or make changes to this bug.