提交 cc470d1b 编写于 作者: R Richard Wilkes

Update to CEF 74.1.19+gb62bacf+chromium-74.0.3729.157

上级 9e633884
run:
deadline: 5m
tests: true
modules-download-mode: readonly
output:
format: colored-line-number
print-issued-lines: true
print-linter-name: true
linters-settings:
depguard:
list-type: blacklist
include-go-root: true
packages:
- log
- github.com/satori/go.uuid
errcheck:
check-type-assertions: true
check-blank: true
goconst:
min-len: 3
min-occurrences: 3
gocritic:
enabled-tags:
- diagnostic
- performance
- style
- opinionated
- experimental
disabled-checks:
- sloppyReassign
gofmt:
simplify: true
golint:
min-confidence: 0.8
govet:
check-shadowing: true
maligned:
suggest-new: true
misspell:
locale: US
prealloc:
simple: true
range-loops: true
for-loops: false
unused:
check-exported: false
linters:
disable-all: true
enable:
- deadcode
- depguard
- errcheck
- goconst
- gocritic
- gofmt
- goimports
- golint
- gosec
- gosimple
- govet
- ineffassign
- interfacer
- maligned
- misspell
- prealloc
- scopelint
- staticcheck
- structcheck
- unconvert
- unused
- varcheck
issues:
max-per-linter: 20
max-same-issues: 3
new: false
exclude-use-default: false
exclude:
- should call os.Exit to set exit code
- "G301: Expect directory permissions to be 0750 or less"
- "G302: Expect file permissions to be 0600 or less"
- "G304: Potential file inclusion via variable"
- "G104: Errors unhandled"
- "G204: Subprocess launched with variable"
......@@ -55,7 +55,7 @@ func (d *DeleteCookiesCallback) Base() *BaseRefCounted {
// OnComplete (on_complete)
// Method that will be called upon completion. |num_deleted| will be the
// number of cookies that were deleted or -1 if unknown.
// number of cookies that were deleted.
func (d *DeleteCookiesCallback) OnComplete(num_deleted int32) {
lookupDeleteCookiesCallbackProxy(d.Base()).OnComplete(d, num_deleted)
}
......
......@@ -30,7 +30,3 @@ func (d *MainArgs) toNative(native *C.cef_main_args_t) *C.cef_main_args_t {
*native = d.native
return native
}
func (d *MainArgs) fromNative(native *C.cef_main_args_t) {
d.native = *native
}
......@@ -21,7 +21,6 @@ import (
// void gocef_request_context_clear_certificate_exceptions(cef_request_context_t * self, cef_completion_callback_t * callback, void (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_completion_callback_t *)) { return callback__(self, callback); }
// void gocef_request_context_close_all_connections(cef_request_context_t * self, cef_completion_callback_t * callback, void (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_completion_callback_t *)) { return callback__(self, callback); }
// void gocef_request_context_resolve_host(cef_request_context_t * self, cef_string_t * origin, cef_resolve_callback_t * callback, void (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_string_t *, cef_resolve_callback_t *)) { return callback__(self, origin, callback); }
// cef_errorcode_t gocef_request_context_resolve_host_cached(cef_request_context_t * self, cef_string_t * origin, cef_string_list_t resolved_ips, cef_errorcode_t (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_string_t *, cef_string_list_t)) { return callback__(self, origin, resolved_ips); }
// void gocef_request_context_load_extension(cef_request_context_t * self, cef_string_t * root_directory, cef_dictionary_value_t * manifest, cef_extension_handler_t * handler, void (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_string_t *, cef_dictionary_value_t *, cef_extension_handler_t *)) { return callback__(self, root_directory, manifest, handler); }
// int gocef_request_context_did_load_extension(cef_request_context_t * self, cef_string_t * extension_id, int (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_string_t *)) { return callback__(self, extension_id); }
// int gocef_request_context_has_extension(cef_request_context_t * self, cef_string_t * extension_id, int (CEF_CALLBACK *callback__)(cef_request_context_t *, cef_string_t *)) { return callback__(self, extension_id); }
......@@ -252,20 +251,6 @@ func (d *RequestContext) ResolveHost(origin string, callback *ResolveCallback) {
C.gocef_request_context_resolve_host(d.toNative(), (*C.cef_string_t)(origin_), callback.toNative(), d.resolve_host)
}
// ResolveHostCached (resolve_host_cached)
// Attempts to resolve |origin| to a list of associated IP addresses using
// cached data. |resolved_ips| will be populated with the list of resolved IP
// addresses or NULL if no cached data is available. Returns ERR_NONE on
// success. This function must be called on the browser process IO thread.
func (d *RequestContext) ResolveHostCached(origin string, resolved_ips StringList) Errorcode {
origin_ := C.cef_string_userfree_alloc()
setCEFStr(origin, origin_)
defer func() {
C.cef_string_userfree_free(origin_)
}()
return Errorcode(C.gocef_request_context_resolve_host_cached(d.toNative(), (*C.cef_string_t)(origin_), C.cef_string_list_t(resolved_ips), d.resolve_host_cached))
}
// LoadExtension (load_extension)
// Load an extension.
//
......
......@@ -8,14 +8,6 @@ import (
"unsafe"
)
func newCEFStr(str string) *C.cef_string_t {
utf8str := C.CString(str)
cefstr := (*C.cef_string_t)(C.calloc(1, C.size_t(unsafe.Sizeof(C.cef_string_t{}))))
C.cef_string_from_utf8(utf8str, C.strlen(utf8str), cefstr)
C.free(unsafe.Pointer(utf8str))
return cefstr
}
func setCEFStr(str string, cefStr *C.cef_string_t) {
utf8str := C.CString(str)
C.cef_string_from_utf8(utf8str, C.strlen(utf8str), cefStr)
......
......@@ -6,13 +6,13 @@ github.com/pkg/term v0.0.0-20190109203006-aa71e9d9e942 h1:A7GG7zcGjl3jqAqGPmcNjd
github.com/pkg/term v0.0.0-20190109203006-aa71e9d9e942/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/richardwilkes/toolbox v1.5.0 h1:8HkK68pUD20ZYiSFUWing23bSPkJHuMTkR8TdUzoobA=
github.com/richardwilkes/toolbox v1.5.0/go.mod h1:BhrbXd529SOF8vK4ve7ABji9fvItLH7+5sVpnqVQCvs=
github.com/richardwilkes/toolbox v1.6.1 h1:mC97qYjledp68mpg9yiM25SXYJIjKuvt0s3s0pitmrY=
github.com/richardwilkes/toolbox v1.6.1/go.mod h1:/3ynfaWs6sEF5hZEN3ANCDLOvFwaWmHi1AnlmHmaAqM=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
golang.org/x/sys v0.0.0-20190322080309-f49334f85ddc h1:4gbWbmmPFp4ySWICouJl6emP0MyS31yy9SrTlAGFT+g=
golang.org/x/sys v0.0.0-20190322080309-f49334f85ddc/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190520201301-c432e742b0af h1:NXfmMfXz6JqGfG3ikSxcz2N93j6DgScr19Oo2uwFu88=
golang.org/x/sys v0.0.0-20190520201301-c432e742b0af/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
......
......@@ -62,7 +62,7 @@ type param struct {
func (f *field) processedCParams(in []string) []param {
params := make([]param, len(in))
for i, p := range in {
p = strings.Replace(p, "const ", "", -1)
p = strings.ReplaceAll(p, "const ", "")
if space := strings.Index(p, " "); space != -1 {
params[i] = param{
Type: p[:space],
......
......@@ -65,7 +65,7 @@ func cleanOutput() {
func examineCEFSource(headers []string) {
var err error
cmd := exec.Command("clang", clangArgs(headers)...)
cmd := exec.Command("clang", clangArgs(headers)...) //nolint:gosec
cmd.Dir, err = filepath.Abs(cefBaseDir)
jot.FatalIfErr(err)
stdout, err := cmd.StdoutPipe()
......
......@@ -74,11 +74,11 @@ func newCVar(name, typeInfo string, pos position) *variable {
}
if v.HadConst = strings.Contains(typeInfo, "const "); v.HadConst {
typeInfo = strings.Replace(typeInfo, "const ", "", -1)
typeInfo = strings.ReplaceAll(typeInfo, "const ", "")
}
typeInfo = strings.TrimSpace(typeInfo)
typeInfo = strings.TrimPrefix(typeInfo, "struct _")
typeInfo = strings.Replace(typeInfo, "long long", "longlong", -1)
typeInfo = strings.ReplaceAll(typeInfo, "long long", "longlong")
if v.Name == baseFieldName {
typeInfo += " *"
}
......
......@@ -9,7 +9,7 @@ import (
"github.com/richardwilkes/toolbox/cmdline"
)
const desiredCEFVersion = "73.1.12+gee4b49f+chromium-73.0.3683.75"
const desiredCEFVersion = "74.1.19+gb62bacf+chromium-74.0.3729.157"
func main() {
cmdline.CopyrightYears = "2018-2019"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册