[Webkit-unassigned] [Bug 168578] New: [Cocoa] Objective-C class whose name begins with an underscore can’t be exported to JavaScript

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Feb 19 17:14:32 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=168578

            Bug ID: 168578
           Summary: [Cocoa] Objective-C class whose name begins with an
                    underscore can’t be exported to JavaScript
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mitz at webkit.org
                CC: ggaren at apple.com

When an Objective-C class’s name begins with an underscore, its conformance to JSExport is ignored. This is because -[JSWrapperMap classInfoForClass:] skips over classes whose names begin with an underscore. A comment in that method says that it skips “internal classes beginning with '_'” but offers no explanation why. A possible explanation is that this behavior does make instances of class clusters appear somewhat “nicer” when exported to JavaScript.

In framework code (including WebKit code), it is common for class names that aren’t part of the public API to being with an underscore, and such classes may have JS exports that they don’t share with a non-underscore-prefixed superclass.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170220/2f3453da/attachment.html>


More information about the webkit-unassigned mailing list