Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: net/data/proxy_resolver_v8_unittest/exception_findproxyforurl_during_resolve.js

Issue 950433002: Fix a crash when processing an invalid PAC script. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add copyright to test data (placate presubmit) Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // This PAC script will throw an exception when accessing the "FindProxyForURL"
6 // the *second* time it is accessed.
7
8 function actualFindProxyForURL(url, host) {
9 return "DIRECT";
10 }
11
12 var counter = 2;
13
14 function FindProxyForURLGetter() {
15 counter--;
16 if (counter <= 0)
17 throw "crash!";
18 return actualFindProxyForURL;
19 }
20
21 Object.defineProperty(this, "FindProxyForURL", {get: FindProxyForURLGetter});
OLDNEW
« no previous file with comments | « net/data/proxy_resolver_v8_unittest/exception_findproxyforurl_during_init.js ('k') | net/proxy/proxy_resolver_v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698