Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // This PAC script will throw an exception when accessing the "FindProxyForURL" | |
| 2 // the *second* time it is accessed. | |
| 3 | |
| 4 function actualFindProxyForURL(url, host) { | |
| 5 return "DIRECT"; | |
| 6 } | |
| 7 | |
| 8 var counter = 2; | |
| 9 | |
| 10 function FindProxyForURLGetter() { | |
|
mmenke
2015/02/20 22:15:05
nit: f should be lowercase, I believe.
| |
| 11 counter--; | |
| 12 if (counter <= 0) | |
| 13 throw "crash!"; | |
| 14 return actualFindProxyForURL; | |
| 15 } | |
| 16 | |
| 17 Object.defineProperty(this, "FindProxyForURL", {get: FindProxyForURLGetter}); | |
| OLD | NEW |