blob: 08d928919076f9f9b9203a690548d89cb14696f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
function FindProxyForURL(url, host) {
if (host != 'hang')
return 'PROXY ' + host + ':88';
var ip = dnsResolve("host1");
// The following may or may not be executed, even if dnsResolve() terminates
// the script execution.
dnsResolveEx("host2");
dnsResolveEx("host3");
alert("hahaha");
// Hang!
for (;;) {}
// The following definitely won't be executed, since control should never
// make it past the preceding hang.
dnsResolve("host4");
dnsResolve("host5");
alert("uhm...");
throw "not reached";
}
|