ibaryshnikov
c01575c1bc
typo fixed in Atomics docs
2019-07-17 00:48:00 +03:00
ibaryshnikov
d1d3021271
added polyfill for Atomics.wait and used it to notify futures
2019-07-17 00:48:00 +03:00
Alex Crichton
e596ef596c
Bump to 0.2.48
2019-07-11 15:02:39 -07:00
Nick Fitzgerald
d02e115fd4
Merge pull request #1650 from alexcrichton/less-csp
...
Use static accessors if possible to get global object
2019-07-10 09:37:56 -07:00
Alex Crichton
0b08bba0c7
Use static accessors if possible to get global object
...
Previously we always used `Function('return this')` but this triggers
CSP errors since it's basically `eval`. Instead this adds a few
preflight checks to look for objects like `globalThis`, `self`, etc.
Currently we don't have a `#[wasm_bindgen]` function annotation to
import a bare global field like `self`, but we test accesses with
`self.self` and `globalThis.globalThis`, catching errors to handle any
issues.
Closes #1641
2019-07-08 13:28:06 -07:00
Richard Dodd
2541507789
Add in (unsafe and incorrect) impls of Send/Sync that are now required.
2019-07-06 16:30:29 +01:00
Samuel Warfield
367a56eb25
Test are fully implemented
2019-06-28 14:14:27 -06:00
Samuel Warfield
06d0704cf8
Added tests for bind1()
2019-06-28 12:03:45 -06:00
Samuel Warfield
caa86a07a0
Attempted to tackle #1622
2019-06-27 15:48:18 -06:00
Pauan
497c5ed423
Removing TODOs
2019-06-25 21:42:20 +02:00
Pauan
b9fd30b49e
Adding in TODO note
2019-06-25 21:42:20 +02:00
Pauan
8cb9b88acb
Adding in unit tests for From impl
2019-06-25 21:42:20 +02:00
Pauan
86937b9dba
Adding in From impl for TypedArrays
2019-06-25 21:42:20 +02:00
Alex Crichton
d71ab78fc6
Bump to 0.2.47
2019-06-19 11:14:37 -07:00
Alex Crichton
8fc0a38402
Bump to 0.2.46
2019-06-14 11:44:58 -07:00
Teddy Katz
5c5c13cf9e
Add Array#flat and Array#flatMap to js-sys ( fixes #1454 )
2019-06-03 18:32:58 -04:00
Alex Crichton
82467f9793
Use dyn
with all trait objects
...
Fixes new warnings showing up on nightly nowadays.
2019-06-03 08:28:55 -07:00
Alex Crichton
137bbdf2e3
Bump to 0.2.45
2019-05-20 09:44:03 -07:00
Alex Crichton
773c6ff430
Bump to 0.2.44
2019-05-16 07:47:23 -07:00
Alex Crichton
578d59ebc0
Merge pull request #1440 from c410-f3r/getters
...
Getters/Setters for fields
2019-04-30 12:07:34 -05:00
Alex Crichton
f2429be07f
Bump to 0.2.43
2019-04-29 08:28:41 -07:00
Alex Crichton
60bb68649b
Merge pull request #1490 from RReverser/deprecate-custom-try-from
...
Recommend to use dyn_ref on funcs and strings
2019-04-29 09:08:00 -05:00
Caio
0c4cdefd07
Rustfmt
2019-04-29 09:45:23 -03:00
Alex Crichton
36c0a1347d
Merge pull request #1492 from RReverser/function-new-with-args
...
Add bindings for `new Function(args, body)`
2019-04-26 12:05:46 -05:00
Ingvar Stepanyan
814f576b1d
Add bindings for new Function(args, body)
...
We don't support variadic args in front, but, luckily for us, `new Function` accepts comma-separated args as a single string as well (see updated JSON test for an example).
2019-04-26 17:42:23 +01:00
Ingvar Stepanyan
85eea18658
Adds missing variadic bindings for string methods
...
- `JsString::from_code_point` - allows to create JS strings using slice of codes in WASM memory.
- `JsString::from_char_code` - same as above, but also uses updated signature with `u16` instead of `u32` (partially helps with #1460 at least for the new binding).
2019-04-26 16:57:34 +01:00
Ingvar Stepanyan
ccc99cd047
Recommend to use dyn_ref on funcs and strings
...
Now that functions and strings work properly with custom typechecks, these custom methods seem obsolete, so I'd recommend to use standard dyn_ref instead.
2019-04-26 15:50:08 +01:00
Alex Crichton
26f9d86f62
Merge pull request #1487 from ibaryshnikov/shared_array_buffer_tests
...
Added tests for SharedArrayBuffer
2019-04-26 09:38:16 -05:00
Kevin Gibbons
70480ad29d
fix test
2019-04-25 21:21:17 -07:00
Kevin Gibbons
a32d2553fc
js-sys: add Object.fromEntries
2019-04-25 20:52:29 -07:00
Alex Crichton
26df24ae6a
Merge pull request #1484 from alexcrichton/new-node
...
Upgrade version of node.js used on Azure
2019-04-25 22:14:31 -05:00
ibaryshnikov
af22a26880
added tests for SharedArrayBuffer
2019-04-26 10:59:06 +08:00
Alex Crichton
7e512ba187
Merge pull request #1463 from ibaryshnikov/atomics-support
...
added Atomics and SharedArrayBuffer
2019-04-25 21:48:55 -05:00
Alex Crichton
dea5bad698
Fix test for node 12
2019-04-25 19:30:32 -07:00
ibaryshnikov
b05ae44a8c
changed f64 to i32 in static methods of Atomics, changed static_method_of to js_namespace, set typed_array type to Int32Array in notify and wait methods
2019-04-26 01:56:58 +08:00
ibaryshnikov
58245b0587
changed String to JsString in Atomics::wait
2019-04-26 00:02:19 +08:00
ibaryshnikov
de2c2cf26c
fixed Atomics::wait and Atomics::wait_with_timeout return type
2019-04-25 19:18:31 +08:00
Ingvar Stepanyan
680a6bbb0c
Remove PartialEq<char> for JsString for now
...
This seems to spark controversy, so removing for now but should be easy enough to still add in the future.
2019-04-24 13:40:18 +01:00
ibaryshnikov
0759bfa7e2
f32 changed to f64 in Atomics
2019-04-24 00:27:15 +08:00
ibaryshnikov
f1eaefdf0d
fixed value types in Atomics methods
2019-04-24 00:25:25 +08:00
ibaryshnikov
1071457c3d
added SharedArrayBuffer and Atomics to js-sys
2019-04-24 00:01:15 +08:00
Ingvar Stepanyan
bc4a98d146
Add JsString <-> char conversions
...
These are pretty common and already supported via ABI conversions, yet pretty easy to get wrong when converting them manually.
Fixes #1363 .
2019-04-23 15:54:06 +01:00
Ingvar Stepanyan
d7650863ab
Fix or suppress {primitive}::new warnings in tests
...
Constructing boxed primitives was deprecated in #1447 .
Some tests have been still using these methods, so this PR either updates them to use newly added {primitive}::from implementations or adds `#[allow(deprecated)]` where necessary.
2019-04-17 18:25:45 +01:00
Alex Crichton
ff1addbbaa
Run cargo fmt
2019-04-16 10:52:27 -07:00
Alex Crichton
526b253b47
Merge pull request #1451 from RReverser/more-static-namespaces
...
Transform Math, Reflect and JSON into static namespaces
2019-04-15 09:41:40 -05:00
Ingvar Stepanyan
ed45ca72da
Fix more DataView documentation mistakes
...
I fixed few copy-paste mistakes in https://github.com/rustwasm/wasm-bindgen/pull/1372 , but haven't noticed that they go even deeper :(
2019-04-15 14:31:23 +01:00
Ingvar Stepanyan
62b7d3e3c4
Transform JSON into a namespace
2019-04-13 02:22:19 +01:00
Ingvar Stepanyan
75c2971ab9
Transform Reflect into a namespace
2019-04-13 02:21:33 +01:00
Ingvar Stepanyan
fe939bc911
Transform Math into a namespace
2019-04-13 02:20:24 +01:00
Ingvar Stepanyan
2f524ee494
Leverage new is_type_of
for iterator protocol
...
Treats any object of shape `{ next: function }` as an iterator via new `is_type_of` method. This is consistent with JavaScript iteration protocol which we already respect.
Also fixes a minor issue that `is_function` was unnecessarily called twice (once explicitly and once as part of `dyn_into` which now does the same check).
2019-04-12 20:30:41 +01:00