Nicolas Chevobbe
ab5c268940
Bug 1403065 - Fix enumObjectProperties for exotic objects; r=bgrins,Oriol.
...
In the `enumProperties` function , we can pass some options to only retrieve
indexed or non indexed properties. The problem when doing this is that we were relying
on the value of a `length` property to get what's before (indexed) or after (non-indexed).
But if you have a plain object with a length property like `{length: 789}`,
and try to retrieve non-indexed properties, the function would return an empty ownProperties
object.
In this patch we make extra checks in the function to make sure we do return the expected
data to the client. A unit-test is added to ensure we don't regress.
MozReview-Commit-ID: FMCh9qnzeTT
2017-09-26 12:02:20 +02:00
..
2016-07-07 14:55:31 +02:00
2017-03-18 12:26:05 +01:00
2017-09-29 15:24:14 +02:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2016-05-18 12:49:23 -05:00
2017-06-19 11:32:37 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-04-14 18:29:12 +02:00
2017-08-08 15:24:04 +02:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-07-14 13:29:52 -06:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-08-08 15:24:04 +02:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-04-10 19:08:07 -05:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-07-14 13:29:52 -06:00
2017-03-18 12:26:05 +01:00
2016-06-09 14:10:07 -05:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-08-18 17:05:04 +02:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2016-06-09 14:10:07 -05:00
2016-06-09 14:10:07 -05:00
2016-06-09 14:10:07 -05:00
2017-08-11 03:47:30 +02:00
2017-03-18 12:26:05 +01:00
2017-08-08 15:24:04 +02:00
2017-08-08 15:24:04 +02:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-05-25 12:33:00 -04:00
2017-05-25 12:33:00 -04:00
2017-07-24 15:25:46 +02:00
2017-09-22 11:54:00 -04:00
2017-08-22 12:07:48 +02:00
2017-09-20 12:32:03 +02:00
2017-09-26 12:02:20 +02:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-06-19 11:32:37 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-06-03 20:14:13 +01:00
2017-08-18 17:05:04 +02:00
2017-08-18 17:05:04 +02:00
2017-08-18 17:05:04 +02:00
2017-08-18 17:05:04 +02:00
2017-08-18 17:05:04 +02:00
2017-08-18 17:05:04 +02:00
2017-03-18 12:26:05 +01:00
2017-08-08 15:24:04 +02:00
2017-08-18 17:05:04 +02:00
2017-03-18 12:26:05 +01:00
2017-08-18 17:05:04 +02:00
2017-08-18 17:05:04 +02:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-04-14 23:39:22 +02:00
2017-08-11 03:47:30 +02:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-05-02 17:31:05 -07:00
2017-03-18 12:26:05 +01:00
2017-05-02 17:31:05 -07:00
2017-05-02 17:31:05 -07:00
2017-07-28 15:28:08 -04:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-09-27 09:39:44 -06:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-08-08 15:24:04 +02:00
2017-08-08 15:24:04 +02:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-09-27 09:39:44 -06:00
2017-07-14 13:29:52 -06:00
2017-07-14 13:29:52 -06:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-07-14 13:29:52 -06:00
2017-04-14 18:29:12 +02:00
2017-03-18 12:26:05 +01:00
2017-08-31 14:21:57 -06:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2017-05-19 12:19:54 -05:00
2017-03-18 12:26:05 +01:00
2017-03-18 12:26:05 +01:00
2016-05-18 12:49:23 -05:00
2017-09-26 12:02:20 +02:00