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

Side by Side Diff: test/debugger/debug/debug-evaluate-no-side-effect-builtins.js

Issue 2663803002: [string] Migrate String.prototype.{split,replace} to TF (Closed)
Patch Set: Remove debug-evaluate whitelisting Created 3 years, 10 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
« no previous file with comments | « src/v8.gyp ('k') | test/mjsunit/string-replace.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 the V8 project authors. All rights reserved. 1 // Copyright 2017 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 // Flags: --ignition --side-effect-free-debug-evaluate 5 // Flags: --ignition --side-effect-free-debug-evaluate
6 6
7 Debug = debug.Debug 7 Debug = debug.Debug
8 8
9 var exception = null; 9 var exception = null;
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 for (f of Object.getOwnPropertyNames(String.prototype)) { 46 for (f of Object.getOwnPropertyNames(String.prototype)) {
47 if (typeof String.prototype[f] === "function") { 47 if (typeof String.prototype[f] === "function") {
48 // Do not expect locale-specific or regexp-related functions to work. 48 // Do not expect locale-specific or regexp-related functions to work.
49 // {Lower,Upper}Case (Locale-specific or not) do not work either. 49 // {Lower,Upper}Case (Locale-specific or not) do not work either.
50 if (f.indexOf("locale") >= 0) continue; 50 if (f.indexOf("locale") >= 0) continue;
51 if (f.indexOf("Lower") >= 0) continue; 51 if (f.indexOf("Lower") >= 0) continue;
52 if (f.indexOf("Upper") >= 0) continue; 52 if (f.indexOf("Upper") >= 0) continue;
53 if (f == "normalize") continue; 53 if (f == "normalize") continue;
54 if (f == "match") continue; 54 if (f == "match") continue;
55 if (f == "search") continue; 55 if (f == "search") continue;
56 if (f == "split") continue; 56 if (f == "split" || f == "replace") {
57 fail(`'abcd'.${f}(2)`);
58 continue;
59 }
57 success("abcd"[f](2), `"abcd".${f}(2);`); 60 success("abcd"[f](2), `"abcd".${f}(2);`);
58 } 61 }
59 } 62 }
60 fail("'abCd'.toLowerCase()"); 63 fail("'abCd'.toLowerCase()");
61 fail("'abcd'.toUpperCase()"); 64 fail("'abcd'.toUpperCase()");
62 fail("'abCd'.toLocaleLowerCase()"); 65 fail("'abCd'.toLocaleLowerCase()");
63 fail("'abcd'.toLocaleUpperCase()"); 66 fail("'abcd'.toLocaleUpperCase()");
64 fail("'abcd'.match(/a/)"); 67 fail("'abcd'.match(/a/)");
65 fail("'abcd'.replace(/a/)"); 68 fail("'abcd'.replace(/a/)");
66 fail("'abcd'.search(/a/)"); 69 fail("'abcd'.search(/a/)");
(...skipping 10 matching lines...) Expand all
77 // Add the debug event listener. 80 // Add the debug event listener.
78 Debug.setListener(listener); 81 Debug.setListener(listener);
79 82
80 function f() { 83 function f() {
81 debugger; 84 debugger;
82 }; 85 };
83 86
84 f(); 87 f();
85 88
86 assertNull(exception); 89 assertNull(exception);
OLDNEW
« no previous file with comments | « src/v8.gyp ('k') | test/mjsunit/string-replace.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698