| 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 "use strict"; | 5 "use strict"; |
| 6 | 6 |
| 7 // If true, prints all messages sent and received by inspector. | 7 // If true, prints all messages sent and received by inspector. |
| 8 const printProtocolMessages = false; | 8 const printProtocolMessages = false; |
| 9 | 9 |
| 10 // The active wrapper instance. | 10 // The active wrapper instance. |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 execStateScopeType(type) { | 426 execStateScopeType(type) { |
| 427 switch (type) { | 427 switch (type) { |
| 428 case "global": return this.ScopeType.Global; | 428 case "global": return this.ScopeType.Global; |
| 429 case "local": return this.ScopeType.Local; | 429 case "local": return this.ScopeType.Local; |
| 430 case "with": return this.ScopeType.With; | 430 case "with": return this.ScopeType.With; |
| 431 case "closure": return this.ScopeType.Closure; | 431 case "closure": return this.ScopeType.Closure; |
| 432 case "catch": return this.ScopeType.Catch; | 432 case "catch": return this.ScopeType.Catch; |
| 433 case "block": return this.ScopeType.Block; | 433 case "block": return this.ScopeType.Block; |
| 434 case "script": return this.ScopeType.Script; | 434 case "script": return this.ScopeType.Script; |
| 435 case "eval": return this.ScopeType.Eval; | 435 case "eval": return this.ScopeType.Eval; |
| 436 case "module": return this.ScopeType.Module; |
| 436 default: %AbortJS("Unexpected scope type"); | 437 default: %AbortJS("Unexpected scope type"); |
| 437 } | 438 } |
| 438 } | 439 } |
| 439 | 440 |
| 440 execStateScopeObjectProperty(serialized_scope, prop) { | 441 execStateScopeObjectProperty(serialized_scope, prop) { |
| 441 let found = null; | 442 let found = null; |
| 442 for (let i = 0; i < serialized_scope.length; i++) { | 443 for (let i = 0; i < serialized_scope.length; i++) { |
| 443 const elem = serialized_scope[i]; | 444 const elem = serialized_scope[i]; |
| 444 if (elem.name == prop) { | 445 if (elem.name == prop) { |
| 445 found = elem; | 446 found = elem; |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 882 debug.instance = new DebugWrapper(); | 883 debug.instance = new DebugWrapper(); |
| 883 debug.instance.enable(); | 884 debug.instance.enable(); |
| 884 } | 885 } |
| 885 return debug.instance; | 886 return debug.instance; |
| 886 }}); | 887 }}); |
| 887 | 888 |
| 888 Object.defineProperty(debug, 'ScopeType', { get: function() { | 889 Object.defineProperty(debug, 'ScopeType', { get: function() { |
| 889 const instance = debug.Debug; | 890 const instance = debug.Debug; |
| 890 return instance.ScopeType; | 891 return instance.ScopeType; |
| 891 }}); | 892 }}); |
| OLD | NEW |