| OLD | NEW | 
|---|
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 var hashes = new Set(["1C6D2E82E4E4F1BA4CB5762843D429DC872EBA18", | 5 var hashes = new Set(["1C6D2E82E4E4F1BA4CB5762843D429DC872EBA18", | 
| 6                       "EBF1ECD351E7A3294CB5762843D429DC872EBA18", | 6                       "EBF1ECD351E7A3294CB5762843D429DC872EBA18", | 
| 7                       "86A31E7131896CF01BA837945C2894385F369F24"]); | 7                       "86A31E7131896CF01BA837945C2894385F369F24"]); | 
| 8 InspectorTest.sendCommandOrDie("Debugger.enable", {}, function() { | 8 Protocol.Debugger.enable(); | 
| 9   InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject) | 9 Protocol.Debugger.onScriptParsed(function(messageObject) | 
| 10   { | 10 { | 
| 11     if (hashes.has(messageObject.params.hash)) | 11   if (hashes.has(messageObject.params.hash)) | 
| 12       InspectorTest.log(`Hash received: ${messageObject.params.hash}`); | 12     InspectorTest.log(`Hash received: ${messageObject.params.hash}`); | 
| 13     else | 13   else | 
| 14       InspectorTest.log(`[FAIL]: unknown hash ${messageObject.params.hash}`); | 14     InspectorTest.log(`[FAIL]: unknown hash ${messageObject.params.hash}`); | 
| 15   } |  | 
| 16 }); | 15 }); | 
| 17 | 16 | 
| 18 function longScript() { | 17 function longScript() { | 
| 19   var longScript = "var b = 1;"; | 18   var longScript = "var b = 1;"; | 
| 20   for (var i = 0; i < 2024; ++i) | 19   for (var i = 0; i < 2024; ++i) | 
| 21     longScript += "++b;"; | 20     longScript += "++b;"; | 
| 22 } | 21 } | 
| 23 | 22 | 
| 24 InspectorTest.sendCommandOrDie("Runtime.enable"); | 23 Protocol.Runtime.enable(); | 
| 25 InspectorTest.sendCommandOrDie("Runtime.compileScript", { expression: "1", sourc
    eURL: "foo1.js", persistScript: true }); | 24 Protocol.Runtime.compileScript({ expression: "1", sourceURL: "foo1.js", persistS
    cript: true }); | 
| 26 InspectorTest.sendCommandOrDie("Runtime.compileScript", { expression: "239", sou
    rceURL: "foo2.js", persistScript: true }); | 25 Protocol.Runtime.compileScript({ expression: "239", sourceURL: "foo2.js", persis
    tScript: true }); | 
| 27 InspectorTest.sendCommandOrDie("Runtime.compileScript", { expression: "(" + long
    Script + ")()", sourceURL: "foo3.js", persistScript: true }, step2); | 26 Protocol.Runtime.compileScript({ expression: "(" + longScript + ")()", sourceURL
    : "foo3.js", persistScript: true }).then(step2); | 
| 28 | 27 | 
| 29 function step2() | 28 function step2() | 
| 30 { | 29 { | 
| 31   InspectorTest.completeTest(); | 30   InspectorTest.completeTest(); | 
| 32 } | 31 } | 
| OLD | NEW | 
|---|