Ignore:
Timestamp:
Feb 20, 2014, 11:40:04 AM (11 years ago)
Author:
[email protected]
Message:

Dynamically generated JSExport protocols added to a class results in a crash
https://bugs.webkit.org/show_bug.cgi?id=129108

Reviewed by Oliver Hunt.

We're not getting any information from the runtime about the types of the methods on
these protocols because they didn't exist at compile time. We should handle this gracefully.

  • API/ObjCCallbackFunction.mm:

(objCCallbackFunctionForInvocation):

  • API/tests/JSExportTests.mm:

(+[JSExportTests exportDynamicallyGeneratedProtocolTest]):
(runJSExportTests):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/ObjCCallbackFunction.mm

    r164136 r164439  
    633633static JSObjectRef objCCallbackFunctionForInvocation(JSContext *context, NSInvocation *invocation, CallbackType type, Class instanceClass, const char* signatureWithObjcClasses)
    634634{
     635    if (!signatureWithObjcClasses)
     636        return nil;
     637
    635638    const char* position = signatureWithObjcClasses;
    636639
Note: See TracChangeset for help on using the changeset viewer.