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

Side by Side Diff: src/mirror-delay.js

Issue 271053: Check that constructor is a FunctionMirror before calling .name() (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 2 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
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 result[i] = MakeMirror(result[i]); 757 result[i] = MakeMirror(result[i]);
758 } 758 }
759 759
760 return result; 760 return result;
761 }; 761 };
762 762
763 763
764 ObjectMirror.prototype.toText = function() { 764 ObjectMirror.prototype.toText = function() {
765 var name; 765 var name;
766 var ctor = this.constructorFunction(); 766 var ctor = this.constructorFunction();
767 if (ctor.isUndefined()) { 767 if (!ctor.isFunction()) {
768 name = this.className(); 768 name = this.className();
769 } else { 769 } else {
770 name = ctor.name(); 770 name = ctor.name();
771 if (!name) { 771 if (!name) {
772 name = this.className(); 772 name = this.className();
773 } 773 }
774 } 774 }
775 return '#<' + builtins.GetInstanceName(name) + '>'; 775 return '#<' + builtins.GetInstanceName(name) + '>';
776 }; 776 };
777 777
(...skipping 1490 matching lines...) Expand 10 before | Expand all | Expand 10 after
2268 } 2268 }
2269 if (!isFinite(value)) { 2269 if (!isFinite(value)) {
2270 if (value > 0) { 2270 if (value > 0) {
2271 return 'Infinity'; 2271 return 'Infinity';
2272 } else { 2272 } else {
2273 return '-Infinity'; 2273 return '-Infinity';
2274 } 2274 }
2275 } 2275 }
2276 return value; 2276 return value;
2277 } 2277 }
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/debug-evaluate-bool-constructor.js » ('j') | test/mjsunit/debug-evaluate-bool-constructor.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698