servo / rust-mozjs

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

Implement FromJSValConvertible for HandleValue #352

Closed KiChjang closed 7 years ago

KiChjang commented 7 years ago

This change is Reviewable

KiChjang commented 7 years ago

r? @jdm or @nox

KiChjang commented 7 years ago

Assertion added.

jdm commented 7 years ago
error[E0425]: cannot find value `cx` in this scope
   --> src\conversions.rs:197:39
    |
197 |                 AssertSameCompartment(cx, value.to_object());
    |                                       ^^ did you mean `_cx`?
error: aborting due to previous error

Please be sure this builds :)

KiChjang commented 7 years ago

bah humbug

KiChjang commented 7 years ago

'kay.

jdm commented 7 years ago
   Compiling mozjs_sys v0.0.0 (https://github.com/servo/mozjs#29132f67)
warning: unnecessary `unsafe` block
   --> src\conversions.rs:195:9
    |
195 |           unsafe {
    |  _________^ starting here...
196 | |             if value.is_object() {
197 | |                 AssertSameCompartment(cx, value.to_object());
198 | |             }
199 | |         }
    | |_________^ ...ending here: unnecessary `unsafe` block
    |
    = note: #[warn(unused_unsafe)] on by default
    Finished dev [unoptimized + debuginfo] target(s) in 622.32 secs
   Compiling js v0.1.4 (file:///C:/projects/rust-mozjs)
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
thread 'rustc' panicked at 'index out of bounds: the len is 8 but the index is 18446744073709551615', src\libcollections\vec.rs:1488
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: Could not compile `js`.
Build failed, waiting for other jobs to finish...
warning: unnecessary `unsafe` block
   --> src\conversions.rs:195:9
    |
195 |           unsafe {
    |  _________^ starting here...
196 | |             if value.is_object() {
197 | |                 AssertSameCompartment(cx, value.to_object());
198 | |             }
199 | |         }
    | |_________^ ...ending here: unnecessary `unsafe` block
    |
    = note: #[warn(unused_unsafe)] on by default
error: build failed

Unnerving. Fix the warning and let's see what happens?

KiChjang commented 7 years ago

omg, i don't know what's happening anymore, i just made a small change and rustc is so angry with me

jdm commented 7 years ago

Could you force push again? I'd like to see if this is an instance of https://github.com/rust-lang/rust/issues/41415.

jdm commented 7 years ago

Nevermind, that's an actual assertion failure.

jdm commented 7 years ago

Filed https://github.com/rust-lang/rust/issues/41484.

jdm commented 7 years ago

@bors-servo: r+

bors-servo commented 7 years ago

:pushpin: Commit 04e9e3a has been approved by jdm

bors-servo commented 7 years ago

:hourglass: Testing commit 04e9e3a47c20c4e7b396404506fd89dd91f03e57 with merge 5ba3550c8d1535e0ab66495588f3a46885373c83...

bors-servo commented 7 years ago

:sunny: Test successful - status-appveyor, status-travis Approved by: jdm Pushing 5ba3550c8d1535e0ab66495588f3a46885373c83 to master...