Detect JS Engine when reporting errors#7708
Merged
jridgewell merged 6 commits intoampproject:masterfrom Feb 22, 2017
Merged
Conversation
This should save us some time trying to determine what the real browser is, not what the UserAgent is masquerading as.
Also add comments
cramforce
reviewed
Feb 22, 2017
test/functional/test-error.js
Outdated
| // SauceLabs, which runs does not masquerade with UserAgent. | ||
| describe.configure().ifIos().run('on iOS', () => { | ||
| it.configure().ifSafari().run('detects safari as safari', () => { | ||
| expect(detectJsEngineFromStack()).to.equal('Safari'); |
| throw new Error('message'); | ||
| } | ||
| }); | ||
| try { |
Member
There was a problem hiding this comment.
Why don't we run this on the server side?
Contributor
Author
There was a problem hiding this comment.
Firefox and IE return different results based on how the prototype is constructed.
function Klass() {}
Klass.prototype.t
// Different than
proto = { t };
obj = Object.create(proto);It'd have to do much more complicated testing if I don't know for certain how the chain is constructed.
Member
There was a problem hiding this comment.
K. Please update errortracker.go to append this to the UA string (maybe wrapped in [] or something like that).
cramforce
reviewed
Feb 22, 2017
test/functional/test-error.js
Outdated
| }); | ||
| }); | ||
|
|
||
| describe.only('detectJsEngineFromStack', () => { |
Member
There was a problem hiding this comment.
Can you update the integration test glob to include this (so the tests actually run on SC)?
cramforce
approved these changes
Feb 22, 2017
Closed
mrjoro
pushed a commit
to mrjoro/amphtml
that referenced
this pull request
Apr 28, 2017
* Detect JS Engine when reporting errors This should save us some time trying to determine what the real browser is, not what the UserAgent is masquerading as. * Fix IE detection Also add comments * linting * JSDoc * Add error tests to integrations suite * Fix closure type check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This should save us some time trying to determine what the real browser
is, not what the UserAgent is masquerading as.