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

Side by Side Diff: test/mjsunit/regress/regress-709029.js

Issue 2807153002: [regexp] Avoid side effects between map load and fast path check (Closed)
Patch Set: Created 3 years, 8 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/builtins/builtins-regexp-gen.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 // Changes the map of obj.
6 function mutateObjectOnStringConversion(obj) {
7 return { toString: () => { obj.x = 42;return "";}};
8 }
9
10 {
11 const re = /./;
12 re.exec(mutateObjectOnStringConversion(re));
13 }
14
15 {
16 const re = /./;
17 re.test(mutateObjectOnStringConversion(re));
18 }
19
20 {
21 const re = /./;
22 re[Symbol.match](mutateObjectOnStringConversion(re));
23 }
24
25 {
26 const re = /./;
27 re[Symbol.search](mutateObjectOnStringConversion(re));
28 }
29
30 {
31 const re = /./;
32 re[Symbol.split](mutateObjectOnStringConversion(re));
33 }
34
35 {
36 const re = /./;
37 re[Symbol.replace](mutateObjectOnStringConversion(re));
38 }
OLDNEW
« no previous file with comments | « src/builtins/builtins-regexp-gen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698