Граф коммитов

4 Коммитов

Автор SHA1 Сообщение Дата
Andreas Tolfsen 5068114946 Bug 1215502: Send wrapped WebDriverError to client r=automatedtester
This fixes serialisation of XPCOM exceptions to the client.
Response.sendError was incorrectly serialising the err input variable
instead of the wrapped WebDriverError, we.

r=dburns

--HG--
extra : rebase_source : a85a0d148c9d70dd208f9a182134702e3a960fe8
2016-01-07 14:41:11 +00:00
Andreas Tolfsen 3421774080 Bug 1211489: Provide message sequencing in Marionette
Message sequencing allows Marionette to provide an asynchronous,
parallel pipelining user-facing interface, limit chances of payload
race conditions, and remove stylistic inconsistencies in how commands
and responses are dispatched internally.

Clients that deliver a blocking WebDriver interface are still be expected
to not send further command requests before the response from the last
command has come back, but if they still happen to do so because of
programming error or otherwise, no harm will be done.  This will guard
against bugs such as bug 1207125.

This patch formalises the command and response concepts, and applies
these concepts to emulator callbacks. Through the new message format,
Marionette is able to provide two-way parallel communication.  In other
words, the server will be able to instruct the client to perform a
command in a non ad-hoc way.

runEmulatorCmd and runEmulatorShell are both turned into command
instructions originating from the server.  This resolves a lot of
technical debt in the server code because they are no longer special-cased
to circumvent the dispatching technique used for all other commands;
commands may originate from either the client or the server providing
parallel pipelining enforced through message sequencing:

             client      server
               |            |
    msgid=1    |----------->|
               |  command   |
               |            |
    msgid=2    |<-----------|
               |  command   |
               |            |
    msgid=2    |----------->|
               |  response  |
               |            |
    msgid=1    |<-----------|
               |  response  |
               |            |

The protocol now consists of a "Command" message and the corresponding
"Response" message.  A "Response" message must always be sent in reply
to a "Command" message.

This bumps the Marionette protocol level to 3.

r=dburns
r=jgriffin

--HG--
extra : commitid : 1kz4Oa2q3Un
2015-09-26 17:12:01 +01:00
Sebastian Hengst 2bc8fc4402 Backed out changeset c2aa06a2ab49 (bug 1211489) for Gij(39) failures. r=backout 2015-11-26 23:47:34 +01:00
Andreas Tolfsen 86bd46756a Bug 1211489: Provide message sequencing in Marionette
Message sequencing allows Marionette to provide an asynchronous,
parallel pipelining user-facing interface, limit chances of payload
race conditions, and remove stylistic inconsistencies in how commands
and responses are dispatched internally.

Clients that deliver a blocking WebDriver interface are still be expected
to not send further command requests before the response from the last
command has come back, but if they still happen to do so because of
programming error or otherwise, no harm will be done.  This will guard
against bugs such as bug 1207125.

This patch formalises the command and response concepts, and applies
these concepts to emulator callbacks. Through the new message format,
Marionette is able to provide two-way parallel communication.  In other
words, the server will be able to instruct the client to perform a
command in a non ad-hoc way.

runEmulatorCmd and runEmulatorShell are both turned into command
instructions originating from the server.  This resolves a lot of
technical debt in the server code because they are no longer special-cased
to circumvent the dispatching technique used for all other commands;
commands may originate from either the client or the server providing
parallel pipelining enforced through message sequencing:

             client      server
               |            |
    msgid=1    |----------->|
               |  command   |
               |            |
    msgid=2    |<-----------|
               |  command   |
               |            |
    msgid=2    |----------->|
               |  response  |
               |            |
    msgid=1    |<-----------|
               |  response  |
               |            |

The protocol now consists of a "Command" message and the corresponding
"Response" message.  A "Response" message must always be sent in reply
to a "Command" message.

This bumps the Marionette protocol level to 3.

r=dburns
r=jgriffin

--HG--
extra : commitid : 2upWRuXyqPF
extra : rebase_source : f384801e209e4b49ef57055fd550c3c435ece4ef
2015-09-26 17:12:01 +01:00