Last Comment Bug 779735 - Async pan/zoom broken
: Async pan/zoom broken
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics: Layers (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla17
Assigned To: Chris Jones [:cjones] inactive; ni?/f?/r? if you need me
:
Mentors:
Depends on:
Blocks: 759427
  Show dependency treegraph
 
Reported: 2012-08-02 00:07 PDT by Chris Jones [:cjones] inactive; ni?/f?/r? if you need me
Modified: 2012-08-03 04:29 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
+


Attachments
Fix up shim code supporting hack to deliver mm message from C++ (1.69 KB, patch)
2012-08-02 03:06 PDT, Chris Jones [:cjones] inactive; ni?/f?/r? if you need me
bugs: review+
Details | Diff | Splinter Review

Description Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-08-02 00:07:34 PDT
It don't work.

E/GeckoConsole( 1004): [JavaScript Error: "viewport is null" {file: "chrome://global/content/BrowserElementChild.js" line: 867}]

which is

  _recvViewportChange: function(data) {
    let viewport = data.json;

and the data originates from

TabChild::RecvUpdateFrame(const nsIntRect& aDisplayPort,
[snip]
{
    nsCString data;
    data += nsPrintfCString("{ \"x\" : %d", aScrollOffset.x);
    data += nsPrintfCString(", \"y\" : %d", aScrollOffset.y);
[snip]
    return RecvAsyncMessage(NS_LITERAL_STRING("Viewport:Change"),
                            NS_ConvertUTF8toUTF16(data));

(Yes, this is terrible.)

So it looks like the mm API changed, no longer |.json|, or our manually-built string isn't a valid structured clone.
Comment 1 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-08-02 00:09:56 PDT
Confirmed that https://hg.mozilla.org/integration/mozilla-inbound/rev/b83188166929 works.
Comment 2 Olli Pettay [:smaug] (vacation Aug 25-28) 2012-08-02 00:19:19 PDT
I did mention at some point that I may or may not break that method - but since there
are no tests for it, had to guess.
Apparently I did break it. Someone who knows how to test the functionality needs to fix it 
(and add tests!).
Comment 3 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-08-02 03:06:22 PDT
Created attachment 648286 [details] [diff] [review]
Fix up shim code supporting hack to deliver mm message from C++
Comment 4 Olli Pettay [:smaug] (vacation Aug 25-28) 2012-08-02 03:58:08 PDT
Comment on attachment 648286 [details] [diff] [review]
Fix up shim code supporting hack to deliver mm message from C++

Uh. sorry!
And thanks for fixing this.

Any chance to get some kind of test for this?
Comment 5 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-08-02 08:03:35 PDT
This is a bustage fix, blocker.

https://hg.mozilla.org/integration/mozilla-inbound/rev/be31a4c795f7
Comment 6 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-08-02 08:08:57 PDT
(In reply to Olli Pettay [:smaug] from comment #4)
> Comment on attachment 648286 [details] [diff] [review]
> Fix up shim code supporting hack to deliver mm message from C++
> 
> Any chance to get some kind of test for this?

Yes.  The situation is complicated, sadly.
Comment 7 Ryan VanderMeulen [:RyanVM] 2012-08-02 19:09:11 PDT
https://hg.mozilla.org/mozilla-central/rev/be31a4c795f7

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