New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 842022 link

Starred by 3 users

Issue metadata

Status: Verified
Owner:
Closed: Aug 16
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

WebView Support Lib presubmit checks

Project Member Reported by ntfschr@chromium.org, May 11 2018

Issue description

Tracking bug to add presubmit checks to webview support lib (chromium-side). Some initial ideas:

 - require that all InvocationHandlers be annotated with "/* NameOfRepresentedType */" (where this requirement makes sense)
 - disallow passing BoundaryInterfaces in methods on BoundaryInterfaces, require passing InvocationHandlers instead (see  issue 837820 )
 - require bare Objects to be annotated such as with InvocationHandlers (see http://crrev/c/1006960)

Gustav, do you have other ideas?

Docs on presumbit: https://www.chromium.org/developers/how-tos/depottools/presubmit-scripts
 
It might be useful to ensure that objects passed to BoundaryInterfaceReflectionUtil.createInvocationHandlerFor() are indeed BoundaryInterfaces. Or maybe we should just create an interface/class called BoundaryInterface and have all BoundaryInterfaces inherit from that (and define BoundaryInterfaceReflectionUtil.createInvocationHandlerFor(BoundaryInterface)).

Comment 2 Deleted

re comment #1 sounds good. I moved this to  issue 842329 , to keep this one focused on presubmit script checks.
Project Member

Comment 4 by bugdroid1@chromium.org, May 15 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/84dc11072482f1fcc60cff70026fbfe5f38b7df3

commit 84dc11072482f1fcc60cff70026fbfe5f38b7df3
Author: Nate Fischer <ntfschr@chromium.org>
Date: Tue May 15 19:59:47 2018

AW: presubmit check for annotated InvocationHandlers in support lib

This adds a presubmit check in the support library that all references
to InvocationHandlers should be annotated with the type they represent.

Annotations take the form of comments:

/* RetType */ InvocationHandler m(/* ParamType */ InvocationHandler p);

This intentionally skips import statements. The presubmit check is only
a warning, in case of false-positive.

Bug:  842022 
Test: git cl presubmit -f --upload
Change-Id: I298d488d14f4fe828b02f4ac062bba6d4b1e9ae8
Reviewed-on: https://chromium-review.googlesource.com/1059009
Reviewed-by: Richard Coles <torne@chromium.org>
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558817}
[add] https://crrev.com/84dc11072482f1fcc60cff70026fbfe5f38b7df3/android_webview/support_library/PRESUBMIT.py

Status: Verified (was: Assigned)
I don't have time to continue working on this.

Sign in to add a comment