Index: src/code-stubs.cc |
=================================================================== |
--- src/code-stubs.cc (revision 6216) |
+++ src/code-stubs.cc (working copy) |
@@ -49,8 +49,10 @@ |
void CodeStub::GenerateCode(MacroAssembler* masm) { |
// Update the static counter each time a new code stub is generated. |
Counters::code_stubs.Increment(); |
+ |
// Nested stubs are not allowed for leafs. |
- masm->set_allow_stub_calls(AllowsStubCalls()); |
+ AllowStubCallsScope allow_scope(masm, AllowsStubCalls()); |
+ |
// Generate the code for the stub. |
masm->set_generating_stub(true); |
Generate(masm); |