@@ -2123,11 +2123,15 @@ static_call_Relocation::spec(), RELOC_DISP32); } if (_method) { // Emit stub for static call. - CompiledStaticCall::emit_to_interp_stub(cbuf); + address stub = CompiledStaticCall::emit_to_interp_stub(cbuf); + if (stub == NULL) { + ciEnv::current()->record_failure("CodeCache is full"); + return; + } } %} enc_class Java_Dynamic_Call(method meth) %{ MacroAssembler _masm(&cbuf);