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

Side by Side Diff: src/accessors.cc

Issue 10912118: Back port r12439 and r12442 to the 3.8 branch: (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.8/
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 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 if (caller == NULL) return isolate->heap()->null_value(); 758 if (caller == NULL) return isolate->heap()->null_value();
759 } while (caller->shared()->is_toplevel()); 759 } while (caller->shared()->is_toplevel());
760 760
761 // If caller is a built-in function and caller's caller is also built-in, 761 // If caller is a built-in function and caller's caller is also built-in,
762 // use that instead. 762 // use that instead.
763 JSFunction* potential_caller = caller; 763 JSFunction* potential_caller = caller;
764 while (potential_caller != NULL && potential_caller->IsBuiltin()) { 764 while (potential_caller != NULL && potential_caller->IsBuiltin()) {
765 caller = potential_caller; 765 caller = potential_caller;
766 potential_caller = it.next(); 766 potential_caller = it.next();
767 } 767 }
768 if (!caller->shared()->native() && potential_caller != NULL) {
769 caller = potential_caller;
770 }
768 // If caller is bound, return null. This is compatible with JSC, and 771 // If caller is bound, return null. This is compatible with JSC, and
769 // allows us to make bound functions use the strict function map 772 // allows us to make bound functions use the strict function map
770 // and its associated throwing caller and arguments. 773 // and its associated throwing caller and arguments.
771 if (caller->shared()->bound()) { 774 if (caller->shared()->bound()) {
772 return isolate->heap()->null_value(); 775 return isolate->heap()->null_value();
773 } 776 }
774 return CheckNonStrictCallerOrThrow(isolate, caller); 777 return CheckNonStrictCallerOrThrow(isolate, caller);
775 } 778 }
776 779
777 780
(...skipping 28 matching lines...) Expand all
806 } 809 }
807 810
808 811
809 const AccessorDescriptor Accessors::ObjectPrototype = { 812 const AccessorDescriptor Accessors::ObjectPrototype = {
810 ObjectGetPrototype, 813 ObjectGetPrototype,
811 ObjectSetPrototype, 814 ObjectSetPrototype,
812 0 815 0
813 }; 816 };
814 817
815 } } // namespace v8::internal 818 } } // 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