Skip to content
This repository has been archived by the owner. It is now read-only.

Use renderStacktrace prop if provided to render Error rep stacktrace #7140

Merged

Conversation

@nchevobbe
Copy link
Member

@nchevobbe nchevobbe commented Oct 23, 2018

This will allow us to use the same component
in the console and in reps for example.
If the prop is not passed, it defers to the
current stacktrace rendering.

Fixes #7130

@nchevobbe nchevobbe requested a review from janodvarko Oct 23, 2018
@darkwing
Copy link
Contributor

@darkwing darkwing commented Oct 23, 2018

I don't think we want the change to assets/module-manifest.json

This will allow us to use the same component
in the console and in reps for example.
If the prop is not passed, it defers to the
current stacktrace rendering.
@nchevobbe nchevobbe force-pushed the nchevobbe:error-rep-render-stacktrace branch from e4fbd5a to eb3bfc0 Oct 23, 2018
@nchevobbe
Copy link
Member Author

@nchevobbe nchevobbe commented Oct 23, 2018

I don't think we want the change to assets/module-manifest.json

good catch!

@darkwing
Copy link
Contributor

@darkwing darkwing commented Oct 24, 2018

@janodvarko Just a heads up you were requested for review here

Copy link
Member

@janodvarko janodvarko left a comment

Looks good to me, thanks Nicolas!

Honza

@@ -20,7 +20,8 @@ const IGNORED_SOURCE_URLS = ["debugger eval code"];
ErrorRep.propTypes = {
object: PropTypes.object.isRequired,
// @TODO Change this to Object.values when supported in Node's version of V8
mode: PropTypes.oneOf(Object.keys(MODE).map(key => MODE[key]))
mode: PropTypes.oneOf(Object.keys(MODE).map(key => MODE[key])),
renderStacktrace: PropTypes.func

This comment has been minimized.

@janodvarko

janodvarko Oct 25, 2018
Member

It would be great to have an explanatory comment for the new prop

  renderStacktrace: PropTypes.func

This comment has been minimized.

@nchevobbe

nchevobbe Oct 25, 2018
Author Member

done

@nchevobbe nchevobbe merged commit 90e0f6f into firefox-devtools:master Oct 25, 2018
2 checks passed
2 checks passed
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@nchevobbe nchevobbe deleted the nchevobbe:error-rep-render-stacktrace branch Oct 25, 2018
darkwing added a commit that referenced this pull request Oct 25, 2018
…7140)

* Use renderStacktrace prop if provided to render Error rep stacktrace

This will allow us to use the same component
in the console and in reps for example.
If the prop is not passed, it defers to the
current stacktrace rendering.

* Update error.js
darkwing added a commit that referenced this pull request Oct 26, 2018
…7140)

* Use renderStacktrace prop if provided to render Error rep stacktrace

This will allow us to use the same component
in the console and in reps for example.
If the prop is not passed, it defers to the
current stacktrace rendering.

* Update error.js
darkwing added a commit that referenced this pull request Oct 26, 2018
…7140)

* Use renderStacktrace prop if provided to render Error rep stacktrace

This will allow us to use the same component
in the console and in reps for example.
If the prop is not passed, it defers to the
current stacktrace rendering.

* Update error.js
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants