зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset e721121e5f57 (bug 1761634) for causing several issues with WebDriver clients. a=backout
This commit is contained in:
Родитель
265da4bd9e
Коммит
8fffdc727a
|
@ -329,6 +329,7 @@ export function getMarionetteCommandsActorProxy(browsingContextFn) {
|
|||
*/
|
||||
const NO_RETRY_METHODS = [
|
||||
"clickElement",
|
||||
"executeScript",
|
||||
"performActions",
|
||||
"releaseActions",
|
||||
"sendKeysToElement",
|
||||
|
@ -366,20 +367,7 @@ export function getMarionetteCommandsActorProxy(browsingContextFn) {
|
|||
throw e;
|
||||
}
|
||||
|
||||
if (methodName === "executeScript") {
|
||||
// For script execution we should always fail the command with
|
||||
// an error until a decision is made on bug 1673478.
|
||||
const browsingContextId = browsingContextFn()?.id;
|
||||
lazy.logger.trace(
|
||||
`[${browsingContextId}] Browsing context destroyed or inactive`
|
||||
);
|
||||
throw new lazy.error.JavaScriptError(
|
||||
`Script evaluation aborted: ${e.message}`
|
||||
);
|
||||
}
|
||||
|
||||
if (NO_RETRY_METHODS.includes(methodName)) {
|
||||
// Otherwise return "null" as fallback value.
|
||||
const browsingContextId = browsingContextFn()?.id;
|
||||
lazy.logger.trace(
|
||||
`[${browsingContextId}] Querying "${methodName}" failed with` +
|
||||
|
|
|
@ -1133,14 +1133,7 @@ class Marionette(object):
|
|||
try:
|
||||
self.is_shutting_down = True
|
||||
if callback is not None:
|
||||
try:
|
||||
callback()
|
||||
except errors.JavascriptException as e:
|
||||
if not e.message.startswith("Script evaluation aborted: Actor"):
|
||||
# Special-case JavaScript errors for a JSWindowActor destroy
|
||||
# until a decision is made on bug 1673478.
|
||||
raise e
|
||||
|
||||
callback()
|
||||
quit_details["in_app"] = True
|
||||
else:
|
||||
quit_details = self._request_in_app_shutdown()
|
||||
|
@ -1248,14 +1241,7 @@ class Marionette(object):
|
|||
try:
|
||||
self.is_shutting_down = True
|
||||
if callback is not None:
|
||||
try:
|
||||
callback()
|
||||
except errors.JavascriptException as e:
|
||||
if not e.message.startswith("Script evaluation aborted: Actor"):
|
||||
# Special-case JavaScript errors for a JSWindowActor destroy
|
||||
# until a decision is made on bug 1673478.
|
||||
raise e
|
||||
|
||||
callback()
|
||||
restart_details["in_app"] = True
|
||||
else:
|
||||
flags = ["eRestart"]
|
||||
|
|
|
@ -275,18 +275,15 @@ class MarionetteTestharnessProtocolPart(TestharnessProtocolPart):
|
|||
def test_window_loaded(self):
|
||||
"""Wait until the page in the new window has been loaded.
|
||||
|
||||
Hereby ignore Javascript exceptions that are thrown when
|
||||
Hereby ignore Javascript execptions that are thrown when
|
||||
the document has been unloaded due to a process change.
|
||||
"""
|
||||
while True:
|
||||
try:
|
||||
self.parent.base.execute_script(self.window_loaded_script, asynchronous=True)
|
||||
break
|
||||
except errors.JavascriptException as e:
|
||||
if e.message.startswith("Script evaluation aborted: Actor"):
|
||||
# Special-case JavaScript errors for a JSWindowActor destroy
|
||||
# until a decision is made on bug 1673478.
|
||||
pass
|
||||
except errors.JavascriptException:
|
||||
pass
|
||||
|
||||
|
||||
class MarionettePrefsProtocolPart(PrefsProtocolPart):
|
||||
|
|
Загрузка…
Ссылка в новой задаче