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

Side by Side Diff: src/ia32/stub-cache-ia32.cc

Issue 377004: Fixed problem where popping a handle scope after calling an accessor (Closed)
Patch Set: Created 11 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
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 __ add(Operand(eax), Immediate(5 * kPointerSize)); 797 __ add(Operand(eax), Immediate(5 * kPointerSize));
798 __ mov(ebx, esp); 798 __ mov(ebx, esp);
799 799
800 // Do call through the api. 800 // Do call through the api.
801 ASSERT_EQ(6, ApiGetterEntryStub::kStackSpace); 801 ASSERT_EQ(6, ApiGetterEntryStub::kStackSpace);
802 Address getter_address = v8::ToCData<Address>(callback->getter()); 802 Address getter_address = v8::ToCData<Address>(callback->getter());
803 ApiFunction fun(getter_address); 803 ApiFunction fun(getter_address);
804 ApiGetterEntryStub stub(callback_handle, &fun); 804 ApiGetterEntryStub stub(callback_handle, &fun);
805 __ CallStub(&stub); 805 __ CallStub(&stub);
806 806
807 // We need to avoid using eax since that now holds the result.
807 Register tmp = other.is(eax) ? reg : other; 808 Register tmp = other.is(eax) ? reg : other;
808 __ PopHandleScope(tmp); 809 __ PopHandleScope(Vector<const Register>(&eax, 1), tmp);
809 __ LeaveInternalFrame(); 810 __ LeaveInternalFrame();
810 811
811 __ ret(0); 812 __ ret(0);
812 } 813 }
813 814
814 815
815 void StubCompiler::GenerateLoadConstant(JSObject* object, 816 void StubCompiler::GenerateLoadConstant(JSObject* object,
816 JSObject* holder, 817 JSObject* holder,
817 Register receiver, 818 Register receiver,
818 Register scratch1, 819 Register scratch1,
(...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after
1886 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); 1887 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET);
1887 1888
1888 // Return the generated code. 1889 // Return the generated code.
1889 return GetCode(); 1890 return GetCode();
1890 } 1891 }
1891 1892
1892 1893
1893 #undef __ 1894 #undef __
1894 1895
1895 } } // namespace v8::internal 1896 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698