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

Side by Side Diff: src/v8natives.js

Issue 572003: Added IsProperty() check to result in DefineOrRedefineAccessor - if no check ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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
« no previous file with comments | « src/runtime.cc ('k') | test/mjsunit/object-define-properties.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 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 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 var value = props[key]; 682 var value = props[key];
683 var desc = ToPropertyDescriptor(value); 683 var desc = ToPropertyDescriptor(value);
684 key_values.push(desc); 684 key_values.push(desc);
685 } 685 }
686 } 686 }
687 for (var i = 0; i < key_values.length; i += 2) { 687 for (var i = 0; i < key_values.length; i += 2) {
688 var key = key_values[i]; 688 var key = key_values[i];
689 var desc = key_values[i + 1]; 689 var desc = key_values[i + 1];
690 DefineOwnProperty(obj, key, desc, true); 690 DefineOwnProperty(obj, key, desc, true);
691 } 691 }
692 return obj;
692 } 693 }
693 694
694 695
695 %SetCode($Object, function(x) { 696 %SetCode($Object, function(x) {
696 if (%_IsConstructCall()) { 697 if (%_IsConstructCall()) {
697 if (x == null) return this; 698 if (x == null) return this;
698 return ToObject(x); 699 return ToObject(x);
699 } else { 700 } else {
700 if (x == null) return { }; 701 if (x == null) return { };
701 return ToObject(x); 702 return ToObject(x);
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 989
989 // ---------------------------------------------------------------------------- 990 // ----------------------------------------------------------------------------
990 991
991 function SetupFunction() { 992 function SetupFunction() {
992 InstallFunctions($Function.prototype, DONT_ENUM, $Array( 993 InstallFunctions($Function.prototype, DONT_ENUM, $Array(
993 "toString", FunctionToString 994 "toString", FunctionToString
994 )); 995 ));
995 } 996 }
996 997
997 SetupFunction(); 998 SetupFunction();
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | test/mjsunit/object-define-properties.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698