| OLD | NEW |
| 1 function prototypeChain(global) { | 1 function prototypeChain(global) { |
| 2 let result = []; | 2 let result = []; |
| 3 while (global !== null) { | 3 while (global !== null) { |
| 4 let thrown = false; | 4 let thrown = false; |
| 5 let next = global.__proto__; | 5 let next = global.__proto__; |
| 6 try { | 6 try { |
| 7 global.__proto__ = {}; | 7 global.__proto__ = {}; |
| 8 result.push('mutable'); | 8 result.push('mutable'); |
| 9 } catch (e) { | 9 } catch (e) { |
| 10 result.push('immutable'); | 10 result.push('immutable'); |
| 11 } | 11 } |
| 12 global = next; | 12 global = next; |
| 13 } | 13 } |
| 14 return result; | 14 return result; |
| 15 } | 15 } |
| 16 | 16 |
| 17 self.onmessage = function(e) { | 17 self.onmessage = function(e) { |
| 18 e.data.postMessage(prototypeChain(self)); | 18 e.data.postMessage(prototypeChain(self)); |
| 19 }; | 19 }; |
| OLD | NEW |