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

Unified Diff: tracing/tracing/value/value.html

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tracing/tracing/value/unit_test.html ('k') | tracing/tracing/value/value_set.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/value/value.html
diff --git a/tracing/tracing/value/value.html b/tracing/tracing/value/value.html
index 9b9c79052fbf3aec9dcf890388124925560fc129..01f293c23e7abf3354db027c62c0b4882b79f8fe 100644
--- a/tracing/tracing/value/value.html
+++ b/tracing/tracing/value/value.html
@@ -126,6 +126,16 @@ tr.exportTo('tr.v', function() {
NumericValue.prototype = {
__proto__: Value.prototype,
+ merge: function(other) {
+ if (!(other instanceof NumericValue))
+ throw new Error('Merging non-NumericValues is not supported');
+
+ var numeric = this.numeric.merge(other.numeric);
+ var result = new NumericValue(this.name, numeric);
+ // TODO(eakuefner): merge diagnostics?
+ return result;
+ },
+
asDictInto_: function(d) {
d.type = 'numeric';
d.numeric = this.numeric.asDict();
« no previous file with comments | « tracing/tracing/value/unit_test.html ('k') | tracing/tracing/value/value_set.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698