Explorar o código

Remove unnecessary call to [self descriptor] in resolveClassMethod:

This was causing problems in OCMock due to recursion when OCMock was trying
to mock a protobuf.

`_forwardStackInvocation:` was being called as part of the resolution of `descriptor`.
Dave MacLachlan %!s(int64=5) %!d(string=hai) anos
pai
achega
118589c565
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      objectivec/GPBMessage.m

+ 1 - 1
objectivec/GPBMessage.m

@@ -3253,7 +3253,7 @@ static void ResolveIvarSet(__unsafe_unretained GPBFieldDescriptor *field,
 
 + (BOOL)resolveClassMethod:(SEL)sel {
   // Extensions scoped to a Message and looked up via class methods.
-  if (GPBResolveExtensionClassMethod([self descriptor].messageClass, sel)) {
+  if (GPBResolveExtensionClassMethod(self, sel)) {
     return YES;
   }
   return [super resolveClassMethod:sel];