Bug 99683 - JavaScriptCore uses PLATFORM(MAC) when it means OS(DARWIN)
Summary: JavaScriptCore uses PLATFORM(MAC) when it means OS(DARWIN)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 126492
  Show dependency treegraph
 
Reported: 2012-10-17 22:27 PDT by Jeremy Huddleston Sequoia
Modified: 2014-01-18 11:37 PST (History)
4 users (show)

See Also:


Attachments
Patch (2.52 KB, patch)
2014-01-15 22:59 PST, Alberto Garcia
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Huddleston Sequoia 2012-10-17 22:27:45 PDT
Source/JavaScriptCore/heap/VTableSpectrum.cpp uses PLATFORM(MAC) for some dladdr-foo, but that is valid based on OS(DARWIN) rather than PLATFORM(MAC) ... ie, it's valid for darwin/qt, darwin/gtk, etc.
Comment 1 Jeremy Huddleston Sequoia 2012-10-17 22:31:11 PDT
It looks like the same mis-use is occurring in:

Source/JavaScriptCore/jit/ThunkGenerators.cpp
Source/JavaScriptCore/tools/CodeProfile.cpp
Comment 2 Alberto Garcia 2014-01-03 08:24:11 PST
(In reply to comment #0)
> Source/JavaScriptCore/heap/VTableSpectrum.cpp uses PLATFORM(MAC) for
> some dladdr-foo, but that is valid based on OS(DARWIN) rather than
> PLATFORM(MAC) ... ie, it's valid for darwin/qt, darwin/gtk, etc.

That file does not exist anymore, I would propose to close this bug
but you mention other files that might be affected by the same
problem.

Is this still relevant? Are there other files to take care of?
Comment 3 Jeremy Huddleston Sequoia 2014-01-03 08:42:59 PST
(In reply to comment #2)
> (In reply to comment #0)
> > Source/JavaScriptCore/heap/VTableSpectrum.cpp uses PLATFORM(MAC) for
> > some dladdr-foo, but that is valid based on OS(DARWIN) rather than
> > PLATFORM(MAC) ... ie, it's valid for darwin/qt, darwin/gtk, etc.
> 
> That file does not exist anymore, I would propose to close this bug
> but you mention other files that might be affected by the same
> problem.
> 
> Is this still relevant? Are there other files to take care of?

It still exists in the latest released version of webkit-gtk (2.2.3).  I'll try updating our Portfile to use 2.3.x to see if anything else falls out with that beta release.

As of 2.2.3, we still needed to do the following changes:

    # https://bugs.webkit.org/show_bug.cgi?id=99683
    reinplace "s:PLATFORM(MAC):OS(DARWIN):g" \
        ${worksrcpath}/Source/JavaScriptCore/heap/VTableSpectrum.cpp \
        ${worksrcpath}/Source/JavaScriptCore/jit/ThunkGenerators.cpp \
        ${worksrcpath}/Source/JavaScriptCore/tools/CodeProfile.cpp

    # https://bugs.webkit.org/show_bug.cgi?id=58737
    reinplace "s:OS(MAC_OS_X):PLATFORM(MAC):" \
        ${worksrcpath}/Source/WTF/wtf/ThreadingPthreads.cpp
Comment 4 Alberto Garcia 2014-01-15 22:59:00 PST
Created attachment 221336 [details]
Patch

(In reply to comment #3)
> As of 2.2.3, we still needed to do the following changes:
>
>     # https://bugs.webkit.org/show_bug.cgi?id=99683
>     reinplace "s:PLATFORM(MAC):OS(DARWIN):g" \
>         ${worksrcpath}/Source/JavaScriptCore/heap/VTableSpectrum.cpp \
>         ${worksrcpath}/Source/JavaScriptCore/jit/ThunkGenerators.cpp \
>         ${worksrcpath}/Source/JavaScriptCore/tools/CodeProfile.cpp

VTableSpectrum.cpp no longer exists, but else it's fine.

Here's the updated patch.
Comment 5 Alberto Garcia 2014-01-18 11:37:48 PST
Committed r162266: <http://trac.webkit.org/changeset/162266>