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

Issue 9235003: Enhance the PPAPI enter tracking. (Closed)

Created:
8 years, 11 months ago by brettw
Modified:
8 years, 11 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Enhance the PPAPI enter tracking. The goal here is to be able to add thread checking to the enter functions, which will require more types of failure than just "bad resource". I folded completion callback force executing into this, which also simplifies the thunks a bit. If we like this method, I'll convert the rest and delete MayForceCallback. I converted URLLoader and Graphics2D to use this. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=118951

Patch Set 1 #

Total comments: 6

Patch Set 2 : Fix build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+184 lines, -46 lines) Patch
M ppapi/thunk/enter.h View 1 3 chunks +73 lines, -10 lines 0 comments Download
M ppapi/thunk/enter.cc View 1 1 chunk +77 lines, -1 line 0 comments Download
M ppapi/thunk/ppb_graphics_2d_thunk.cc View 1 4 chunks +11 lines, -10 lines 0 comments Download
M ppapi/thunk/ppb_url_loader_thunk.cc View 4 chunks +23 lines, -25 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
brettw
Lemme know what you think, this was kind of an experiment.
8 years, 11 months ago (2012-01-23 06:18:46 UTC) #1
dmichael (off chromium)
8 years, 11 months ago (2012-01-24 01:05:11 UTC) #2
lgtm

I like it, just have some nits.

http://codereview.chromium.org/9235003/diff/1/ppapi/thunk/enter.cc
File ppapi/thunk/enter.cc (right):

http://codereview.chromium.org/9235003/diff/1/ppapi/thunk/enter.cc#newcode1
ppapi/thunk/enter.cc:1: // Copyright (c) 2011 The Chromium Authors. All rights
reserved.
nit: 2012 (probably elsewhere too)

http://codereview.chromium.org/9235003/diff/1/ppapi/thunk/enter.cc#newcode7
ppapi/thunk/enter.cc:7: #include "base/bind.H"
nit: H->h

http://codereview.chromium.org/9235003/diff/1/ppapi/thunk/enter.cc#newcode77
ppapi/thunk/enter.cc:77: void EnterBase::ValidateResource(PP_Resource /*
pp_resource */,
Suggestion: This doesn't do much actual validation; possibly something like
"ReportIfFailed" or something might be a better name.

http://codereview.chromium.org/9235003/diff/1/ppapi/thunk/enter.cc#newcode80
ppapi/thunk/enter.cc:80: bool /* report_error */) {
This has nothing to do with this CL, but I would love for that bool to change in
to an enum, so the call-sites are more self-documenting. Esp. since writing a
thunk & API for an interface is usually a copy/paste affair.

http://codereview.chromium.org/9235003/diff/1/ppapi/thunk/enter.h
File ppapi/thunk/enter.h (right):

http://codereview.chromium.org/9235003/diff/1/ppapi/thunk/enter.h#newcode87
ppapi/thunk/enter.h:87: // Helper function to return a Resource from a
PP_Resource. Having this
nit: copy/paste mistake; it's not a Resource

http://codereview.chromium.org/9235003/diff/1/ppapi/thunk/ppb_graphics_2d_thu...
File ppapi/thunk/ppb_graphics_2d_thunk.cc (right):

http://codereview.chromium.org/9235003/diff/1/ppapi/thunk/ppb_graphics_2d_thu...
ppapi/thunk/ppb_graphics_2d_thunk.cc:76: EnterGraphics2D enter(graphics_2d,
true);
I think you meant to pass the callback here?

Powered by Google App Engine
This is Rietveld 408576698