diff options
author | primiano <primiano@chromium.org> | 2016-02-29 12:46:05 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-29 20:47:30 +0000 |
commit | cb1afb351f2232e22b4be9bbbe7c0449decee471 (patch) | |
tree | 0a6e1671a22625cb1de12949ff3776e055ee3cb5 /extensions/browser/api | |
parent | 11ea3850f60af63a8c917d9798bef890f5daa9f2 (diff) | |
download | chromium_src-cb1afb351f2232e22b4be9bbbe7c0449decee471.zip chromium_src-cb1afb351f2232e22b4be9bbbe7c0449decee471.tar.gz chromium_src-cb1afb351f2232e22b4be9bbbe7c0449decee471.tar.bz2 |
tracing: Make ConvertableToTraceFormat move-only
Summary. This CL:
- Makes TraceEvent ownership a move-only scoped_ptr.
- Makes ConvertableToTraceFormat (CTTF) itself move-only scoped_ptr.
- Updates all the codebase that uses CTTF in TRACE_EVENT macros
to use move-only semantics.
Background:
Historically ConvertableToTraceFormat (CTTF) was RefCounted. The main
reason seems to be supporting monitoring mode (now deprecated) where
tracing needed to copy TraceEvents without flushing the TraceLog.
Not what monitoring mode is gone, there is no reason why TraceEvent(s)
should not be move-only.
Unfortunately CTTF being RefCounted exposed that implementation detail
to its public interface. Fortunately, most of the codebase doesn't care
about the fact that CTTF is RefCounted.
The only exceptions are:
1. Memory-infra heap profiler {StackFrame,TypeInfo}Deduplicator
2. cc::Layer DebugInfo
1) Is addressed creating a proxy class which delegates the CTTF methods
to the duplicators inside MDSessionState. Essentially it makes
the CTTF metadata events shared co-owners of the MDSessionState.
2) After an offline chat with danakj@, it seems OK to make DebugInfo(s)
moved scoped_ptr (as opposite as copied), moving the ownership to the
active layer and keeping a raw ptr into the pending layer.
BUG=559117
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
TBR=thakis,jochen,tbarzic,mnaganov,skyostil
Review URL: https://codereview.chromium.org/1717283003
Cr-Commit-Position: refs/heads/master@{#378263}
Diffstat (limited to 'extensions/browser/api')
-rw-r--r-- | extensions/browser/api/printer_provider_internal/printer_provider_internal_api.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/extensions/browser/api/printer_provider_internal/printer_provider_internal_api.h b/extensions/browser/api/printer_provider_internal/printer_provider_internal_api.h index a842d6a..472cf19 100644 --- a/extensions/browser/api/printer_provider_internal/printer_provider_internal_api.h +++ b/extensions/browser/api/printer_provider_internal/printer_provider_internal_api.h @@ -17,6 +17,7 @@ namespace base { class DictionaryValue; class ListValue; +class RefCountedMemory; } namespace content { |