You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a helper method to copy an array of numbers to a JS TypedArray (#31)
* Add a helper method to copy an array of numbers to a JS TypedArray
* _copy_typed_array_content → _create_typed_array
* Add globalVariable
* Remove broken test target
* Create JSTypedArray
* Reduce to just a single class
* Clean up types
* Fix tests
* Formatting
* Test all the array types
* Fix test error
* Add a test("name") { ... } helper that makes it easy to find out which test errors on the JS side happen in
* Rename allocHeap and freeHeap to retain/release
This matches the Objective-C names and better corresponds with their tasks (freeHeap just decreases ref count so it doesn’t always free). I’m not as sure about allocHeap → retain because it adds to the heap in addition to increasing the refcount.
* Propagate names through to the Swift side
* Add an explicit retain() function and fix a ref counting bug
* Add error when reading invalid reference
Previously it would just return undefined which would throw an error when attempting to use the object later on. Now you’re able to demangle the stack trace to find exactly where you’re misusing a ref.
* Actually fix the tests
* Explain why _retain is necessary
* Update _CJavaScriptKit.h
* Remove manual reference counting
* Fix test cases
* Expose failable initializer
Co-authored-by: Yuta Saito <kateinoigakukun@gmail.com>
0 commit comments