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

Side by Side Diff: test/mjsunit/stack-traces.js

Issue 1556333002: [runtime] Migrate several Date builtins to C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments Created 4 years, 11 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/runtime/runtime-object.cc ('k') | test/mjsunit/stack-traces-2.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 testUnintendedCallerCensorship(); 290 testUnintendedCallerCensorship();
291 testErrorsDuringFormatting(); 291 testErrorsDuringFormatting();
292 292
293 testTraceNativeConversion(String); // Does ToString on argument. 293 testTraceNativeConversion(String); // Does ToString on argument.
294 testTraceNativeConversion(Number); // Does ToNumber on argument. 294 testTraceNativeConversion(Number); // Does ToNumber on argument.
295 testTraceNativeConversion(RegExp); // Does ToString on argument. 295 testTraceNativeConversion(RegExp); // Does ToString on argument.
296 296
297 testTraceNativeConstructor(String); // Does ToString on argument. 297 testTraceNativeConstructor(String); // Does ToString on argument.
298 testTraceNativeConstructor(Number); // Does ToNumber on argument. 298 testTraceNativeConstructor(Number); // Does ToNumber on argument.
299 testTraceNativeConstructor(RegExp); // Does ToString on argument. 299 testTraceNativeConstructor(RegExp); // Does ToString on argument.
300 testTraceNativeConstructor(Date); // Does ToNumber on argument.
301 300
302 // Omitted because QuickSort has builtins object as receiver, and is non-native 301 // Omitted because QuickSort has builtins object as receiver, and is non-native
303 // builtin. 302 // builtin.
304 testOmittedBuiltin(function(){ [thrower, 2].sort(function (a,b) { 303 testOmittedBuiltin(function(){ [thrower, 2].sort(function (a,b) {
305 (b < a) - (a < b); }); 304 (b < a) - (a < b); });
306 }, "QuickSort"); 305 }, "QuickSort");
307 306
308 // Omitted because ADD from runtime.js is non-native builtin. 307 // Omitted because ADD from runtime.js is non-native builtin.
309 testOmittedBuiltin(function(){ thrower + 2; }, "ADD"); 308 testOmittedBuiltin(function(){ thrower + 2; }, "ADD");
310 309
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 361
363 my_error = {}; 362 my_error = {};
364 Object.preventExtensions(my_error); 363 Object.preventExtensions(my_error);
365 assertThrows(function() { Error.captureStackTrace(my_error); }); 364 assertThrows(function() { Error.captureStackTrace(my_error); });
366 365
367 var fake_error = {}; 366 var fake_error = {};
368 my_error = new Error(); 367 my_error = new Error();
369 var stolen_getter = Object.getOwnPropertyDescriptor(my_error, 'stack').get; 368 var stolen_getter = Object.getOwnPropertyDescriptor(my_error, 'stack').get;
370 Object.defineProperty(fake_error, 'stack', { get: stolen_getter }); 369 Object.defineProperty(fake_error, 'stack', { get: stolen_getter });
371 assertEquals(undefined, fake_error.stack); 370 assertEquals(undefined, fake_error.stack);
OLDNEW
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | test/mjsunit/stack-traces-2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698