| 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 let {session, contextGroup, Protocol} = InspectorTest.start('Tests that destroyi
ng context from inside of console.log does not crash'); |
| 6 |
| 5 const expression = ` | 7 const expression = ` |
| 6 Object.defineProperty(Object.prototype, 'RemoteObject', { | 8 Object.defineProperty(Object.prototype, 'RemoteObject', { |
| 7 configurable: true, | 9 configurable: true, |
| 8 set(v) { | 10 set(v) { |
| 9 console.log("Should never be called"); | 11 console.log("Should never be called"); |
| 10 delete Object.prototype.RemoteObject; | 12 delete Object.prototype.RemoteObject; |
| 11 this.RemoteObject = v; | 13 this.RemoteObject = v; |
| 12 | 14 |
| 13 inspector.fireContextDestroyed(); | 15 inspector.fireContextDestroyed(); |
| 14 setTimeout(function() { | 16 setTimeout(function() { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 31 | 33 |
| 32 Protocol.Runtime.enable(); | 34 Protocol.Runtime.enable(); |
| 33 Protocol.Runtime.evaluate({ expression: expression }); | 35 Protocol.Runtime.evaluate({ expression: expression }); |
| 34 | 36 |
| 35 Protocol.Runtime.onConsoleAPICalled(function(result) { | 37 Protocol.Runtime.onConsoleAPICalled(function(result) { |
| 36 InspectorTest.logObject(result.params.args[0]); | 38 InspectorTest.logObject(result.params.args[0]); |
| 37 if (result.params.args[0].value == "End of test") { | 39 if (result.params.args[0].value == "End of test") { |
| 38 InspectorTest.completeTest(); | 40 InspectorTest.completeTest(); |
| 39 } | 41 } |
| 40 }); | 42 }); |
| OLD | NEW |