Bug 1452483 - Set correct line number for JS evaluation. r=maja_zf
authorAndreas Tolfsen <ato@sny.no>
Sun, 08 Apr 2018 17:44:55 +0100
changeset 412736 e73d9a52e2e47a4e2db55fd3a73bbbf3948ccb0f
parent 412735 485b7f8c9d9a6a7cc23dc70803c8cd3f169634ef
child 412737 3d1f361a7a4f31b5e941dfde06db6322cd5cb2cf
push id33817
push userapavel@mozilla.com
push dateWed, 11 Apr 2018 14:35:14 +0000
treeherdermozilla-central@14b2d3f79612 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaja_zf
bugs1452483
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1452483 - Set correct line number for JS evaluation. r=maja_zf Marionette incorrectly sets the JavaScript context line number to 0. The line number is provided to us in in the input, so we should use this. The default fallback if line is not provided is 0 as before. MozReview-Commit-ID: 8gOt9r4awee
testing/marionette/evaluate.js
--- a/testing/marionette/evaluate.js
+++ b/testing/marionette/evaluate.js
@@ -143,17 +143,17 @@ evaluate.sandbox = function(sb, script, 
     }
 
     // timeout and unload handlers
     scriptTimeoutID = setTimeout(timeoutHandler, timeout);
     sb.window.onunload = unloadHandler;
 
     let res;
     try {
-      res = Cu.evalInSandbox(src, sb, "1.8", file, 0);
+      res = Cu.evalInSandbox(src, sb, "1.8", file, line);
     } catch (e) {
       let err = new JavaScriptError(e, {
         fnName: "execute_script",
         file,
         line,
         script,
       });
       reject(err);