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

Side by Side Diff: src/runtime.cc

Issue 6450003: Make sure that we do not call is_extensible on the global proxy.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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 | « no previous file | test/mjsunit/regress/regress-1120.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 return *desc; 877 return *desc;
878 } 878 }
879 879
880 880
881 static MaybeObject* Runtime_PreventExtensions(Arguments args) { 881 static MaybeObject* Runtime_PreventExtensions(Arguments args) {
882 ASSERT(args.length() == 1); 882 ASSERT(args.length() == 1);
883 CONVERT_CHECKED(JSObject, obj, args[0]); 883 CONVERT_CHECKED(JSObject, obj, args[0]);
884 return obj->PreventExtensions(); 884 return obj->PreventExtensions();
885 } 885 }
886 886
887
887 static MaybeObject* Runtime_IsExtensible(Arguments args) { 888 static MaybeObject* Runtime_IsExtensible(Arguments args) {
888 ASSERT(args.length() == 1); 889 ASSERT(args.length() == 1);
889 CONVERT_CHECKED(JSObject, obj, args[0]); 890 CONVERT_CHECKED(JSObject, obj, args[0]);
890 return obj->map()->is_extensible() ? Heap::true_value() 891 if (obj->IsJSGlobalProxy()) {
892 Object* proto = obj->GetPrototype();
893 if (proto->IsNull()) return Heap::false_value();
894 ASSERT(proto->IsJSGlobalObject());
895 obj = JSObject::cast(proto);
896 }
897 return obj->map()->is_extensible() ? Heap::true_value()
891 : Heap::false_value(); 898 : Heap::false_value();
892 } 899 }
893 900
894 901
895 static MaybeObject* Runtime_RegExpCompile(Arguments args) { 902 static MaybeObject* Runtime_RegExpCompile(Arguments args) {
896 HandleScope scope; 903 HandleScope scope;
897 ASSERT(args.length() == 3); 904 ASSERT(args.length() == 3);
898 CONVERT_ARG_CHECKED(JSRegExp, re, 0); 905 CONVERT_ARG_CHECKED(JSRegExp, re, 0);
899 CONVERT_ARG_CHECKED(String, pattern, 1); 906 CONVERT_ARG_CHECKED(String, pattern, 1);
900 CONVERT_ARG_CHECKED(String, flags, 2); 907 CONVERT_ARG_CHECKED(String, flags, 2);
(...skipping 10166 matching lines...) Expand 10 before | Expand all | Expand 10 after
11067 } else { 11074 } else {
11068 // Handle last resort GC and make sure to allow future allocations 11075 // Handle last resort GC and make sure to allow future allocations
11069 // to grow the heap without causing GCs (if possible). 11076 // to grow the heap without causing GCs (if possible).
11070 Counters::gc_last_resort_from_js.Increment(); 11077 Counters::gc_last_resort_from_js.Increment();
11071 Heap::CollectAllGarbage(false); 11078 Heap::CollectAllGarbage(false);
11072 } 11079 }
11073 } 11080 }
11074 11081
11075 11082
11076 } } // namespace v8::internal 11083 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-1120.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698