Closed
Bug 1208018
Opened 9 years ago
Closed 9 years ago
Improve javascript stackframe logging
Categories
(Remote Protocol :: Marionette, defect)
Remote Protocol
Marionette
Tracking
(firefox44 fixed)
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
Details
(Keywords: pi-marionette-server)
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
jgriffin
:
review+
|
Details | Diff | Splinter Review |
When using execute_js_script, even when passing a filename,
this filename isn't used in JS exceptions.
We need to pass this `filename` information to Cu.evalInSandbox in order to have better stackframe.
Also, in JavaScriptError helper function, we are trying to only display the topmost frame (the line of the script passed to execute_js_script) whereas having the full stack is really important to figure out where the exception really happenned.
Assignee | ||
Comment 1•9 years ago
|
||
Quite simple patch, just forward filename information up to Cu.evalInSandbox,
and use filename instead of "dummy file".
Then, now that stack frame have meaningfull paths,
we can start displaying the full stack instead of just
the topmost frame.
May be I can remove the existing code that displays:
inline javascript, line xxx
src: ...
?
I tried to write a test, but it looks like tests are
going through completely different codepath.
I crafted this patch in order to improve error logging in luciddream.
In luciddream I go through driver.js whereas tests are using listener.js.
Note that we could apply to the same improvement to listener.js.
Attachment #8665383 -
Flags: review?(jgriffin)
Comment 2•9 years ago
|
||
Comment on attachment 8665383 [details] [diff] [review]
patch v1
Review of attachment 8665383 [details] [diff] [review]:
-----------------------------------------------------------------
this looks fine; we should really do this in listener.js as well, where we call evalInSandbox (e.g., https://dxr.mozilla.org/mozilla-central/source/testing/marionette/listener.js#791)
the executeScript tests mostly are run twice, once in chrome ('driver.js') mode, and once in content ('listener.js') mode. it should be pretty easy to test this.
Attachment #8665383 -
Flags: review?(jgriffin) → review+
Updated•9 years ago
|
Keywords: ateam-marionette-server
Assignee | ||
Comment 3•9 years ago
|
||
+ set filename correctly in listener.js
+ added a execute_js_script test and tweaked existing execute_script test
What do you think about removing the old trick[1],
and instead, only display the full JS trace[2]?
Here is the current stacktrace values for the two tests:
inline javascript, line 2 | [1]
src: " return b;" |
Stack: | [2]
__marionetteFunc@test_execute_script.py:2:17 |
@test_execute_script.py:3:19 |
inline javascript, line 2 | [1]
src: " throwHere();" | [1]
Stack: | [2]
@file.js:2:17 |
Attachment #8665383 -
Attachment is obsolete: true
Attachment #8666669 -
Flags: review?(jgriffin)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → poirot.alex
Assignee | ||
Comment 4•9 years ago
|
||
I ran the tests locally against firefox and b2g desktop, but I was wondering if I can push to try to run marionette tests?
If not, is there any tests/platform useful to run on try?
Updated•9 years ago
|
Attachment #8666669 -
Flags: review?(jgriffin) → review+
Assignee | ||
Comment 5•9 years ago
|
||
Assignee | ||
Comment 6•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/ebbf62bde078a1c781ae9f66c34e5887bf446f58
Bug 1208018 - Improve marionette stack info and dump it when executeJSScript throws. r=jgriffin
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Updated•2 years ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•