Objective-C API: JSValue should implement init and return nil in exceptional cases
authormhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Mar 2013 00:16:30 +0000 (00:16 +0000)
committermhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Mar 2013 00:16:30 +0000 (00:16 +0000)
commit3fbcea50e1310689e463effa5f646355974876e0
tree8bcb53cf07e45029c9bf496006e097b987dc0a54
parent57bf88e15c7d49847911107b1d6573263e30c025
Objective-C API: JSValue should implement init and return nil in exceptional cases
https://bugs.webkit.org/show_bug.cgi?id=111487

Reviewed by Darin Adler.

* API/JSValue.mm:
(-[JSValue init]): We return nil here because there is no way to get the instance into a coherent state
without a JSContext.
(-[JSValue initWithValue:inContext:]): Similarly, we should also return nil here if either of the arguments is 0.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/API/JSValue.mm
Source/JavaScriptCore/ChangeLog