Last Comment Bug 783057 - Contacts API exposes raw JS objects to content via find
: Contacts API exposes raw JS objects to content via find
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla17
Assigned To: Bobby Holley (:bholley) (busy with Stylo)
:
Mentors:
Depends on:
Blocks: 553102
  Show dependency treegraph
 
Reported: 2012-08-15 12:21 PDT by Bobby Holley (:bholley) (busy with Stylo)
Modified: 2014-12-14 23:22 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Expose find results via XPCOM. v1 (1.96 KB, patch)
2012-08-15 12:26 PDT, Bobby Holley (:bholley) (busy with Stylo)
anygregor: review+
Details | Diff | Splinter Review

Description Bobby Holley (:bholley) (busy with Stylo) 2012-08-15 12:21:57 PDT
This breaks when we start denying access to chrome objects without __exposedProps__. Patch coming up to fix the issue.
Comment 1 Bobby Holley (:bholley) (busy with Stylo) 2012-08-15 12:26:44 PDT
Created attachment 652175 [details] [diff] [review]
Expose find results via XPCOM. v1

Attaching a patch. Gregor, if you're unsatisfied with the performance here, can you take
responsibility for fix the API as necessary so that it works with mandatory __exposedProps__?
I want to land this stuff ASAP before more insecure APIs arrive on m-c.
Comment 2 Bobby Holley (:bholley) (busy with Stylo) 2012-08-17 09:51:55 PDT
Thanks Gregor.

I manually ran the contact tests (since there aren't so many of them) in order to reduce try load. Pushed to m-i:

https://hg.mozilla.org/integration/mozilla-inbound/rev/6d1deb480cfd
Comment 3 Gregor Wagner [:gwagner] 2012-08-17 12:06:58 PDT
I just did the performance test:
loading 500 contacts without this patch: 2.1 - 2.6 sec
with this patch: 3.5 - 4 sec :(
I guess we have to fix it with __exposedProps__
I will file a followup
Comment 4 Ryan VanderMeulen [:RyanVM] 2012-08-17 19:22:49 PDT
https://hg.mozilla.org/mozilla-central/rev/6d1deb480cfd
Comment 5 Reuben Morais [:reuben] 2013-04-15 05:14:26 PDT
(In reply to Gregor Wagner [:gwagner] from comment #3)
> I just did the performance test:
> loading 500 contacts without this patch: 2.1 - 2.6 sec
> with this patch: 3.5 - 4 sec :(
> I guess we have to fix it with __exposedProps__
> I will file a followup

Is this still the case? We might be able to shave off a few seconds off the loading time for getAll if we can fix this performance regression.

Note You need to log in before you can comment on or make changes to this bug.