Last Comment Bug 717451 - Telephony: Keep telephony objects on multiple pages in sync
: Telephony: Keep telephony objects on multiple pages in sync
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Device Interfaces (show other bugs)
: 12 Branch
: All All
: -- normal (vote)
: mozilla13
Assigned To: Ben Turner (not reading bugmail, use the needinfo flag!)
:
Mentors:
: 720892 (view as bug list)
Depends on:
Blocks: webtelephony 720831
  Show dependency treegraph
 
Reported: 2012-01-11 16:16 PST by Ben Turner (not reading bugmail, use the needinfo flag!)
Modified: 2012-02-29 19:40 PST (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch, v1 (4.67 KB, patch)
2012-01-11 16:16 PST, Ben Turner (not reading bugmail, use the needinfo flag!)
no flags Details | Diff | Splinter Review
Patch, v2 (12.24 KB, patch)
2012-02-21 06:58 PST, Ben Turner (not reading bugmail, use the needinfo flag!)
no flags Details | Diff | Splinter Review
Patch, v2.1 (15.17 KB, patch)
2012-02-23 06:10 PST, Ben Turner (not reading bugmail, use the needinfo flag!)
jonas: review+
Details | Diff | Splinter Review

Description Ben Turner (not reading bugmail, use the needinfo flag!) 2012-01-11 16:16:55 PST
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.
Comment 1 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-01-11 18:24:24 PST
Note the dialer app will live in a separate process in the near future.
Comment 2 Ben Turner (not reading bugmail, use the needinfo flag!) 2012-02-21 01:24:25 PST
We're going to do something different here.
Comment 3 Ben Turner (not reading bugmail, use the needinfo flag!) 2012-02-21 02:04:27 PST
Nevermind, going to do this after all.
Comment 4 Ben Turner (not reading bugmail, use the needinfo flag!) 2012-02-21 06:58:48 PST
Created attachment 599154 [details] [diff] [review]
Patch, v2

Moar better.
Comment 5 Ben Turner (not reading bugmail, use the needinfo flag!) 2012-02-23 06:10:05 PST
Created attachment 599970 [details] [diff] [review]
Patch, v2.1

This adds the query/ref string stripping to the permissions check.
Comment 6 Jonas Sicking (:sicking) No longer reading bugmail consistently 2012-02-24 02:36:28 PST
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.
Comment 7 Ben Turner (not reading bugmail, use the needinfo flag!) 2012-02-24 05:47:15 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/5b818dc32f61
Comment 8 Marco Bonardo [::mak] 2012-02-25 02:17:40 PST
https://hg.mozilla.org/mozilla-central/rev/5b818dc32f61
Comment 9 Philipp von Weitershausen [:philikon] 2012-02-29 19:40:01 PST
*** Bug 720892 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.