Use >>> instead of >> in order to cover the full 32 bit range when
authorerik.corry@gmail.com <erik.corry@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 16 Jun 2009 15:01:24 +0000 (15:01 +0000)
committererik.corry@gmail.com <erik.corry@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 16 Jun 2009 15:01:24 +0000 (15:01 +0000)
handling addresses.
Review URL: http://codereview.chromium.org/125187

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

tools/codemap.js

index 3766db04815d4559088db6f786ca345f0b15634f..d6df7fa9699347b305dbee298798a65a323505a1 100644 (file)
@@ -126,7 +126,7 @@ devtools.profiler.CodeMap.prototype.addStaticCode = function(
 devtools.profiler.CodeMap.prototype.markPages_ = function(start, end) {
   for (var addr = start; addr <= end;
        addr += devtools.profiler.CodeMap.PAGE_SIZE) {
-    this.pages_[addr >> devtools.profiler.CodeMap.PAGE_ALIGNMENT] = 1;
+    this.pages_[addr >>> devtools.profiler.CodeMap.PAGE_ALIGNMENT] = 1;
   }
 };
 
@@ -155,7 +155,7 @@ devtools.profiler.CodeMap.prototype.findInTree_ = function(tree, addr) {
  * @param {number} addr Address.
  */
 devtools.profiler.CodeMap.prototype.findEntry = function(addr) {
-  var pageAddr = addr >> devtools.profiler.CodeMap.PAGE_ALIGNMENT;
+  var pageAddr = addr >>> devtools.profiler.CodeMap.PAGE_ALIGNMENT;
   if (pageAddr in this.pages_) {
     return this.findInTree_(this.statics_, addr);
   }