Bug 70440 - [Chromium] Export missing symbols from Web*Layer
Summary: [Chromium] Export missing symbols from Web*Layer
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-19 14:20 PDT by Antoine Labour
Modified: 2011-10-20 16:19 PDT (History)
4 users (show)

See Also:


Attachments
Patch (3.87 KB, patch)
2011-10-19 14:20 PDT, Antoine Labour
no flags Details | Formatted Diff | Diff
Patch (3.96 KB, patch)
2011-10-20 13:39 PDT, Antoine Labour
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Labour 2011-10-19 14:20:30 PDT
Export missing symbols from Web*Layer
Comment 1 Antoine Labour 2011-10-19 14:20:53 PDT
Created attachment 111673 [details]
Patch
Comment 2 WebKit Review Bot 2011-10-19 15:31:02 PDT
Please wait for approval from fishd@chromium.org before submitting because this patch contains changes to the Chromium public API.
Comment 3 Darin Fisher (:fishd, Google) 2011-10-19 21:03:58 PDT
Comment on attachment 111673 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=111673&action=review

> Source/WebKit/chromium/public/WebContentLayer.h:38
> +class WEBKIT_EXPORT WebContentLayer : public WebLayer {

we don't normally export entire classes.  see other header files.  we just export the non-inline methods (ignore pure virtual methods of course).
Comment 4 Antoine Labour 2011-10-19 22:17:59 PDT
(In reply to comment #3)
> (From update of attachment 111673 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=111673&action=review
> 
> > Source/WebKit/chromium/public/WebContentLayer.h:38
> > +class WEBKIT_EXPORT WebContentLayer : public WebLayer {
> 
> we don't normally export entire classes.  see other header files.  we just export the non-inline methods (ignore pure virtual methods of course).

That was necessary, otherwise I was getting undefined symbols for the vtable - it's defined with the first virtual method definition (in this case the destructor, inside of the .so), but is needed in the constructor (inlined in the calling code).
If we're adamant on that, we could try inlining the virtual destructor, or un-inlining the constructors and moving them into the .cpp. I'll see if either one works.
Comment 5 Darin Fisher (:fishd, Google) 2011-10-19 23:34:32 PDT
(In reply to comment #4)
...
> That was necessary, otherwise I was getting undefined symbols for the vtable - it's defined with the first virtual method definition (in this case the destructor, inside of the .so), but is needed in the constructor (inlined in the calling code).
> If we're adamant on that, we could try inlining the virtual destructor, or un-inlining the constructors and moving them into the .cpp. I'll see if either one works.

We haven't had to export classes before.  Something must be unconventional here that can be avoided.
Comment 6 Darin Fisher (:fishd, Google) 2011-10-19 23:36:08 PDT
(In reply to comment #5)
> (In reply to comment #4)
> ...
> > That was necessary, otherwise I was getting undefined symbols for the vtable - it's defined with the first virtual method definition (in this case the destructor, inside of the .so), but is needed in the constructor (inlined in the calling code).
> > If we're adamant on that, we could try inlining the virtual destructor, or un-inlining the constructors and moving them into the .cpp. I'll see if either one works.
> 
> We haven't had to export classes before.  Something must be unconventional here that can be avoided.

perhaps you should inline the WebLayer destructor.  that would probably do the trick.  we normally do not export constructors and destructors.
Comment 7 Antoine Labour 2011-10-20 13:39:15 PDT
Created attachment 111839 [details]
Patch
Comment 8 Antoine Labour 2011-10-20 13:40:07 PDT
New patch does that.
Comment 9 WebKit Review Bot 2011-10-20 16:19:01 PDT
Comment on attachment 111839 [details]
Patch

Clearing flags on attachment: 111839

Committed r98035: <http://trac.webkit.org/changeset/98035>
Comment 10 WebKit Review Bot 2011-10-20 16:19:08 PDT
All reviewed patches have been landed.  Closing bug.