Skip to content
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

Dart_SetLibraryTagHandler exits when called without a current isolate #3169

Closed
DartBot opened this issue May 22, 2012 · 7 comments
Closed

Dart_SetLibraryTagHandler exits when called without a current isolate #3169

DartBot opened this issue May 22, 2012 · 7 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.

Comments

@DartBot
Copy link

DartBot commented May 22, 2012

This issue was originally filed by sammcca...@google.com


This function is documented to return an error handle, but instead exits if called outside of any isolate.

@iposva-google
Copy link
Contributor

Set owner to @turnidge.
Added Area-VM, Accepted labels.

@turnidge
Copy link
Contributor

This is true for many functions in the dart api. If there is no current isolate then, as things currently stand, we can't make any handles at all, including error handles.

I have two options:

  1. Change the documentation for all "isolate required" functions to say that calling them w/o a current isolate exits.
  2. Manufacture some sort of fake error handle that is use whenever a function is called without a current isolate. I'm not sure how ugly this would be -- I would need to change all of the handle unwrapping to check for this special error handle.

I'll think on it.

@DartBot
Copy link
Author

DartBot commented May 23, 2012

This comment was originally written by sammcca...@google.com


It'd be great if it was possible to return a handle wrapping a statically allocated error message.

If Dart is embedded in e.g. a web server, then killing the process (and all serving threads) is problematic, even if the cause is misuse of the API.

But I understand this is tricky, and it's more of a frustration than a blocker for me.

@iposva-google
Copy link
Contributor

We could preallocate an general error handle in the VM isolate and return that in such a case.


Removed the owner.
Added this to the M6 milestone.
Added Triaged label.

@iposva-google
Copy link
Contributor

Removed Priority-Medium label.
Added Priority-Unassigned label.

@iposva-google
Copy link
Contributor

Removed this from the M6 milestone.

@DartBot DartBot added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. labels Jun 5, 2013
@iposva-google
Copy link
Contributor

Stale.

@kevmoo kevmoo removed the triaged label Mar 1, 2016
copybara-service bot pushed a commit that referenced this issue Oct 8, 2021
Changes:
```
> git log --format="%C(auto) %h %s" 37d0592..0764437
 https://dart.googlesource.com/pub.git/+/07644370 Make gitignore validator use gitignores from repo-root and down. (#3169)
 https://dart.googlesource.com/pub.git/+/205ea58c Handle build-versions when reformatting ranges (#3170)
 https://dart.googlesource.com/pub.git/+/8f7bfb8c migrate 3 leaf files to null-safety (#3168)
 https://dart.googlesource.com/pub.git/+/df5db1f1 Extract some parts of pubspec parsing to a null-safe library. (#3160)

```

Diff: https://dart.googlesource.com/pub.git/+/37d05928939b3100e7e55c3dff922651db1de1e1~..0764437088fd58eb7af779ecef66bab40dfcf2e9/
Change-Id: I8d938dbf6c3fba3c3f4d98bbaa5835acfaf132a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216020
Reviewed-by: Sarah Zakarias <zarah@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

4 participants