|
|
Chromium Code Reviews
Description[IndexedDB] Added IndexedDBCursor lifetime tracing
IndexedDBCursor creation can currently cause OOM's in the browser.
Adding lifetime tracing so that this situation is visible.
R=cmumford
BUG=690517
Review-Url: https://codereview.chromium.org/2745703002
Cr-Commit-Position: refs/heads/master@{#460608}
Committed: https://chromium.googlesource.com/chromium/src/+/84f5e2800a49ce3de9f877ea842b104d0484bd52
Patch Set 1 #Patch Set 2 : Trace end on close #
Total comments: 4
Patch Set 3 : comments #Patch Set 4 : comments #Messages
Total messages: 18 (11 generated)
Chris, can you PTAL? Super small patch, adding IDBCursor lifetime tracing.
lgtm
The CQ bit was checked by dmurph@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2017/03/13 14:22:33, cmumford wrote: > lgtm FYI - I changed this slightly, as this object is still modeled after the lifetime in the JS. Now it records the end of lifetime on 'close'.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2745703002/diff/20001/content/browser/indexed... File content/browser/indexed_db/indexed_db_cursor.cc (right): https://codereview.chromium.org/2745703002/diff/20001/content/browser/indexed... content/browser/indexed_db/indexed_db_cursor.cc:73: if (!closed_) { Nit: How about Having ::Close() to a: if (closed_) return; and then remove the check from the destructor. C++ call tail optimization should make it equally efficient. https://codereview.chromium.org/2745703002/diff/20001/content/browser/indexed... content/browser/indexed_db/indexed_db_cursor.cc:278: IDB_ASYNC_TRACE_END("IndexedDBCursor::lifetime", this); ::lifetime is better called from the destructor since there's no guarantee how long the owner may hold on to a cursor after it is closed. I realize that it's the end of it's "effective" lifetime, but since the object still "lives" on, the name or call site seem out of place.
The CQ bit was checked by dmurph@chromium.org to run a CQ dry run
https://codereview.chromium.org/2745703002/diff/20001/content/browser/indexed... File content/browser/indexed_db/indexed_db_cursor.cc (right): https://codereview.chromium.org/2745703002/diff/20001/content/browser/indexed... content/browser/indexed_db/indexed_db_cursor.cc:73: if (!closed_) { On 2017/03/14 16:30:56, cmumford wrote: > Nit: How about Having ::Close() to a: > > if (closed_) > return; > > and then remove the check from the destructor. C++ call tail optimization should > make it equally efficient. Done. https://codereview.chromium.org/2745703002/diff/20001/content/browser/indexed... content/browser/indexed_db/indexed_db_cursor.cc:278: IDB_ASYNC_TRACE_END("IndexedDBCursor::lifetime", this); On 2017/03/14 16:30:56, cmumford wrote: > ::lifetime is better called from the destructor since there's no guarantee how > long the owner may hold on to a cursor after it is closed. I realize that it's > the end of it's "effective" lifetime, but since the object still "lives" on, the > name or call site seem out of place. Changed to ::open
I'm going to go ahead and submit (cl queue is pretty big), let me know if I should change anything in a follow up cl
The CQ bit was unchecked by dmurph@chromium.org
The CQ bit was checked by dmurph@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from cmumford@chromium.org Link to the patchset: https://codereview.chromium.org/2745703002/#ps60001 (title: "comments")
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 60001, "attempt_start_ts": 1490828585097750,
"parent_rev": "d6dbb26e31818eed0097654ecb89aaddc2c64f8d", "commit_rev":
"84f5e2800a49ce3de9f877ea842b104d0484bd52"}
Message was sent while issue was closed.
Description was changed from ========== [IndexedDB] Added IndexedDBCursor lifetime tracing IndexedDBCursor creation can currently cause OOM's in the browser. Adding lifetime tracing so that this situation is visible. R=cmumford BUG=690517 ========== to ========== [IndexedDB] Added IndexedDBCursor lifetime tracing IndexedDBCursor creation can currently cause OOM's in the browser. Adding lifetime tracing so that this situation is visible. R=cmumford BUG=690517 Review-Url: https://codereview.chromium.org/2745703002 Cr-Commit-Position: refs/heads/master@{#460608} Committed: https://chromium.googlesource.com/chromium/src/+/84f5e2800a49ce3de9f877ea842b... ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/84f5e2800a49ce3de9f877ea842b... |
