Revision: 21737
Author:   [email protected]
Date:     Tue Jun 10 09:42:41 2014 UTC
Log:      Do not clear mirror cache when fetching loaded scripts.

[email protected]
BUG=376534
LOG=N

Review URL: https://codereview.chromium.org/309313002
http://code.google.com/p/v8/source/detail?r=21737

Modified:
 /branches/bleeding_edge/src/debug-debugger.js
 /branches/bleeding_edge/src/mirror-debugger.js
 /branches/bleeding_edge/test/mjsunit/debug-mirror-cache.js
 /branches/bleeding_edge/tools/generate-runtime-tests.py

=======================================
--- /branches/bleeding_edge/src/debug-debugger.js Mon May 26 07:05:56 2014 UTC +++ /branches/bleeding_edge/src/debug-debugger.js Tue Jun 10 09:42:41 2014 UTC
@@ -484,12 +484,6 @@
   }
   return result;
 }
-
-
-function GetLoadedScripts() {
-  ClearMirrorCache();  // The mirror cache may be holding onto scripts.
-  return %DebugGetLoadedScripts();
-}


 Debug.setListener = function(listener, opt_data) {
@@ -921,7 +915,7 @@
 // scanning the heap.
 Debug.scripts = function() {
   // Collect all scripts in the heap.
-  return GetLoadedScripts();
+  return %DebugGetLoadedScripts();
 };


@@ -2250,7 +2244,7 @@
   }

   // Collect all scripts in the heap.
-  var scripts = GetLoadedScripts();
+  var scripts = %DebugGetLoadedScripts();

   response.body = [];

@@ -2322,7 +2316,7 @@
   var script_id = request.arguments.script_id;
   var preview_only = !!request.arguments.preview_only;

-  var scripts = GetLoadedScripts();
+  var scripts = %DebugGetLoadedScripts();

   var the_script = null;
   for (var i = 0; i < scripts.length; i++) {
=======================================
--- /branches/bleeding_edge/src/mirror-debugger.js Tue Jun 3 14:27:19 2014 UTC +++ /branches/bleeding_edge/src/mirror-debugger.js Tue Jun 10 09:42:41 2014 UTC
@@ -16,15 +16,6 @@
   next_handle_ = 0;
   mirror_cache_ = [];
 }
-
-
-/**
- * Clear the mirror handle cache.
- */
-function ClearMirrorCache() {
-  next_handle_ = 0;
-  mirror_cache_ = [];
-}


 // Wrapper to check whether an object is a Promise.  The call may not work
=======================================
--- /branches/bleeding_edge/test/mjsunit/debug-mirror-cache.js Fri Nov 22 13:50:39 2013 UTC +++ /branches/bleeding_edge/test/mjsunit/debug-mirror-cache.js Tue Jun 10 09:42:41 2014 UTC
@@ -62,6 +62,9 @@
     json = '{"seq":0,"type":"request","command":"backtrace"}'
     dcp.processDebugJSONRequest(json);

+    // Make sure looking up loaded scripts does not clear the cache.
+    Debug.scripts();
+
     // Some mirrors where cached.
     assertFalse(debug.next_handle_ == 0, "Mirror cache not used");
     assertFalse(debug.mirror_cache_.length == 0, "Mirror cache not used");
=======================================
--- /branches/bleeding_edge/tools/generate-runtime-tests.py Tue Jun 3 14:27:19 2014 UTC +++ /branches/bleeding_edge/tools/generate-runtime-tests.py Tue Jun 10 09:42:41 2014 UTC
@@ -51,7 +51,7 @@
 EXPECTED_FUZZABLE_COUNT = 325
 EXPECTED_CCTEST_COUNT = 6
 EXPECTED_UNKNOWN_COUNT = 5
-EXPECTED_BUILTINS_COUNT = 798
+EXPECTED_BUILTINS_COUNT = 796


 # Don't call these at all.

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to