Changeset 218316 in webkit for trunk/Source/JavaScriptCore/API/ObjcRuntimeExtras.h
- Timestamp:
- Jun 14, 2017, 10:57:27 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/ObjcRuntimeExtras.h
r185122 r218316 1 1 /* 2 * Copyright (C) 2013 Apple Inc. All rights reserved.2 * Copyright (C) 2013, 2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 43 43 } 44 44 45 inline void forEachProtocolImplementingProtocol(Class cls, Protocol *target, void (^callback)(Protocol * ))45 inline void forEachProtocolImplementingProtocol(Class cls, Protocol *target, void (^callback)(Protocol *, bool& stop)) 46 46 { 47 47 ASSERT(cls); … … 57 57 free(protocols); 58 58 59 bool stop = false; 59 60 while (!worklist.isEmpty()) { 60 61 Protocol *protocol = worklist.last(); … … 66 67 67 68 // If it implements the protocol, make the callback. 68 if (protocolImplementsProtocol(protocol, target)) 69 callback(protocol); 69 if (protocolImplementsProtocol(protocol, target)) { 70 callback(protocol, stop); 71 if (stop) 72 break; 73 } 70 74 71 75 // Add incorporated protocols to the worklist.
Note:
See TracChangeset
for help on using the changeset viewer.