Avoid allocation during NFCReader::HasPendingActivity()
HasPendingActivity of classes inheriting from ScriptWrappable are not allowed to allocate. Using GetNFCProxy in HasPendingActivity resulted in allocation. This issue was found by clusterfuzz. Added a call to GetNFCProxy during NFCReader initialization. This guarantees that a NFCProxy object exists when we call HasPendingActivity down the line and avoids the allocation. Bug: 1001974 Change-Id: I83abd54641618a56d33a73150ffdfccd3d64a73e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1796370 Commit-Queue: Omer Katz <omerkatz@chromium.org> Reviewed-by:Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#695589}
Showing
Please register or sign in to comment