Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Issue 2149933003: Pre-work for adding usage counter for chrome.loadtimes (Closed)

Created:
4 years, 5 months ago by panicker
Modified:
4 years, 4 months ago
Reviewers:
Bryan McQuade, adamk
CC:
Bryan McQuade, chromium-apps-reviews_chromium.org, chromium-reviews, extensions-reviews_chromium.org, jochen (gone - plz use gerrit), Toon Verwaest
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Pre-req for adding usage counter to chrome.loadtimes: Switch to SetAccessor, this adds a Getter where the Usage counter will be added subsequently. A side effect of SetAccessor is that it subtly changes the behavior: previously loadtimes data fields were mutable and persisted modifications that updated the value programmatically (from javascript). With this change, such modifications will not be persisted. We think this is fine -- as we cannot think of scenarios where it makes sense to modify the values returned by chrome.loadtimes. Moreover this is a necessary step to get usage counts and move the deprecation further. BUG=621512 Committed: https://crrev.com/99807eeee0d8426d239376d716cacba2a84cfddf Cr-Commit-Position: refs/heads/master@{#408226}

Patch Set 1 #

Total comments: 1

Patch Set 2 : use ObjectTemplate and SetNativeDataProperty #

Total comments: 3

Patch Set 3 : Switch to using SetAccessor #

Total comments: 1

Patch Set 4 : fix indentation #

Patch Set 5 : Add UseCounter for chrome.loadtimes deprecation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -1 line) Patch
M chrome/renderer/loadtimes_extension_bindings.cc View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/UseCounter.h View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.cpp View 1 2 3 4 1 chunk +45 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebLocalFrame.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (14 generated)
adamk
https://codereview.chromium.org/2149933003/diff/1/chrome/renderer/loadtimes_extension_bindings.cc File chrome/renderer/loadtimes_extension_bindings.cc (right): https://codereview.chromium.org/2149933003/diff/1/chrome/renderer/loadtimes_extension_bindings.cc#newcode112 chrome/renderer/loadtimes_extension_bindings.cc:112: v8::Local<v8::Object> param = v8::Local<v8::Object>::Cast(info.Data()); Object here is the wrong ...
4 years, 5 months ago (2016-07-14 22:09:04 UTC) #2
panicker
On 2016/07/14 22:09:04, adamk wrote: > https://codereview.chromium.org/2149933003/diff/1/chrome/renderer/loadtimes_extension_bindings.cc > File chrome/renderer/loadtimes_extension_bindings.cc (right): > > https://codereview.chromium.org/2149933003/diff/1/chrome/renderer/loadtimes_extension_bindings.cc#newcode112 > ...
4 years, 5 months ago (2016-07-14 23:17:02 UTC) #3
panicker
PTAL
4 years, 5 months ago (2016-07-14 23:23:39 UTC) #5
adamk
Shubhie, this looks good, except for the caching issue I talk about below. Adding a ...
4 years, 5 months ago (2016-07-14 23:48:56 UTC) #6
panicker
https://codereview.chromium.org/2149933003/diff/20001/chrome/renderer/loadtimes_extension_bindings.cc File chrome/renderer/loadtimes_extension_bindings.cc (right): https://codereview.chromium.org/2149933003/diff/20001/chrome/renderer/loadtimes_extension_bindings.cc#newcode278 chrome/renderer/loadtimes_extension_bindings.cc:278: args.GetReturnValue().Set(load_times_tpl->NewInstance()); On 2016/07/14 23:48:56, adamk wrote: > So the ...
4 years, 5 months ago (2016-07-15 00:32:25 UTC) #7
Bryan McQuade
https://codereview.chromium.org/2149933003/diff/20001/chrome/renderer/loadtimes_extension_bindings.cc File chrome/renderer/loadtimes_extension_bindings.cc (right): https://codereview.chromium.org/2149933003/diff/20001/chrome/renderer/loadtimes_extension_bindings.cc#newcode278 chrome/renderer/loadtimes_extension_bindings.cc:278: args.GetReturnValue().Set(load_times_tpl->NewInstance()); On 2016/07/15 at 00:32:25, Shubhie wrote: > On ...
4 years, 5 months ago (2016-07-18 18:33:56 UTC) #10
panicker
PTAL. Switched back to SetAccessor based on feedback from Adam (feasibility) and Bryan (okay to ...
4 years, 5 months ago (2016-07-19 23:45:20 UTC) #11
adamk
lgtm for v8 API usage, if you're OK with the "sets always fail" behavior. At ...
4 years, 5 months ago (2016-07-20 00:57:22 UTC) #12
panicker
On 2016/07/20 00:57:22, adamk wrote: > lgtm for v8 API usage, if you're OK with ...
4 years, 5 months ago (2016-07-20 01:05:07 UTC) #13
Bryan McQuade
lgtm
4 years, 4 months ago (2016-07-26 23:45:52 UTC) #14
Bryan McQuade
lgtm thanks!
4 years, 4 months ago (2016-07-26 23:45:59 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2149933003/60001
4 years, 4 months ago (2016-07-27 20:21:01 UTC) #23
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 4 months ago (2016-07-27 20:24:45 UTC) #26
commit-bot: I haz the power
4 years, 4 months ago (2016-07-27 20:26:21 UTC) #28
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/99807eeee0d8426d239376d716cacba2a84cfddf
Cr-Commit-Position: refs/heads/master@{#408226}

Powered by Google App Engine
This is Rietveld 408576698