Title: [142661] branches/chromium/1364
- Revision
- 142661
- Author
- pfeld...@chromium.org
- Date
- 2013-02-12 13:15:42 -0800 (Tue, 12 Feb 2013)
Log Message
Merge 142128
> Web Inspector: [Regression] Map.size() returns negative values.
> https://bugs.webkit.org/show_bug.cgi?id=109174
>
> Reviewed by Yury Semikhatsky.
>
> Source/WebCore:
>
> * inspector/front-end/utilities.js:
>
> LayoutTests:
>
> * inspector/map-expected.txt:
> * inspector/map.html:
>
TBR=vse...@chromium.org
Review URL: https://codereview.chromium.org/12208136
Modified Paths
Diff
Modified: branches/chromium/1364/LayoutTests/inspector/map-expected.txt (142660 => 142661)
--- branches/chromium/1364/LayoutTests/inspector/map-expected.txt 2013-02-12 21:07:11 UTC (rev 142660)
+++ branches/chromium/1364/LayoutTests/inspector/map-expected.txt 2013-02-12 21:15:42 UTC (rev 142661)
@@ -5,96 +5,120 @@
First map:
key1 : undefined
key2 : undefined
+ size : 0
Second map:
key1 : undefined
key2 : undefined
+ size : 0
Dumping maps:
First map:
key1 : 2
key2 : undefined
+ size : 1
Second map:
key1 : undefined
key2 : undefined
+ size : 0
Dumping maps:
First map:
key1 : 1
key2 : undefined
+ size : 1
Second map:
key1 : undefined
key2 : undefined
+ size : 0
Dumping maps:
First map:
key1 : 1
key2 : undefined
+ size : 1
Second map:
key1 : 1
key2 : undefined
+ size : 1
Dumping maps:
First map:
key1 : 1
key2 : undefined
+ size : 1
Second map:
key1 : 2
key2 : undefined
+ size : 1
Dumping maps:
First map:
key1 : 1
key2 : 2
+ size : 2
Second map:
key1 : 2
key2 : undefined
+ size : 1
Dumping maps:
First map:
key1 : 1
key2 : 2
+ size : 2
Second map:
key1 : 2
key2 : 1
+ size : 2
Dumping maps:
First map:
key1 : 1
key2 : undefined
+ size : 1
Second map:
key1 : 2
key2 : 1
+ size : 2
Dumping maps:
First map:
key1 : 1
key2 : undefined
+ size : 1
Second map:
key1 : 2
key2 : undefined
+ size : 1
Dumping maps:
First map:
key1 : 1
key2 : undefined
+ size : 1
Second map:
key1 : 2
key2 : undefined
+ size : 1
Dumping maps:
First map:
key1 : undefined
key2 : undefined
+ size : 0
Second map:
key1 : 2
key2 : undefined
+ size : 1
Dumping maps:
First map:
key1 : undefined
key2 : undefined
+ size : 0
Second map:
key1 : undefined
key2 : undefined
+ size : 0
Modified: branches/chromium/1364/LayoutTests/inspector/map.html (142660 => 142661)
--- branches/chromium/1364/LayoutTests/inspector/map.html 2013-02-12 21:07:11 UTC (rev 142660)
+++ branches/chromium/1364/LayoutTests/inspector/map.html 2013-02-12 21:15:42 UTC (rev 142661)
@@ -11,9 +11,11 @@
InspectorTest.addResult(" First map:");
InspectorTest.addResult(" key1 : " + map1.get(key1));
InspectorTest.addResult(" key2 : " + map1.get(key2));
+ InspectorTest.addResult(" size : " + map1.size());
InspectorTest.addResult(" Second map:");
InspectorTest.addResult(" key1 : " + map2.get(key1));
InspectorTest.addResult(" key2 : " + map2.get(key2));
+ InspectorTest.addResult(" size : " + map2.size());
InspectorTest.addResult("");
}
Modified: branches/chromium/1364/Source/WebCore/inspector/front-end/utilities.js (142660 => 142661)
--- branches/chromium/1364/Source/WebCore/inspector/front-end/utilities.js 2013-02-12 21:07:11 UTC (rev 142660)
+++ branches/chromium/1364/Source/WebCore/inspector/front-end/utilities.js 2013-02-12 21:15:42 UTC (rev 142661)
@@ -705,9 +705,11 @@
remove: function(key)
{
var result = this._map[key.__identifier];
+ if (!result)
+ return undefined;
+ --this._size;
delete this._map[key.__identifier];
- --this._size;
- return result ? result[1] : undefined;
+ return result[1];
},
/**
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes