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

Issue 1839933002: Ensure we don't leak ObjectProxy objects

Created:
4 years, 8 months ago by raymes
Modified:
4 years, 8 months ago
Reviewers:
piman
CC:
chromium-reviews, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, jam, darin-cc_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Ensure we don't leak ObjectProxy objects Previously, if an instance was destroyed before a plugin object had a chance to be destroyed, it would be leaked. Now we always attempt to deallocate the object if the instance is destroyed prior to the object. BUG=594926 Committed: https://crrev.com/0868033af81c965c393c4ca6d9ac1fc81001f593 Cr-Commit-Position: refs/heads/master@{#384148}

Patch Set 1 #

Total comments: 3

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -0 lines) Patch
M content/renderer/pepper/plugin_object.cc View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 30 (13 generated)
raymes
Attempt #2. I ran lsan on this one to make sure.
4 years, 8 months ago (2016-03-29 06:46:04 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1839933002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1839933002/1
4 years, 8 months ago (2016-03-29 06:46:38 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_chromium_compile_only_ng/builds/112886)
4 years, 8 months ago (2016-03-29 06:59:44 UTC) #6
piman
https://codereview.chromium.org/1839933002/diff/1/content/renderer/pepper/plugin_object.cc File content/renderer/pepper/plugin_object.cc (right): https://codereview.chromium.org/1839933002/diff/1/content/renderer/pepper/plugin_object.cc#newcode52 content/renderer/pepper/plugin_object.cc:52: ppp_class_->Deallocate(ppp_class_data_); So, in theory, we are not supposed to ...
4 years, 8 months ago (2016-03-29 18:28:52 UTC) #7
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1839933002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1839933002/20001
4 years, 8 months ago (2016-03-30 02:27:47 UTC) #9
raymes
That's a better idea and also fixes the bug :)
4 years, 8 months ago (2016-03-30 02:27:58 UTC) #10
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-03-30 03:38:40 UTC) #13
piman
lgtm
4 years, 8 months ago (2016-03-30 19:16:04 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1839933002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1839933002/20001
4 years, 8 months ago (2016-03-30 23:50:51 UTC) #16
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 8 months ago (2016-03-31 00:03:56 UTC) #18
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/0868033af81c965c393c4ca6d9ac1fc81001f593 Cr-Commit-Position: refs/heads/master@{#384148}
4 years, 8 months ago (2016-03-31 00:06:23 UTC) #20
Nico
A revert of this CL (patchset #2 id:20001) has been created in https://codereview.chromium.org/1834223009/ by thakis@chromium.org. ...
4 years, 8 months ago (2016-03-31 01:51:20 UTC) #21
raymes
Hmm, yeah there's a comment there: // A scriptable object that should cause a crash ...
4 years, 8 months ago (2016-03-31 02:00:21 UTC) #22
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1839933002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1839933002/40001
4 years, 8 months ago (2016-04-04 04:04:25 UTC) #25
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/181358)
4 years, 8 months ago (2016-04-04 04:14:08 UTC) #27
raymes
https://codereview.chromium.org/1839933002/diff/1/ppapi/proxy/ppp_class_proxy.cc File ppapi/proxy/ppp_class_proxy.cc (left): https://codereview.chromium.org/1839933002/diff/1/ppapi/proxy/ppp_class_proxy.cc#oldcode223 ppapi/proxy/ppp_class_proxy.cc:223: ppp_class, class_data); piman: how about tracking these objects, either ...
4 years, 8 months ago (2016-04-05 07:48:46 UTC) #29
piman
4 years, 8 months ago (2016-04-06 00:14:59 UTC) #30
On Tue, Apr 5, 2016 at 12:48 AM, <raymes@chromium.org> wrote:

>
>
>
https://codereview.chromium.org/1839933002/diff/1/ppapi/proxy/ppp_class_proxy.cc
> File ppapi/proxy/ppp_class_proxy.cc (left):
>
>
>
https://codereview.chromium.org/1839933002/diff/1/ppapi/proxy/ppp_class_proxy...
> ppapi/proxy/ppp_class_proxy.cc:223: ppp_class, class_data);
> piman: how about tracking these objects, either in a static std::map
> that lives in this file or in HostVarTracker. They would be cleaned up
> on instance deletion.
>
> A more hacky but easier alternative would be to just delete the pointer
> in PluginObject. We know for sure that it was always allocated here. I
> think this code could probably be unwound to pass this object directly
> into PluginObject and manage the lifetime there but it would be a lot of
> work.
>

Thinking about it, I don't think I agree with the premise of the test - we
should not leak objects, especially in the renderer. If the problem is that
the objects can try to reenter PPAPI from their destructor, I would prefer
disabling the interfaces (i.e. all calls fail) so that no bad things can
happen?


> https://codereview.chromium.org/1839933002/
>

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698