Closed Bug 815757 Opened 12 years ago Closed 12 years ago

refactor script timeouts so only marionette-actors keeps a reference

Categories

(Remote Protocol :: Marionette, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla20

People

(Reporter: mdas, Assigned: mdas)

References

Details

Attachments

(2 files, 1 obsolete file)

Attached patch patch v1.0 (obsolete) — Splinter Review
We maintain the script timeout amount in both the marionette-actors and the marionette-listener. We only need to keep track of it once (in the actor) and send it to the listener when needed. This should help out with Bug 814139 as a consequence. While I was at it, I've add a default timeout that's non-zero as per Bug 811574.
Attachment #685777 - Flags: review?(jgriffin)
Comment on attachment 685777 [details] [diff] [review] patch v1.0 Review of attachment 685777 [details] [diff] [review]: ----------------------------------------------------------------- Nice, I think this is much more sensible than our previous implementation. After this lands, I'll undo the patch for bug 814139, which will then be unnecessary. ::: testing/marionette/marionette-actors.js @@ +764,5 @@ > else { > + this.sendAsync("executeJSScript", { value: aRequest.value, > + args: aRequest.args, > + newSandbox: aRequest.newSandbox, > + callback: aRequest.timeout, This naming seems confusing, since we're taking a parameter aRequest.timeout and setting it to the callback property, and then taking a different timeout parameter and setting it to the timeout property. Can we switch aRequest.timeout to aRequest.async (both here and in marionette.py), which I think is a better name for what it does anyway? ::: testing/marionette/marionette-listener.js @@ +460,3 @@ > > let scriptSrc; > if (timeout) { If you switch the badly-named timeout parameter in marionette-actors to async, let's switch it here too.
Attachment #685777 - Flags: review?(jgriffin) → review+
Attached patch patch v1.1Splinter Review
uploading new version with changes for bookkeeping! carrying r+ forward
Attachment #685777 - Attachment is obsolete: true
Attachment #685853 - Flags: review+
Whiteboard: [automation-needed-in-beta]
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
I found a spot where the 'async' rename wasn't enforced.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch fix v1.0Splinter Review
rename 'timeout' to 'async' in marionette-actors. Also, the use of 'async' in executeWithCallback in marionette-listener is pretty confusing, so I renamed it to 'useFinish' since that's what the parameter essentially means.
Attachment #686877 - Flags: review?(jgriffin)
Comment on attachment 686877 [details] [diff] [review] fix v1.0 Review of attachment 686877 [details] [diff] [review]: ----------------------------------------------------------------- useFinish is a good name!
Attachment #686877 - Flags: review?(jgriffin) → review+
Whiteboard: [automation-needed-in-beta] → [automation-needed-in-beta][leave-open]
Whiteboard: [automation-needed-in-beta][leave-open]
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: