servo / rust-mozjs

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

Throw type error on converting non objects to sequence #238

Closed stspyder closed 8 years ago

stspyder commented 8 years ago

Fix for #237

Review on Reviewable

stspyder commented 8 years ago

I have updated the pull request. From JSAPI guide, it seems that JSAPI functions automatically sets the exception (thrown from JS) in the context and return false without we having to explicitly set one in the context. This exception will be cleared eventually down the stack.

I have updated the code to return an Err in case of a JS exception so that the calling code can return false if the conversion fails.

Ms2ger commented 8 years ago

@bors-servo r+

bors-servo commented 8 years ago

:pushpin: Commit f2f0770 has been approved by Ms2ger

bors-servo commented 8 years ago

:hourglass: Testing commit f2f0770 with merge 62d23de...

bors-servo commented 8 years ago

:sunny: Test successful - travis