The default bug view has changed. See this FAQ.

Telephony: Keep telephony objects on multiple pages in sync

RESOLVED FIXED in mozilla13

Status

()

Core
DOM: Device Interfaces
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Ben Turner (not reading bugmail, use the needinfo flag!), Assigned: Ben Turner (not reading bugmail, use the needinfo flag!))

Tracking

12 Branch
mozilla13
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

Created attachment 587867 [details] [diff] [review]
Patch, v1

We limit the use to a single content uri but theoretically it could be open in more than one window. Also chrome can poke its nose in any time it wants, so we need a mechanism to keep things in sync. Hopefully this is simple enough and we can expand further if we need to in the future.
Attachment #587867 - Flags: review?(jonas)
Note the dialer app will live in a separate process in the near future.
Attachment #587867 - Flags: review?(jonas)
We're going to do something different here.
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WONTFIX
Nevermind, going to do this after all.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Created attachment 599154 [details] [diff] [review]
Patch, v2

Moar better.
Attachment #587867 - Attachment is obsolete: true
Attachment #599154 - Flags: review?(jonas)
Created attachment 599970 [details] [diff] [review]
Patch, v2.1

This adds the query/ref string stripping to the permissions check.
Attachment #599154 - Attachment is obsolete: true
Attachment #599154 - Flags: review?(jonas)
Attachment #599970 - Flags: review?(jonas)
Comment on attachment 599970 [details] [diff] [review]
Patch, v2.1

Review of attachment 599970 [details] [diff] [review]:
-----------------------------------------------------------------

r+ with those changes.

::: dom/telephony/Telephony.cpp
@@ +134,5 @@
>    if (mActiveCall) {
>      // Put the call on hold?
>      NS_NOTYETIMPLEMENTED("Implement me!");
>    }
>    mActiveCall = aCall;

Remove this

@@ +140,5 @@
> +  // Update all the other Telephony objects to keep them in sync.
> +  if (aNotifyOthers && gTelephonyList->Length() > 1) {
> +    for (PRUint32 index = 0; index < gTelephonyList->Length(); index++) {
> +      Telephony*& telephony = gTelephonyList->ElementAt(index);
> +      if (telephony != this) {

And this != this check

@@ +154,5 @@
> +{
> +  for (PRUint32 index = 0; index < mCalls.Length(); index++) {
> +    nsRefPtr<TelephonyCall>& call = mCalls[index];
> +    if (call->CallIndex() == aCallIndex) {
> +      SwitchActiveCall(call, aNotifyOthers);

And have the code here just set mActiveCall = call rather than doing the recursive call.

@@ +543,5 @@
> +              (url = do_QueryInterface(uri)) &&
> +              NS_SUCCEEDED(url->GetPrePath(prePath)) &&
> +              NS_SUCCEEDED(url->GetFilePath(filePath))) {
> +            if (documentURL.Equals(prePath + filePath,
> +                                   nsCaseInsensitiveCStringComparator())) {

Remove the case insensitive part.
Attachment #599970 - Flags: review?(jonas) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/5b818dc32f61
https://hg.mozilla.org/mozilla-central/rev/5b818dc32f61
Status: REOPENED → RESOLVED
Last Resolved: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
Blocks: 674726
Duplicate of this bug: 720892
Blocks: 720831
You need to log in before you can comment on or make changes to this bug.