summaryrefslogtreecommitdiff
path: root/js/text_encoding_test.ts
diff options
context:
space:
mode:
authorF001 <changchun.fan@qq.com>2018-12-05 12:36:10 +0800
committerRyan Dahl <ry@tinyclouds.org>2018-12-05 00:14:53 -0800
commit60c008d23b2bdad333711b43148a5053e83a62cc (patch)
treef14a975d28387ab8d4906580b871958b3907a511 /js/text_encoding_test.ts
parent45320beca82518e998614d2cbb4e733a47b7fef9 (diff)
Isolate::from_raw_ptr and other cleanups.
`Isolate::from_void_ptr` is renamed to `from_raw_ptr`, to keep consistency with std libs. It is changed to `unsafe` function, because it can't guarantee that the input is valid. This guarantee should be provided by the caller. Its return type is changed to `&Isolate`, because `&mut Isolate` type requires that no other aliases co-exist in this period of time, this does not seem true. So I changed most of the methods to accept shared reference `&Isolate`. It is easier to reason about the correctness of `unsafe` blocks. As long as these shared references are in the same thread, these `unsafe` codes are probably correct.
Diffstat (limited to 'js/text_encoding_test.ts')
0 files changed, 0 insertions, 0 deletions