[go: nahoru, domu]

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

Issue 23809016: [PPAPI] ResourceVar now reference counts its PP_Resource in the plugin. (Closed)

Created:
7 years, 3 months ago by Matt Giuca
Modified:
7 years, 3 months ago
CC:
chromium-reviews, yzshen1
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

[PPAPI] ResourceVar now reference counts its Resource in the plugin. ResourceVar is now an abstract base class with subclasses HostResourceVar and PluginResourceVar. The PluginResourceVar has a reference counted Resource instead of a PP_Resource. VarTracker has MakeResourceVar and MakeResourcePPVar methods, to abstract over the creation of a resource var of the correct subclass. Also, the creation_message is now NULL when empty, instead of being an empty message object. BUG=290713 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=224717

Patch Set 1 #

Patch Set 2 : Use a ScopedPPResource instead of PP_Resource. #

Total comments: 22

Patch Set 3 : Respond to reviews. #

Patch Set 4 : Moved HostResourceVar and PluginResourceVar to new files. #

Patch Set 5 : Includes. #

Patch Set 6 : VarTracker: Added MakeResourceVar method that creates a ResourceVar on either the host or plugin. #

Patch Set 7 : Rebase. #

Patch Set 8 : PluginResourceVar now holds a direct reference to the Resource, not a PPResource. #

Patch Set 9 : Rebase. #

Patch Set 10 : Minor cleanup. #

