Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Make JSError conform to JSBridgedClass#86

Merged
MaxDesiatov merged 2 commits into
mainswiftwasm/JavaScriptKit:mainfrom
jserror-jsvalueconstructibleswiftwasm/JavaScriptKit:jserror-jsvalueconstructibleCopy head branch name to clipboard
Oct 1, 2020
Merged

Make JSError conform to JSBridgedClass#86
MaxDesiatov merged 2 commits into
mainswiftwasm/JavaScriptKit:mainfrom
jserror-jsvalueconstructibleswiftwasm/JavaScriptKit:jserror-jsvalueconstructibleCopy head branch name to clipboard

Conversation

@MaxDesiatov

Copy link
Copy Markdown
Member

The lack of this conformance makes it impossible to attach catch callbacks to JSPromise when Failure: JSError, as catch methods have Failure: JSValueConstructible constraints.

The lack of this conformance makes it impossible to attach `catch` callbacks to `JSPromise`, as `catch` methods have `Failure: JSValueConstructible` constraints.
@MaxDesiatov MaxDesiatov added the bug Something isn't working label Sep 29, 2020
@MaxDesiatov MaxDesiatov requested a review from a team September 29, 2020 11:30
@github-actions

github-actions Bot commented Sep 29, 2020

Copy link
Copy Markdown

Time Change: +439.25ms (2%)

Total Time: 15,722.75ms

ℹ️ View Unchanged
Test name Duration Change
Serialization/Write JavaScript number directly 199.25ms +2ms (1%)
Serialization/Write JavaScript string directly 195.25ms +0.5ms
Serialization/Swift Int to JavaScript 5,722.75ms +147.75ms (2%)
Serialization/Swift String to JavaScript 5,885.25ms +211.25ms (3%)
Object heap/Increment and decrement RC 3,720.25ms +77.75ms (2%)

performance-action

@j-f1

j-f1 commented Sep 29, 2020

Copy link
Copy Markdown
Member

Does it make sense to make JSError a bridged class to the JavaScript Error class?

Comment thread Sources/JavaScriptKit/BasicObjects/JSError.swift Outdated
@MaxDesiatov MaxDesiatov requested a review from j-f1 October 1, 2020 16:27
@MaxDesiatov MaxDesiatov changed the title Add missing JSValueConstructible on JSError Make JSError conform to JSBridgedClass Oct 1, 2020
@MaxDesiatov MaxDesiatov merged commit cb1aaf2 into main Oct 1, 2020
@MaxDesiatov MaxDesiatov deleted the jserror-jsvalueconstructible branch October 1, 2020 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.