RESOLVED FIXED 162985
getInternalObjcObject should validate the JSManagedObject's value.
https://bugs.webkit.org/show_bug.cgi?id=162985
Summary getInternalObjcObject should validate the JSManagedObject's value.
Keith Miller
Reported 2016-10-05 14:08:01 PDT
getInternalObjcObject should validate the JSManagedObject's value.
Attachments
Patch (1.63 KB, patch)
2016-10-05 14:10 PDT, Keith Miller
no flags
Patch (3.28 KB, patch)
2016-10-05 18:59 PDT, Keith Miller
no flags
Patch for landing (2.87 KB, patch)
2016-10-06 12:42 PDT, Keith Miller
no flags
Keith Miller
Comment 1 2016-10-05 14:10:02 PDT
Keith Miller
Comment 2 2016-10-05 14:48:43 PDT
Comment on attachment 290748 [details] Patch I'm not sure how to test this. If anyone has ideas that would be great.
Geoffrey Garen
Comment 3 2016-10-05 15:25:09 PDT
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.
Keith Miller
Comment 4 2016-10-05 18:59:37 PDT
Keith Miller
Comment 5 2016-10-05 19:01:36 PDT
(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.
Geoffrey Garen
Comment 6 2016-10-06 11:54:37 PDT
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'.
Keith Miller
Comment 7 2016-10-06 12:42:13 PDT
Created attachment 290851 [details] Patch for landing
WebKit Commit Bot
Comment 8 2016-10-06 13:16:21 PDT
Comment on attachment 290851 [details] Patch for landing Clearing flags on attachment: 290851 Committed r206876: <http://trac.webkit.org/changeset/206876>
WebKit Commit Bot
Comment 9 2016-10-06 13:16:24 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.