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

Side by Side Diff: src/v8natives.js

Issue 2832029: Fix 15.2.3.4 es5conform test (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 5 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
« no previous file with comments | « no previous file | test/cctest/test-api.cc » ('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 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 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 if (namedInterceptorNames) { 675 if (namedInterceptorNames) {
676 propertyNames = propertyNames.concat(namedInterceptorNames); 676 propertyNames = propertyNames.concat(namedInterceptorNames);
677 } 677 }
678 } 678 }
679 679
680 // Property names are expected to be unique strings. 680 // Property names are expected to be unique strings.
681 var propertySet = {}; 681 var propertySet = {};
682 var j = 0; 682 var j = 0;
683 for (var i = 0; i < propertyNames.length; ++i) { 683 for (var i = 0; i < propertyNames.length; ++i) {
684 var name = ToString(propertyNames[i]); 684 var name = ToString(propertyNames[i]);
685 if (name in propertySet) 685 // We need to check for the exact property value since for intrinsic
686 // properties like toString if(propertySet["toString"]) will always
687 // succeed.
688 if (propertySet[name] === true)
686 continue; 689 continue;
687 propertySet[name] = true; 690 propertySet[name] = true;
688 propertyNames[j++] = name; 691 propertyNames[j++] = name;
689 } 692 }
690 propertyNames.length = j; 693 propertyNames.length = j;
691 694
692 return propertyNames; 695 return propertyNames;
693 } 696 }
694 697
695 698
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 1041
1039 // ---------------------------------------------------------------------------- 1042 // ----------------------------------------------------------------------------
1040 1043
1041 function SetupFunction() { 1044 function SetupFunction() {
1042 InstallFunctions($Function.prototype, DONT_ENUM, $Array( 1045 InstallFunctions($Function.prototype, DONT_ENUM, $Array(
1043 "toString", FunctionToString 1046 "toString", FunctionToString
1044 )); 1047 ));
1045 } 1048 }
1046 1049
1047 SetupFunction(); 1050 SetupFunction();
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698