|
Add Maplike<> utility mixin class for implementing maplike interfaces
This utility class inherits PairIterable<> and currently implements has()
and get() based on a single virtual getMapEntry() function that a sub-class
needs to implement. It takes care of the slight complication that get()
should return undefined if the requested key is not in the map, which is
somewhat impractical to implement (requires constructing a ScriptValue to
return.)
Update the maplike implementations MIDIPortMap and MediaKeyStatusMap to
inherit Maplike<> instead of its base-class PairIterable<>, and remove
their has()/get() implementations.
BUG= 432683
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=190113
Total comments: 6
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+67 lines, -70 lines) |
Patch |
|
A |
Source/core/dom/Maplike.h
|
View
|
|
1 chunk |
+37 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/modules/encryptedmedia/MediaKeyStatusMap.h
|
View
|
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
Source/modules/encryptedmedia/MediaKeyStatusMap.cpp
|
View
|
1
|
6 chunks |
+16 lines, -21 lines |
0 comments
|
Download
|
|
M |
Source/modules/encryptedmedia/MediaKeyStatusMap.idl
|
View
|
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
|
M |
Source/modules/webmidi/MIDIInputMap.h
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
|
M |
Source/modules/webmidi/MIDIInputMap.cpp
|
View
|
1
|
2 chunks |
+0 lines, -9 lines |
0 comments
|
Download
|
|
M |
Source/modules/webmidi/MIDIInputMap.idl
|
View
|
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/modules/webmidi/MIDIOutputMap.h
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
|
M |
Source/modules/webmidi/MIDIOutputMap.cpp
|
View
|
1
|
2 chunks |
+0 lines, -9 lines |
0 comments
|
Download
|
|
M |
Source/modules/webmidi/MIDIOutputMap.idl
|
View
|
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/modules/webmidi/MIDIPortMap.h
|
View
|
1
|
4 chunks |
+10 lines, -12 lines |
0 comments
|
Download
|
Total messages: 11 (3 generated)
|