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

Side by Side Diff: src/accessors.cc

Issue 10911095: Back port r12439 and r12442 to the 3.10 branch: (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.10/
Patch Set: Created 8 years, 3 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 | src/v8natives.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 if (caller == NULL) return isolate->heap()->null_value(); 748 if (caller == NULL) return isolate->heap()->null_value();
749 } while (caller->shared()->is_toplevel()); 749 } while (caller->shared()->is_toplevel());
750 750
751 // If caller is a built-in function and caller's caller is also built-in, 751 // If caller is a built-in function and caller's caller is also built-in,
752 // use that instead. 752 // use that instead.
753 JSFunction* potential_caller = caller; 753 JSFunction* potential_caller = caller;
754 while (potential_caller != NULL && potential_caller->IsBuiltin()) { 754 while (potential_caller != NULL && potential_caller->IsBuiltin()) {
755 caller = potential_caller; 755 caller = potential_caller;
756 potential_caller = it.next(); 756 potential_caller = it.next();
757 } 757 }
758 if (!caller->shared()->native() && potential_caller != NULL) {
759 caller = potential_caller;
760 }
758 // If caller is bound, return null. This is compatible with JSC, and 761 // If caller is bound, return null. This is compatible with JSC, and
759 // allows us to make bound functions use the strict function map 762 // allows us to make bound functions use the strict function map
760 // and its associated throwing caller and arguments. 763 // and its associated throwing caller and arguments.
761 if (caller->shared()->bound()) { 764 if (caller->shared()->bound()) {
762 return isolate->heap()->null_value(); 765 return isolate->heap()->null_value();
763 } 766 }
764 return CheckNonStrictCallerOrThrow(isolate, caller); 767 return CheckNonStrictCallerOrThrow(isolate, caller);
765 } 768 }
766 769
767 770
(...skipping 28 matching lines...) Expand all
796 } 799 }
797 800
798 801
799 const AccessorDescriptor Accessors::ObjectPrototype = { 802 const AccessorDescriptor Accessors::ObjectPrototype = {
800 ObjectGetPrototype, 803 ObjectGetPrototype,
801 ObjectSetPrototype, 804 ObjectSetPrototype,
802 0 805 0
803 }; 806 };
804 807
805 } } // namespace v8::internal 808 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698