getInternalObjcObject should validate the JSManagedObject's value.
Created attachment 290748 [details] Patch
Comment on attachment 290748 [details] Patch I'm not sure how to test this. If anyone has ideas that would be great.
Comment on attachment 290748 [details] Patch I think you could write an API test that went out of its way to garbage collect a JSManagedValue's value.
Created attachment 290771 [details] Patch
(In reply to comment #3) > Comment on attachment 290748 [details] > Patch > > I think you could write an API test that went out of its way to garbage > collect a JSManagedValue's value. I tried writing a test but it doesn't seem to work. Perhaps I did something wrong. My Objective-C knowledge is limited.
Comment on attachment 290771 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=290771&action=review > Source/JavaScriptCore/API/tests/testapi.mm:1189 > + JSValue *object = [JSValue valueWithNewObjectInContext:context]; This is an autoreleased value so you need a tighter autorelease pool to avoid a strong reference to 'object'.
Created attachment 290851 [details] Patch for landing
Comment on attachment 290851 [details] Patch for landing Clearing flags on attachment: 290851 Committed r206876: <http://trac.webkit.org/changeset/206876>
All reviewed patches have been landed. Closing bug.