Commit Graph

2331 Commits

Author SHA1 Message Date
1b764103f6 Merge remote-tracking branch 'upstream/master' into add-allow-clippy 2019-02-09 03:13:16 +09:00
812c6bf1da Merge pull request #1233 from fitzgen/fix-issue-1232
Use textContent instead of innerHTML for extracting logs from headless browser tests
2019-02-08 11:05:35 +01:00
11eeeb8fc8 Use textContent instead of innerHTML for extracting logs from headless browser tests
Easier to maintain fidelity and less likely to be sabotaged by XSS and
`<script>` tags.

Fixes #1232
2019-02-08 10:35:19 +01:00
9d27bc2e8b Merge pull request #1199 from chinedufn/ref-slice
Whitelist for slice args that do not need to be mutable
2019-02-07 13:40:36 +01:00
acd69e97ee Remove RefCell 2019-02-07 07:14:33 -05:00
ed28ce9db2 Clean up 2019-02-05 13:47:46 -05:00
74cd3c08f6 Merge pull request #1228 from rustwasm/dependabot/cargo/parity-wasm-0.36
Update parity-wasm requirement from 0.35 to 0.36
2019-02-05 08:28:53 +01:00
3de5253554 Remove passive segment tests for now 2019-02-04 22:24:08 -08:00
ef37986541 Update more parity-wasm 2019-02-04 22:06:10 -08:00
a0c8514e66 Merge pull request #1230 from fitzgen/multiple-futures-same-promise
futures: Add a test for creating multiple futures from the same promise
2019-02-04 20:57:35 +01:00
e20c4067dc futures: Add a test for creating multiple futures from the same promise 2019-02-04 16:38:21 +01:00
4a50d7b71c Update parity-wasm requirement from 0.35 to 0.36
Updates the requirements on [parity-wasm](https://github.com/paritytech/parity-wasm) to permit the latest version.
- [Release notes](https://github.com/paritytech/parity-wasm/releases)
- [Commits](https://github.com/paritytech/parity-wasm/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-04 08:30:40 +00:00
bf8a380264 Merge pull request #1226 from Pauan/optimize-catch
Simplifying the error handling code
2019-02-04 08:23:57 +01:00
e4294babeb Simplifying the error handling code 2019-02-04 02:08:08 +01:00
8b6e951e34 Adding in Reflect::get_f64, Reflect::get_u32, Reflect::set_f64, and Reflect::set_u32 2019-02-04 01:32:43 +01:00
fb8e158c9b remove unnecessary changes 2019-02-03 22:44:27 +09:00
51f7756e83 add #[allow(clippy::*)] to 901 line 2019-02-03 22:40:24 +09:00
d3a523439e comment out the all #[allow(clippy::*)] lines 2019-02-03 13:55:57 +09:00
223054811d fixed conflict 2019-02-03 13:49:42 +09:00
9f00664d81 Merge pull request #1219 from fitzgen/UnwrapThrowExt
Add the `UnwrapThrowExt<T>` trait
2019-02-01 15:19:27 -06:00
2e80313aa3 Merge pull request #1221 from rhysd/format-dts-file
Format .d.ts file
2019-02-01 09:24:49 -06:00
66be3d3f66 Merge pull request #1220 from carlosdp/patch-1
Fix version number in travis instruction
2019-02-01 09:14:08 -06:00
6e2f10440e give 2 space indentations to each enum variant 2019-02-01 16:25:25 +09:00
a1995cafd4 remove unnecessary blank lines in .d.ts file 2019-02-01 16:07:31 +09:00
23ccd3b5c1 remove unnecessary space before function name in .d.ts file 2019-02-01 16:07:12 +09:00
019a0863c4 give class members 2 spaces indentation in .d.ts files 2019-02-01 15:45:01 +09:00
11db255e47 Fix version number in travis instruction 2019-01-31 18:00:49 -08:00
0e11e4a3bd Add the UnwrapThrowExt<T> trait
An extension trait for `Option<T>` and `Result<T, E>` for unwraping the `T`
value, or throwing a JS error if it is not available.

These methods should have a smaller code size footprint than the normal
`Option::unwrap` and `Option::expect` methods, but they are specific to
working with wasm and JS.

On non-wasm32 targets, defaults to the normal unwrap/expect calls.
2019-01-31 13:26:21 -08:00
92072bf03c Merge pull request #1218 from rustwasm/dependabot/npm_and_yarn/@wasm-tool/wasm-pack-plugin-0.2.3
Update @wasm-tool/wasm-pack-plugin requirement from 0.2.2 to 0.2.3
2019-01-31 10:14:17 -06:00
965bd8c9fa Clean up 2019-01-31 07:32:12 -05:00
08e7560f72 Update @wasm-tool/wasm-pack-plugin requirement from 0.2.2 to 0.2.3
Updates the requirements on [@wasm-tool/wasm-pack-plugin](https://github.com/wasm-tool/wasm-pack-plugin) to permit the latest version.
- [Release notes](https://github.com/wasm-tool/wasm-pack-plugin/releases)
- [Commits](https://github.com/wasm-tool/wasm-pack-plugin/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-31 08:12:51 +00:00
33fda01625 Merge pull request #1217 from rustwasm/dependabot/npm_and_yarn/@wasm-tool/wasm-pack-plugin-0.2.2
Update @wasm-tool/wasm-pack-plugin requirement from 0.2.1 to 0.2.2
2019-01-30 07:10:43 -08:00
5d188e4c0f Update @wasm-tool/wasm-pack-plugin requirement from 0.2.1 to 0.2.2
Updates the requirements on [@wasm-tool/wasm-pack-plugin](https://github.com/wasm-tool/wasm-pack-plugin) to permit the latest version.
- [Release notes](https://github.com/wasm-tool/wasm-pack-plugin/releases)
- [Commits](https://github.com/wasm-tool/wasm-pack-plugin/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-30 08:15:57 +00:00
cf1e1e0dc1 Merge pull request #1214 from alexcrichton/enum-option
Support `Option` with custom enums in JS
2019-01-29 09:57:51 -06:00
5fbcad48d0 Merge pull request #1215 from eminence/webaudio_fix
Fix webaudio example
2019-01-29 09:04:56 -06:00
153acdb4fd Fix webaudio example
The rust set_* functions except numbers, not strings.
2019-01-28 23:54:40 -05:00
9224455077 Support Option with custom enums in JS
Find a hole automatically to use a sentinel value for `None`, and then
just wire everything up!

Closes #1198
2019-01-28 14:27:57 -08:00
03e52c7045 Merge pull request #1212 from Ivshti/master
browser-support: warn about the performance hit of the polyfill
2019-01-28 14:30:07 -06:00
3e5280243f Merge pull request #1208 from alexcrichton/expand-recursive
Fix conditional #[wasm_bindgen] in impls
2019-01-28 14:29:26 -06:00
c35d6f4b0a Fix conditional #[wasm_bindgen] in impls
Reported in #1191 the fix requires us to get a bit creative I think. The
general gist is that a block like this:

    #[wasm_bindgen]
    impl Foo {
        pub fn foo() {}
    }

was previously expanded all in one go. Now, however, it's expanded into:

    impl Foo {
        #[__wasm_bindgen_class_marker(Foo = "Foo")]
        pub fn foo() {}
    }

    // goop generated by orginal #[wasm_bindgen]

This method of expansion takes advantage of rustc's recursive expansion
feature. It also allows us to expand `impl` blocks and allow inner items
to not be fully expanded yet, such as still having `#[cfg]` attributes
(like in the original bug report).

We use theinternal `__wasm_bindgen_class_marker` to indicate that we're
parsing an `ImplItemMethod` unconditionally, and then generation
proceeds as usual. The only final catch is that when we're expanding in
an `impl` block we have to generate tokens for the `Program`
(wasm-bindgen injected goop like the custom section) inside the body
of the function itself instead of next to it. Otherwise we'd get syntax
errors inside of impl blocks!

Closes #1191
2019-01-28 12:29:01 -08:00
b3e97a7e45 browser-support: warn about the performance hit of using the polyfill~ 2019-01-28 20:55:11 +01:00
fa1d51fe44 Comment out WebGl tests 2019-01-26 12:19:28 -05:00
2e6880c43c Whitelist WebGlRenderingContext float slices 2019-01-26 12:10:08 -05:00
c56dff8ede Merge pull request #1204 from chocolatkey/patch-1
minor typo in js-sys lib.rs
2019-01-25 08:05:00 -07:00
e19306c6a9 add #[allow(clippy::*)] in the top-level items 2019-01-25 14:44:10 +09:00
2a6d2004e1 minor typo in js-sys lib.rs 2019-01-24 15:35:21 -08:00
f8dabfcae9 Merge pull request #1201 from rhysd/fix-optional-value-types
Add '| undefined' to optional types in generated .d.ts
2019-01-23 09:52:40 -07:00
3300301b3f add '| undefined' to optional types in generated .d.ts 2019-01-23 20:49:52 +09:00
048a22bc77 Fix idl_type swap 2019-01-22 21:35:22 -05:00
48b64f4cfe Remove test file 2019-01-21 19:24:37 -05:00