Changeset 163291 in webkit


Ignore:
Timestamp:
Feb 3, 2014 12:17:33 AM (10 years ago)
Author:
mitz@apple.com
Message:

Stop using PLATFORM(MAC) in JavaScriptCore except where it means “OS X but not iOS”
https://bugs.webkit.org/show_bug.cgi?id=128098

Reviewed by Darin Adler.

  • API/JSValueRef.cpp:

(JSValueUnprotect): Added an explicit !PLATFORM(IOS) in guards for the Evernote workaround,
which is only needed on OS X.

  • API/tests/testapi.c:
(main): Changed PLATFORM(MAC)
PLATFORM(IOS) guards to OS(DARWIN), because they were

surrounding tests for code that is itself guarded by OS(DARWIN).

  • runtime/Watchdog.h: Changed PLATFORM(MAC) to OS(DARWIN).
  • tools/CodeProfiling.cpp:

(JSC::CodeProfiling::begin): Changed PLATFORM(MAC) to
OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK).
(JSC::CodeProfiling::end): Ditto.

Location:
trunk/Source/JavaScriptCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSValueRef.cpp

    r162784 r163291  
    4545#include <algorithm> // for std::min
    4646
    47 #if PLATFORM(MAC)
     47#if PLATFORM(MAC) && !PLATFORM(IOS)
    4848#include <mach-o/dyld.h>
    4949#endif
     
    5151using namespace JSC;
    5252
    53 #if PLATFORM(MAC)
     53#if PLATFORM(MAC) && !PLATFORM(IOS)
    5454static bool evernoteHackNeeded()
    5555{
     
    444444void JSValueUnprotect(JSContextRef ctx, JSValueRef value)
    445445{
    446 #if PLATFORM(MAC)
     446#if PLATFORM(MAC) && !PLATFORM(IOS)
    447447    if ((!value || !ctx) && evernoteHackNeeded())
    448448        return;
  • trunk/Source/JavaScriptCore/API/tests/testapi.c

    r162918 r163291  
    3434#include <wtf/Assertions.h>
    3535
    36 #if PLATFORM(MAC) || PLATFORM(IOS)
     36#if OS(DARWIN)
    3737#include <mach/mach.h>
    3838#include <mach/mach_time.h>
     
    11041104}
    11051105
    1106 #if PLATFORM(MAC) || PLATFORM(IOS)
     1106#if OS(DARWIN)
    11071107static double currentCPUTime()
    11081108{
     
    11631163    return true;
    11641164}
    1165 #endif /* PLATFORM(MAC) || PLATFORM(IOS) */
     1165#endif /* OS(DARWIN) */
    11661166
    11671167
     
    18541854    }
    18551855
    1856 #if PLATFORM(MAC) || PLATFORM(IOS)
     1856#if OS(DARWIN)
    18571857    JSStringRef currentCPUTimeStr = JSStringCreateWithUTF8CString("currentCPUTime");
    18581858    JSObjectRef currentCPUTimeFunction = JSObjectMakeFunctionWithCallback(context, currentCPUTimeStr, currentCPUTime_callAsFunction);
     
    20052005        }
    20062006    }
    2007 #endif /* PLATFORM(MAC) || PLATFORM(IOS) */
     2007#endif /* OS(DARWIN) */
    20082008
    20092009    // Clear out local variables pointing at JSObjectRefs to allow their values to be collected
  • trunk/Source/JavaScriptCore/ChangeLog

    r163274 r163291  
     12014-02-03  Dan Bernstein  <mitz@apple.com>
     2
     3        Stop using PLATFORM(MAC) in JavaScriptCore except where it means “OS X but not iOS”
     4        https://bugs.webkit.org/show_bug.cgi?id=128098
     5
     6        Reviewed by Darin Adler.
     7
     8        * API/JSValueRef.cpp:
     9        (JSValueUnprotect): Added an explicit !PLATFORM(IOS) in guards for the Evernote workaround,
     10        which is only needed on OS X.
     11
     12        * API/tests/testapi.c:
     13        (main): Changed PLATFORM(MAC) || PLATFORM(IOS) guards to OS(DARWIN), because they were
     14        surrounding tests for code that is itself guarded by OS(DARWIN).
     15
     16        * runtime/Watchdog.h: Changed PLATFORM(MAC) to OS(DARWIN).
     17
     18        * tools/CodeProfiling.cpp:
     19        (JSC::CodeProfiling::begin): Changed PLATFORM(MAC) to
     20        OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK).
     21        (JSC::CodeProfiling::end): Ditto.
     22
    1232014-02-02  Mark Lam  <mark.lam@apple.com>
    224
  • trunk/Source/JavaScriptCore/runtime/Watchdog.h

    r156169 r163291  
    2727#define Watchdog_h
    2828
    29 #if PLATFORM(MAC) || PLATFORM(IOS)
     29#if OS(DARWIN)
    3030#include <dispatch/dispatch.h>   
    3131#endif
     
    9494    void* m_callbackData2;
    9595
    96 #if PLATFORM(MAC) || PLATFORM(IOS)
     96#if OS(DARWIN)
    9797    dispatch_queue_t m_queue;
    9898    dispatch_source_t m_timer;
  • trunk/Source/JavaScriptCore/tools/CodeProfiling.cpp

    r111618 r163291  
    4949#endif
    5050
    51 #if (PLATFORM(MAC) && CPU(X86_64)) || (OS(LINUX) && CPU(X86))
     51#if (OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK) && CPU(X86_64)) || (OS(LINUX) && CPU(X86))
    5252// Helper function to start & stop the timer.
    5353// Presently we're using the wall-clock timer, since this seems to give the best results.
     
    6767#endif
    6868
    69 #if PLATFORM(MAC) && CPU(X86_64)
     69#if OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK) && CPU(X86_64)
    7070static void profilingTimer(int, siginfo_t*, void* uap)
    7171{
     
    144144        return;
    145145
    146 #if (PLATFORM(MAC) && CPU(X86_64)) || (OS(LINUX) && CPU(X86))
     146#if (OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK) && CPU(X86_64)) || (OS(LINUX) && CPU(X86))
    147147    // Regsiter a signal handler & itimer.
    148148    struct sigaction action;
     
    168168        return;
    169169
    170 #if (PLATFORM(MAC) && CPU(X86_64)) || (OS(LINUX) && CPU(X86))
     170#if (OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK) && CPU(X86_64)) || (OS(LINUX) && CPU(X86))
    171171    // Stop profiling
    172172    setProfileTimer(0);
Note: See TracChangeset for help on using the changeset viewer.