Revision: 9028
Author: [email protected]
Date: Fri Aug 26 06:23:25 2011
Log: Only count uniquely named native scripts for debug.
The debugger exposes all native script which might include duplicates
having the same name. This is triggered by debug-script in stress mode
on the gc branch.
[email protected]
BUG=v8:1641
TEST=mjsunit/debug-script
Review URL: http://codereview.chromium.org/7740050
http://code.google.com/p/v8/source/detail?r=9028
Modified:
/branches/bleeding_edge/test/mjsunit/debug-script.js
=======================================
--- /branches/bleeding_edge/test/mjsunit/debug-script.js Tue Dec 7
03:01:02 2010
+++ /branches/bleeding_edge/test/mjsunit/debug-script.js Fri Aug 26
06:23:25 2011
@@ -34,13 +34,19 @@
// Count script types.
var named_native_count = 0;
+var named_native_names = {};
var extension_count = 0;
var normal_count = 0;
var scripts = Debug.scripts();
for (i = 0; i < scripts.length; i++) {
if (scripts[i].type == Debug.ScriptType.Native) {
if (scripts[i].name) {
- named_native_count++;
+ // TODO(1641): Remove check for equally named native scripts once the
+ // underlying issue is fixed.
+ if (!named_native_names[scripts[i].name]) {
+ named_native_names[scripts[i].name] = true;
+ named_native_count++;
+ }
}
} else if (scripts[i].type == Debug.ScriptType.Extension) {
extension_count++;
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev