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

Issue 13887007: Introduce RawVarData and associated classes for serializing PP_Vars (Closed)

Created:
7 years, 8 months ago by raymes
Modified:
7 years, 8 months ago
CC:
chromium-reviews, yzshen1
Visibility:
Public.

Description

Introduce RawVarData and associated classes for serializing PP_Vars This provides a replacement for the inner class of SerializedVar for serializing a PP_Var. It achieves 2 purposes: 1) it refactors the design of SerializedVar::Inner which was growing increasingly messy (and was going to become nastier) 2) it provides support for serializing/deserializing dictionary and array PP_Vars. To serialize a PP_Var, first the transitive closure of that var is computed (all nodes referenced) and then each var in the transitive closure is written to the message. Some trickiness arises from the fact that a PP_Var can be either a primitive or a reference and references have to be maintained when transmitting over the wire. The comments in the header files provide a description of the approach in more detail. BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=194629

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : . #

Patch Set 4 : #

Total comments: 45

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : . #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Total comments: 2

Patch Set 11 : . #

Patch Set 12 : . #

Total comments: 18

Patch Set 13 : #

Total comments: 4

Patch Set 14 : #

Patch Set 15 : . #

Patch Set 16 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1202 lines, -8 lines) Patch
M ppapi/ppapi_ipc.gypi View 1 1 chunk +2 lines, -0 lines 0 comments Download
M ppapi/ppapi_tests.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A ppapi/proxy/raw_var_data.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +248 lines, -0 lines 0 comments Download
A ppapi/proxy/raw_var_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +609 lines, -0 lines 0 comments Download
A ppapi/proxy/raw_var_data_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +333 lines, -0 lines 0 comments Download
M ppapi/shared_impl/var_tracker.h View 1 2 chunks +4 lines, -4 lines 0 comments Download
M ppapi/shared_impl/var_tracker.cc View 1 2 chunks +5 lines, -4 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
raymes
I am still writing unittests for this but I have put it up so you ...
7 years, 8 months ago (2013-04-11 23:17:06 UTC) #1
dmichael (off chromium)
https://codereview.chromium.org/13887007/diff/7001/ppapi/proxy/raw_var_data.cc File ppapi/proxy/raw_var_data.cc (right): https://codereview.chromium.org/13887007/diff/7001/ppapi/proxy/raw_var_data.cc#newcode29 ppapi/proxy/raw_var_data.cc:29: const VarGraph* graph, Why not const&? https://codereview.chromium.org/13887007/diff/7001/ppapi/proxy/raw_var_data.cc#newcode54 ppapi/proxy/raw_var_data.cc:54: PP_Var ...
7 years, 8 months ago (2013-04-12 22:40:38 UTC) #2
dmichael (off chromium)
Forgot general comments: I'm not sure I totally understand what I'm looking at yet :-) ...
7 years, 8 months ago (2013-04-12 22:41:22 UTC) #3
raymes1
https://codereview.chromium.org/13887007/diff/7001/ppapi/proxy/raw_var_data.cc File ppapi/proxy/raw_var_data.cc (right): https://codereview.chromium.org/13887007/diff/7001/ppapi/proxy/raw_var_data.cc#newcode503 ppapi/proxy/raw_var_data.cc:503: data_.push_back(VarToReference(iter->get(), graph)); Sort of. The VarGraph gives you 2 ...
7 years, 8 months ago (2013-04-12 23:21:38 UTC) #4
raymes
> But it looks a lot like an adaption of structured clone to Pepper, except ...
7 years, 8 months ago (2013-04-12 23:34:20 UTC) #5
raymes
(btw both the previous responses basically address the same issue) On Fri, Apr 12, 2013 ...
7 years, 8 months ago (2013-04-12 23:39:20 UTC) #6
raymes
Thanks for taking a look! I had some thoughts over the weekend based on your ...
7 years, 8 months ago (2013-04-14 16:32:57 UTC) #7
raymes
Thanks for taking a look! I had some thoughts over the weekend based on your ...
7 years, 8 months ago (2013-04-14 16:32:58 UTC) #8
dmichael (off chromium)
This is looking pretty good, I like what you've done. Thanks! https://codereview.chromium.org/13887007/diff/7001/ppapi/proxy/raw_var_data.cc File ppapi/proxy/raw_var_data.cc (right): ...
7 years, 8 months ago (2013-04-15 17:40:04 UTC) #9
raymes1
Thanks. I've added tests and I think this is ready for a more detailed look ...
7 years, 8 months ago (2013-04-16 00:24:17 UTC) #10
dmichael (off chromium)
On Mon, Apr 15, 2013 at 6:24 PM, Raymes Khoury <raymes@google.com> wrote: > Thanks. I've ...
7 years, 8 months ago (2013-04-16 01:36:23 UTC) #11
dmichael (off chromium)
Looking good. Are you planning on using this in SerializedVar in this CL, or do ...
7 years, 8 months ago (2013-04-16 16:36:52 UTC) #12
raymes1
Thanks for the quick feedback! I am planning on doing the plumbing to SeializedVar in ...
7 years, 8 months ago (2013-04-16 18:27:19 UTC) #13
dmichael (off chromium)
lgtm https://codereview.chromium.org/13887007/diff/42001/ppapi/proxy/raw_var_data_unittest.cc File ppapi/proxy/raw_var_data_unittest.cc (right): https://codereview.chromium.org/13887007/diff/42001/ppapi/proxy/raw_var_data_unittest.cc#newcode71 ppapi/proxy/raw_var_data_unittest.cc:71: return expected.value.as_id == actual.value.as_id; On 2013/04/16 18:27:19, raymes1 ...
7 years, 8 months ago (2013-04-16 18:41:20 UTC) #14
raymes
Thanks! https://codereview.chromium.org/13887007/diff/56001/ppapi/proxy/raw_var_data_unittest.cc File ppapi/proxy/raw_var_data_unittest.cc (right): https://codereview.chromium.org/13887007/diff/56001/ppapi/proxy/raw_var_data_unittest.cc#newcode48 ppapi/proxy/raw_var_data_unittest.cc:48: // following reference cycles. Yes exactly :) This ...
7 years, 8 months ago (2013-04-16 20:34:19 UTC) #15
raymes
7 years, 8 months ago (2013-04-17 17:52:49 UTC) #16
Message was sent while issue was closed.
Committed patchset #16 manually as r194629 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698