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

Side by Side Diff: src/runtime.cc

Issue 8962: Fixing propertyIsEnumerable for properties that are *both* enumerable and rea... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 1 month 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 1916 matching lines...) Expand 10 before | Expand all | Expand 10 after
1927 1927
1928 CONVERT_CHECKED(JSObject, object, args[0]); 1928 CONVERT_CHECKED(JSObject, object, args[0]);
1929 CONVERT_CHECKED(String, key, args[1]); 1929 CONVERT_CHECKED(String, key, args[1]);
1930 1930
1931 uint32_t index; 1931 uint32_t index;
1932 if (key->AsArrayIndex(&index)) { 1932 if (key->AsArrayIndex(&index)) {
1933 return Heap::ToBoolean(object->HasElement(index)); 1933 return Heap::ToBoolean(object->HasElement(index));
1934 } 1934 }
1935 1935
1936 PropertyAttributes att = object->GetLocalPropertyAttribute(key); 1936 PropertyAttributes att = object->GetLocalPropertyAttribute(key);
1937 return Heap::ToBoolean(att != ABSENT && att != DONT_ENUM); 1937 return Heap::ToBoolean(att != ABSENT && (att & DONT_ENUM) == 0);
1938 } 1938 }
1939 1939
1940 1940
1941 static Object* Runtime_GetPropertyNames(Arguments args) { 1941 static Object* Runtime_GetPropertyNames(Arguments args) {
1942 HandleScope scope; 1942 HandleScope scope;
1943 ASSERT(args.length() == 1); 1943 ASSERT(args.length() == 1);
1944 1944
1945 CONVERT_CHECKED(JSObject, raw_object, args[0]); 1945 CONVERT_CHECKED(JSObject, raw_object, args[0]);
1946 Handle<JSObject> object(raw_object); 1946 Handle<JSObject> object(raw_object);
1947 return *GetKeysFor(object); 1947 return *GetKeysFor(object);
(...skipping 3855 matching lines...) Expand 10 before | Expand all | Expand 10 after
5803 } else { 5803 } else {
5804 // Handle last resort GC and make sure to allow future allocations 5804 // Handle last resort GC and make sure to allow future allocations
5805 // to grow the heap without causing GCs (if possible). 5805 // to grow the heap without causing GCs (if possible).
5806 Counters::gc_last_resort_from_js.Increment(); 5806 Counters::gc_last_resort_from_js.Increment();
5807 Heap::CollectAllGarbage(); 5807 Heap::CollectAllGarbage();
5808 } 5808 }
5809 } 5809 }
5810 5810
5811 5811
5812 } } // namespace v8::internal 5812 } } // namespace v8::internal
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