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

Issue 2718133003: Rewrite extensions console to not leak function templates. (Closed)

Created:
3 years, 9 months ago by jbroman
Modified:
3 years, 9 months ago
Reviewers:
Devlin
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, extensions-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Rewrite extensions console to not leak function templates. With this CL, an ObjectTemplate is properly cached in the PerIsolateData, and the templates for each function are only constructed once. For simplicity, the level is stored in the function data (rather than a function), which removes the need to have those functions out-of-line and should reduce both code and V8 heap size (since small integers don't need a heap allocation). BUG=696748 Review-Url: https://codereview.chromium.org/2718133003 Cr-Commit-Position: refs/heads/master@{#453399} Committed: https://chromium.googlesource.com/chromium/src/+/b1ad11a47382c78676e8bc71a6201d47309a6b23

Patch Set 1 #

Patch Set 2 : revert needless variable name change #

Patch Set 3 : . #

Total comments: 4

Patch Set 4 : devlin #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -70 lines) Patch
M extensions/renderer/console.h View 1 2 3 1 chunk +3 lines, -8 lines 0 comments Download
M extensions/renderer/console.cc View 1 2 3 4 chunks +35 lines, -57 lines 0 comments Download
M extensions/renderer/module_system.cc View 1 2 3 2 chunks +5 lines, -3 lines 0 comments Download
M extensions/renderer/object_backed_native_handler.cc View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 22 (17 generated)
jbroman
Noticed this leak after you mentioned that this file existed on another CL. This version ...
3 years, 9 months ago (2017-02-27 22:09:24 UTC) #11
Devlin
lgtm; thanks! https://codereview.chromium.org/2718133003/diff/40001/extensions/renderer/console.cc File extensions/renderer/console.cc (right): https://codereview.chromium.org/2718133003/diff/40001/extensions/renderer/console.cc#newcode57 extensions/renderer/console.cc:57: script_context ? script_context->GetRenderFrame() : nullptr; I think ...
3 years, 9 months ago (2017-02-27 22:32:12 UTC) #12
jbroman
https://codereview.chromium.org/2718133003/diff/40001/extensions/renderer/console.cc File extensions/renderer/console.cc (right): https://codereview.chromium.org/2718133003/diff/40001/extensions/renderer/console.cc#newcode57 extensions/renderer/console.cc:57: script_context ? script_context->GetRenderFrame() : nullptr; On 2017/02/27 at 22:32:12, ...
3 years, 9 months ago (2017-02-27 22:52:49 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/2718133003/60001
3 years, 9 months ago (2017-02-27 22:55:02 UTC) #19
commit-bot: I haz the power
3 years, 9 months ago (2017-02-28 00:00:07 UTC) #22
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/b1ad11a47382c78676e8bc71a620...

Powered by Google App Engine
This is Rietveld 408576698