-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[wasm] Fix NRE caused by WeakReference collected on JS interop boundary. #54453
Conversation
|
Open questions
Alternative implementation, pass false from |
I agree that the ownsHandle logic looks wrong, at least based on convention where an ownsHandle=true usually means 'this new object owns the underlying handle'. |
I just found this comment in the original PR
|
That doesn't really clarify it at all :-) |
fcbb9ab
to
dc2108f
Compare
Note, we could not use the counter on the SafeHandle base class, because it could not be increased after the handle was released once. The same instance of JSObject could be passed from JS space multiple times, even on multiple calls. |
This doesn't address potential issue with naked pointers together with compacting GC. I have not seen that to manifest yet. |
dc2108f
to
b799aaa
Compare
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.
So basically *InFlight is a strong ref held on top of the weak one across the transitions where we need to keep a strong ref?
Exactly. We keep the weak ref in place, because it's handle id has longer life-cycle. |
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 only see style issues
...nteropServices.JavaScript/tests/System/Runtime/InteropServices/JavaScript/JavaScriptTests.cs
Show resolved
Hide resolved
...e.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/AnyRef.cs
Outdated
Show resolved
Hide resolved
...e.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/AnyRef.cs
Outdated
Show resolved
Hide resolved
....Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Runtime.cs
Outdated
Show resolved
Hide resolved
...nteropServices.JavaScript/tests/System/Runtime/InteropServices/JavaScript/JavaScriptTests.cs
Outdated
Show resolved
Hide resolved
...nteropServices.JavaScript/tests/System/Runtime/InteropServices/JavaScript/JavaScriptTests.cs
Show resolved
Hide resolved
Failure of |
ci failure looks like #45204 which has been disabled now |
@pavelsavara can you resolve the conflict |
…t over the managed/JS boundary
ac1868e
to
344041d
Compare
Rebased, let's see how it works together with rooting. It should be just fine. |
two hits on #55536 |
runtime (Libraries Test Run release mono Linux x64 Debug) is
which sounds like #55642 |
runtime (Mono llvmaot Pri0 Runtime Tests Run Linux arm64 release) is
|
/azp run |
You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list. |
it hasn't restarted in 40 minutes and non of the failures were relevant to a browser only change. |
Fixes #53872
Fixes #53957
Fixes #54655