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

Side by Side Diff: test/mjsunit/mirror-error.js

Issue 6287041: Avoid callbacks to user code during error formatting in a couple of (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | Annotate | Revision Log
« src/array.js ('K') | « test/cctest/test-api.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
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 for (var i in fromJSON.properties) { 69 for (var i in fromJSON.properties) {
70 var p = fromJSON.properties[i]; 70 var p = fromJSON.properties[i];
71 print(p.name); 71 print(p.name);
72 if (p.name == 'message') { 72 if (p.name == 'message') {
73 assertEquals(e.message, refs.lookup(p.ref).value); 73 assertEquals(e.message, refs.lookup(p.ref).value);
74 found_message = true; 74 found_message = true;
75 } 75 }
76 } 76 }
77 assertTrue(found_message, 'Property message not found'); 77 assertTrue(found_message, 'Property message not found');
78 } 78 }
79 79
80 // Check the formatted text (regress 1231579). 80 // Check the formatted text (regress 1231579).
81 assertEquals(fromJSON.text, e.toString(), 'toString'); 81 assertEquals(fromJSON.text, e.toString(), 'toString');
82 } 82 }
83 83
84 84
85 // Test Date values. 85 // Test Date values.
86 testErrorMirror(new Error()); 86 testErrorMirror(new Error());
87 testErrorMirror(new Error('This does not work')); 87 testErrorMirror(new Error('This does not work'));
88 testErrorMirror(new Error(123+456)); 88 testErrorMirror(new Error(123+456));
89 testErrorMirror(new EvalError('EvalError')); 89 testErrorMirror(new EvalError('EvalError'));
90 testErrorMirror(new RangeError('RangeError')); 90 testErrorMirror(new RangeError('RangeError'));
91 testErrorMirror(new ReferenceError('ReferenceError')); 91 testErrorMirror(new ReferenceError('ReferenceError'));
92 testErrorMirror(new SyntaxError('SyntaxError')); 92 testErrorMirror(new SyntaxError('SyntaxError'));
93 testErrorMirror(new TypeError('TypeError')); 93 testErrorMirror(new TypeError('TypeError'));
94 testErrorMirror(new URIError('URIError')); 94 testErrorMirror(new URIError('URIError'));
OLDNEW
« src/array.js ('K') | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698