Patch Set 11 : Fix Windows compile. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+230 lines, -58 lines) Patch
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
A content/renderer/pepper/host_resource_var.h View 1 2 3 4 5 6 7 8 9 1 chunk +53 lines, -0 lines 0 comments Download
A content/renderer/pepper/host_resource_var.cc View 1 2 3 1 chunk +32 lines, -0 lines 0 comments Download
M content/renderer/pepper/host_var_tracker.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/pepper/host_var_tracker.cc View 1 2 3 4 5 2 chunks +5 lines, -0 lines 0 comments Download
M ppapi/ppapi_proxy.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
A ppapi/proxy/plugin_resource_var.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +39 lines, -0 lines 0 comments Download
A ppapi/proxy/plugin_resource_var.cc View 1 2 3 4 5 6 7 1 chunk +20 lines, -0 lines 0 comments Download
M ppapi/proxy/plugin_var_tracker.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/proxy/plugin_var_tracker.cc View 1 2 3 4 5 6 7 2 chunks +11 lines, -0 lines 0 comments Download
M ppapi/shared_impl/resource_var.h View 1 2 3 4 5 6 7 8 9 2 chunks +18 lines, -30 lines 0 comments Download
M ppapi/shared_impl/resource_var.cc View 1 2 3 2 chunks +6 lines, -12 lines 0 comments Download
M ppapi/shared_impl/test_globals.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M ppapi/shared_impl/unittest_utils.cc View 1 2 3 4 3 chunks +18 lines, -14 lines 0 comments Download
M ppapi/shared_impl/var.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M ppapi/shared_impl/var_tracker.h View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
M ppapi/shared_impl/var_tracker.cc View 1 2 3 4 5 2 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
Matt Giuca
Hi, I have implemented the split PluginResourceVar and HostResourceVar as discussed today. The Plugin one ...
7 years, 3 months ago (2013-09-13 07:40:32 UTC) #1
dmichael (off chromium)
https://codereview.chromium.org/23809016/diff/3001/ppapi/shared_impl/resource_var.h File ppapi/shared_impl/resource_var.h (right): https://codereview.chromium.org/23809016/diff/3001/ppapi/shared_impl/resource_var.h#newcode45 ppapi/shared_impl/resource_var.h:45: ResourceVar(); you also need to define a virtual destructor. ...
7 years, 3 months ago (2013-09-13 17:29:03 UTC) #2
raymes
https://codereview.chromium.org/23809016/diff/3001/ppapi/shared_impl/resource_var.h File ppapi/shared_impl/resource_var.h (right): https://codereview.chromium.org/23809016/diff/3001/ppapi/shared_impl/resource_var.h#newcode51 ppapi/shared_impl/resource_var.h:51: // Represents a resource Var, usable on the host ...
7 years, 3 months ago (2013-09-13 17:41:33 UTC) #3
Matt Giuca
https://codereview.chromium.org/23809016/diff/3001/ppapi/shared_impl/unittest_utils.cc File ppapi/shared_impl/unittest_utils.cc (right): https://codereview.chromium.org/23809016/diff/3001/ppapi/shared_impl/unittest_utils.cc#newcode190 ppapi/shared_impl/unittest_utils.cc:190: (expected_message.flags() & 0xffffff00) | See my response there: https://codereview.chromium.org/18599005/diff/74013/ppapi/shared_impl/unittest_utils.cc#newcode182
7 years, 3 months ago (2013-09-13 21:23:11 UTC) #4
dmichael (off chromium)
https://codereview.chromium.org/23809016/diff/3001/ppapi/shared_impl/unittest_utils.cc File ppapi/shared_impl/unittest_utils.cc (right): https://codereview.chromium.org/23809016/diff/3001/ppapi/shared_impl/unittest_utils.cc#newcode190 ppapi/shared_impl/unittest_utils.cc:190: (expected_message.flags() & 0xffffff00) | On 2013/09/13 21:23:11, Matt Giuca ...
7 years, 3 months ago (2013-09-13 22:54:44 UTC) #5
Matt Giuca
Responded to all notes except for big moves. https://codereview.chromium.org/23809016/diff/3001/ppapi/shared_impl/resource_var.h File ppapi/shared_impl/resource_var.h (right): https://codereview.chromium.org/23809016/diff/3001/ppapi/shared_impl/resource_var.h#newcode45 ppapi/shared_impl/resource_var.h:45: ResourceVar(); ...
7 years, 3 months ago (2013-09-17 00:24:52 UTC) #6
Matt Giuca
jochen: Added for content/content_renderer.gypi OWNERS. https://codereview.chromium.org/23809016/diff/3001/ppapi/shared_impl/resource_var.h File ppapi/shared_impl/resource_var.h (right): https://codereview.chromium.org/23809016/diff/3001/ppapi/shared_impl/resource_var.h#newcode53 ppapi/shared_impl/resource_var.h:53: class PPAPI_SHARED_EXPORT HostResourceVar : ...
7 years, 3 months ago (2013-09-17 01:26:28 UTC) #7
jochen (gone - plz use gerrit)
lgtm
7 years, 3 months ago (2013-09-17 08:35:42 UTC) #8
dmichael (off chromium)
> So I'm wondering about what happens in the (I would imagine, common) case where ...
7 years, 3 months ago (2013-09-17 20:39:00 UTC) #9
dmichael (off chromium)
On 2013/09/17 20:39:00, dmichael wrote: > > So I'm wondering about what happens in the ...
7 years, 3 months ago (2013-09-17 20:40:04 UTC) #10
Matt Giuca
> Everywhere else where we return a PP_Resource, we increment the reference count, > passing ...
7 years, 3 months ago (2013-09-18 00:53:39 UTC) #11
Matt Giuca
I have just added some more code in Patch Set 6. I realised (working on ...
7 years, 3 months ago (2013-09-18 04:27:56 UTC) #12
dmichael (off chromium)
On 2013/09/18 00:53:39, Matt Giuca wrote: > > Everywhere else where we return a PP_Resource, ...
7 years, 3 months ago (2013-09-18 17:26:57 UTC) #13
Matt Giuca
On 2013/09/18 17:26:57, dmichael wrote: > On 2013/09/18 00:53:39, Matt Giuca wrote: > > > ...
7 years, 3 months ago (2013-09-19 00:09:59 UTC) #14
dmichael (off chromium)
On Wed, Sep 18, 2013 at 6:09 PM, <mgiuca@chromium.org> wrote: > On 2013/09/18 17:26:57, dmichael ...
7 years, 3 months ago (2013-09-19 00:26:31 UTC) #15
raymes
lgtm
7 years, 3 months ago (2013-09-19 00:49:40 UTC) #16
Matt Giuca
On 2013/09/19 00:26:31, dmichael wrote: > Oh, good point. If you need GetPPResource on the ...
7 years, 3 months ago (2013-09-19 01:06:08 UTC) #17
dmichael (off chromium)
On Wed, Sep 18, 2013 at 7:06 PM, <mgiuca@chromium.org> wrote: > On 2013/09/19 00:26:31, dmichael ...
7 years, 3 months ago (2013-09-19 16:25:57 UTC) #18
Matt Giuca
On 2013/09/19 16:25:57, dmichael wrote: > > If we use scoped_refptr, we're ensuring that it ...
7 years, 3 months ago (2013-09-20 00:16:07 UTC) #19
Matt Giuca
OK I have changed it so it uses scoped_refptr<Resource>. Please have a look. I decided ...
7 years, 3 months ago (2013-09-20 09:15:17 UTC) #20
dmichael (off chromium)
lgtm I thought about it some more, and I think there is a good reason ...
7 years, 3 months ago (2013-09-20 21:23:58 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mgiuca@chromium.org/23809016/93001
7 years, 3 months ago (2013-09-23 05:06:23 UTC) #22
commit-bot: I haz the power
Retried try job too often on win7_aura for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win7_aura&number=81717
7 years, 3 months ago (2013-09-23 07:52:33 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mgiuca@chromium.org/23809016/93001
7 years, 3 months ago (2013-09-23 11:01:24 UTC) #24
commit-bot: I haz the power
7 years, 3 months ago (2013-09-23 15:09:23 UTC) #25
Message was sent while issue was closed.
Change committed as 224717

Powered by Google App Engine
This is Rietveld 408576698