servo / rust-mozjs

DEPRECATED - moved to servo/mozjs instead.
Mozilla Public License 2.0
293 stars 122 forks source link

Work around Windows arm64 crashes #467

Closed jdm closed 5 years ago

jdm commented 5 years ago

This creates a nicer API around the RealmOptions changes from https://github.com/servo/mozjs/pull/191. This also works around crashes encountered when passing jsid values by value.


This change is Reviewable

asajeffrey commented 5 years ago

@bors-servo r+

bors-servo commented 5 years ago

:pushpin: Commit fde5b13 has been approved by asajeffrey

jdm commented 5 years ago

This needs to wait for https://github.com/servo/mozjs/pull/191 to merge first.

jdm commented 5 years ago

@bors-servo r-

jdm commented 5 years ago

@bors-servo r=asajeffrey

bors-servo commented 5 years ago

:pushpin: Commit 3a4aa90 has been approved by asajeffrey

bors-servo commented 5 years ago

:hourglass: Testing commit 3a4aa90a94661710f7d675d47e740cbe62f5b229 with merge 1fab93ee8586ed4839aea26977201df78b34ee22...

bors-servo commented 5 years ago

:broken_heart: Test failed - status-appveyor

CYBAI commented 5 years ago
In AppVeyor ``` error[E0599]: no function or associated item named `default` found for type `mozjs::jsapi::RealmOptions` in the current scope --> tests\evaluate.rs:27:47 | 27 | &RealmOptions::default()) | ^^^^^^^ function or associated item not found in `mozjs::jsapi::RealmOptions` error: aborting due to previous error For more information about this error, try `rustc --explain E0599`. The following warnings were emitted during compilation: warning: In file included from :1: warning: C:\projects\rust-mozjs\target\x86_64-pc-windows-msvc\debug\build\mozjs_sys-994add0909aabfcd\out\js\src\js-confdefs.h(50,9): warning: 'WIN32' macro redefined [-Wmacro-redefined] warning: #define WIN32 1 warning: ^ warning: (3,9): note: previous definition is here warning: #define WIN32 warning: ^ warning: In file included from src/jsglue.cpp:15: warning: In file included from C:\projects\rust-mozjs\target\x86_64-pc-windows-msvc\debug\build\mozjs_sys-994add0909aabfcd\out\dist\include\jsapi.h:12: warning: In file included from C:\projects\rust-mozjs\target\x86_64-pc-windows-msvc\debug\build\mozjs_sys-994add0909aabfcd\out\dist\include/mozilla/AlreadyAddRefed.h:12: warning: C:\projects\rust-mozjs\target\x86_64-pc-windows-msvc\debug\build\mozjs_sys-994add0909aabfcd\out\dist\include\mozilla/Assertions.h(219,1): warning: function declared 'noreturn' should not return [-Winvalid-noreturn] warning: } warning: ^ warning: In file included from src/jsglue.cpp:15: warning: In file included from C:\projects\rust-mozjs\target\x86_64-pc-windows-msvc\debug\build\mozjs_sys-994add0909aabfcd\out\dist\include\jsapi.h:29: warning: In file included from C:\projects\rust-mozjs\target\x86_64-pc-windows-msvc\debug\build\mozjs_sys-994add0909aabfcd\out\dist\include/js/CallArgs.h:72: warning: C:\projects\rust-mozjs\target\x86_64-pc-windows-msvc\debug\build\mozjs_sys-994add0909aabfcd\out\dist\include\js/RootingAPI.h(762,8): warning: 'dllexport' attribute ignored [-Wignored-attributes] warning: struct JS_PUBLIC_API MovableCellHasher> { warning: ^ warning: C:\projects\rust-mozjs\target\x86_64-pc-windows-msvc\debug\build\mozjs_sys-994add0909aabfcd\out\dist\include\jstypes.h(47,25): note: expanded from macro 'JS_PUBLIC_API' warning: # define JS_PUBLIC_API MOZ_EXPORT warning: ^ warning: C:\projects\rust-mozjs\target\x86_64-pc-windows-msvc\debug\build\mozjs_sys-994add0909aabfcd\out\dist\include\mozilla/Types.h(41,35): note: expanded from macro 'MOZ_EXPORT' warning: # define MOZ_EXPORT __declspec(dllexport) warning: ^ warning: 3 warnings generated. error: Could not compile `mozjs`. ```
In Travis ``` warning: trait objects without an explicit `dyn` are deprecated --> src/panic.rs:9:55 | 9 | thread_local!(static PANIC_RESULT: RefCell>> = RefCell::new(None)); | ^^^^^^^^^^ help: use `dyn`: `dyn Any + Send` | = note: `#[warn(bare_trait_objects)]` on by default warning: trait objects without an explicit `dyn` are deprecated --> src/panic.rs:9:55 | 9 | thread_local!(static PANIC_RESULT: RefCell>> = RefCell::new(None)); | ^^^^^^^^^^ help: use `dyn`: `dyn Any + Send` warning: trait objects without an explicit `dyn` are deprecated --> src/panic.rs:9:55 | 9 | thread_local!(static PANIC_RESULT: RefCell>> = RefCell::new(None)); | ^^^^^^^^^^ help: use `dyn`: `dyn Any + Send` | = note: `#[warn(bare_trait_objects)]` on by default warning: trait objects without an explicit `dyn` are deprecated --> src/panic.rs:9:55 | 9 | thread_local!(static PANIC_RESULT: RefCell>> = RefCell::new(None)); | ^^^^^^^^^^ help: use `dyn`: `dyn Any + Send` Running `rustc --crate-name evaluate tests/evaluate.rs --color always --emit=dep-info,link -C debuginfo=2 --test -C metadata=5128c4bb7ac09cc7 -C extra-filename=-5128c4bb7ac09cc7 --out-dir /home/travis/build/servo/rust-mozjs/target/debug/deps -C incremental=/home/travis/build/servo/rust-mozjs/target/debug/incremental -L dependency=/home/travis/build/servo/rust-mozjs/target/debug/deps --extern lazy_static=/home/travis/build/servo/rust-mozjs/target/debug/deps/liblazy_static-d197baf3c1fb81da.rlib --extern libc=/home/travis/build/servo/rust-mozjs/target/debug/deps/liblibc-f527a8547dbd0338.rlib --extern log=/home/travis/build/servo/rust-mozjs/target/debug/deps/liblog-1339569509fd2d00.rlib --extern mozjs=/home/travis/build/servo/rust-mozjs/target/debug/deps/libmozjs-9e865939887e7e09.rlib --extern mozjs_sys=/home/travis/build/servo/rust-mozjs/target/debug/deps/libmozjs_sys-535fae7bf3719c06.rlib --extern num_traits=/home/travis/build/servo/rust-mozjs/target/debug/deps/libnum_traits-b3320ff1eaae551b.rlib -L native=/home/travis/build/servo/rust-mozjs/target/debug/build/mozjs-51caf84094ca490b/out -L native=/home/travis/build/servo/rust-mozjs/target/debug/build/mozjs_sys-4594251bc03ec97f/out/js/src/build -L native=/home/travis/build/servo/rust-mozjs/target/debug/build/mozjs_sys-4594251bc03ec97f/out -L native=/usr/lib/x86_64-linux-gnu` error[E0599]: no function or associated item named `default` found for type `mozjs::jsapi::RealmOptions` in the current scope --> tests/evaluate.rs:27:47 | 27 | &RealmOptions::default()) | ^^^^^^^ function or associated item not found in `mozjs::jsapi::RealmOptions` error: aborting due to previous error For more information about this error, try `rustc --explain E0599`. error: Could not compile `mozjs`. ```
jdm commented 5 years ago

@bors-servo r=asajeffrey

bors-servo commented 5 years ago

:pushpin: Commit b5860ac has been approved by asajeffrey

bors-servo commented 5 years ago

:hourglass: Testing commit b5860ac56d638f48a47e92b8391f75989ec61ce3 with merge 4a367acb9bcc01f06b13c491e2cdc6a85fff6474...

bors-servo commented 5 years ago

:broken_heart: Test failed - checks-travis

jdm commented 5 years ago

@bors-servo r=asajeffrey

bors-servo commented 5 years ago

:pushpin: Commit 26fa7f5 has been approved by asajeffrey

bors-servo commented 5 years ago

:hourglass: Testing commit 26fa7f5f24ba69862bc0451f7b2178b5bdb9ded8 with merge 07eec81ec4b6a81663acf29d567807eaf2a558a8...

bors-servo commented 5 years ago

:sunny: Test successful - checks-travis, status-appveyor Approved by: asajeffrey Pushing 07eec81ec4b6a81663acf29d567807eaf2a558a8 to master...