-
-
Notifications
You must be signed in to change notification settings - Fork 443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We don't need no dynamics #823
Conversation
@@ -173,8 +174,8 @@ internal async Task<JSHandle> EvaluateFunctionHandleAsync(string script, params | |||
} | |||
} | |||
|
|||
internal JSHandle CreateJSHandle(dynamic remoteObject) | |||
=> (remoteObject.subtype == "node" && Frame != null) | |||
internal JSHandle CreateJSHandle(JToken remoteObject) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to create a class for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will implement a class @Meir017 the shape will be a composition of that ;)
{ | ||
internal class EvaluateHandleResponse | ||
{ | ||
public JToken ExceptionDetails { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be a class?
@@ -1865,7 +1866,7 @@ private async Task<object> ExecuteBinding(BindingCalledResponse e) | |||
if (taskResult.GetType().IsGenericType) | |||
{ | |||
// the task is already awaited and therefore the call to property Result will not deadlock | |||
result = ((dynamic)taskResult).Result; | |||
result = taskResult.GetType().GetProperty(taskResultPropertyName).GetValue(taskResult); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the old way was weird but this also feels a bit odd, is there a clean way to do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I open to new ideas 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created an issue for this #824
lib/PuppeteerSharp/Page.cs
Outdated
{ | ||
if (e.Entry.Args != null) | ||
{ | ||
foreach (var arg in e.Entry?.Args) | ||
{ | ||
RemoteObjectHelper.ReleaseObject(Client, arg, _logger); | ||
await RemoteObjectHelper.ReleaseObjectAsync(Client, arg, _logger); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this missing .ConfigureAwait(false)
?
Ready to review again @Meir017 |
closes #97