<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[161650] trunk/Source/JavaScriptCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/161650">161650</a></dd>
<dt>Author</dt> <dd>ggaren@apple.com</dd>
<dt>Date</dt> <dd>2014-01-10 10:38:41 -0800 (Fri, 10 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Removed Blackberry #ifdefs and platform code from JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=126757

Reviewed by Sam Weinig.

* PlatformBlackBerry.cmake: Removed.
* heap/HeapTimer.cpp:
* heap/HeapTimer.h:
* heap/IncrementalSweeper.cpp:
* heap/IncrementalSweeper.h:
* jsc.cpp:
(main):
* runtime/GCActivityCallbackBlackBerry.cpp: Removed.
* runtime/MemoryStatistics.cpp:
(JSC::globalMemoryStatistics):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapHeapTimercpp">trunk/Source/JavaScriptCore/heap/HeapTimer.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapHeapTimerh">trunk/Source/JavaScriptCore/heap/HeapTimer.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapIncrementalSweepercpp">trunk/Source/JavaScriptCore/heap/IncrementalSweeper.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapIncrementalSweeperh">trunk/Source/JavaScriptCore/heap/IncrementalSweeper.h</a></li>
<li><a href="#trunkSourceJavaScriptCorejsccpp">trunk/Source/JavaScriptCore/jsc.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeMemoryStatisticscpp">trunk/Source/JavaScriptCore/runtime/MemoryStatistics.cpp</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCorePlatformBlackBerrycmake">trunk/Source/JavaScriptCore/PlatformBlackBerry.cmake</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeGCActivityCallbackBlackBerrycpp">trunk/Source/JavaScriptCore/runtime/GCActivityCallbackBlackBerry.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (161649 => 161650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-01-10 18:22:59 UTC (rev 161649)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-01-10 18:38:41 UTC (rev 161650)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2014-01-10  Geoffrey Garen  &lt;ggaren@apple.com&gt;
+
+        Removed Blackberry #ifdefs and platform code from JavaScriptCore
+        https://bugs.webkit.org/show_bug.cgi?id=126757
+
+        Reviewed by Sam Weinig.
+
+        * PlatformBlackBerry.cmake: Removed.
+        * heap/HeapTimer.cpp:
+        * heap/HeapTimer.h:
+        * heap/IncrementalSweeper.cpp:
+        * heap/IncrementalSweeper.h:
+        * jsc.cpp:
+        (main):
+        * runtime/GCActivityCallbackBlackBerry.cpp: Removed.
+        * runtime/MemoryStatistics.cpp:
+        (JSC::globalMemoryStatistics):
+
</ins><span class="cx"> 2014-01-07  Mark Hahnenberg  &lt;mhahnenberg@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Marking should be generational
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorePlatformBlackBerrycmake"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/PlatformBlackBerry.cmake (161649 => 161650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/PlatformBlackBerry.cmake        2014-01-10 18:22:59 UTC (rev 161649)
+++ trunk/Source/JavaScriptCore/PlatformBlackBerry.cmake        2014-01-10 18:38:41 UTC (rev 161650)
</span><span class="lines">@@ -1,9 +0,0 @@
</span><del>-list(REMOVE_ITEM JavaScriptCore_SOURCES
-    runtime/GCActivityCallback.cpp
-)
-
-list(APPEND JavaScriptCore_SOURCES
-    runtime/GCActivityCallbackBlackBerry.cpp
-)
-
-install(FILES &quot;wtf/Forward.h&quot; DESTINATION usr/include/browser/webkit/wtf)
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapHeapTimercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/HeapTimer.cpp (161649 => 161650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/HeapTimer.cpp        2014-01-10 18:22:59 UTC (rev 161649)
+++ trunk/Source/JavaScriptCore/heap/HeapTimer.cpp        2014-01-10 18:38:41 UTC (rev 161650)
</span><span class="lines">@@ -100,30 +100,6 @@
</span><span class="cx">     apiLock-&gt;unlock();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#elif PLATFORM(BLACKBERRY)
-
-HeapTimer::HeapTimer(VM* vm)
-    : m_vm(vm)
-    , m_timer(this, &amp;HeapTimer::timerDidFire)
-{
-    // FIXME: Implement HeapTimer for other threads.
-    if (WTF::isMainThread() &amp;&amp; !m_timer.tryCreateClient())
-        CRASH();
-}
-
-HeapTimer::~HeapTimer()
-{
-}
-
-void HeapTimer::timerDidFire()
-{
-    doWork();
-}
-
-void HeapTimer::invalidate()
-{
-}
-
</del><span class="cx"> #elif PLATFORM(EFL)
</span><span class="cx"> 
</span><span class="cx"> HeapTimer::HeapTimer(VM* vm)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapHeapTimerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/HeapTimer.h (161649 => 161650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/HeapTimer.h        2014-01-10 18:22:59 UTC (rev 161649)
+++ trunk/Source/JavaScriptCore/heap/HeapTimer.h        2014-01-10 18:38:41 UTC (rev 161650)
</span><span class="lines">@@ -31,8 +31,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if USE(CF)
</span><span class="cx"> #include &lt;CoreFoundation/CoreFoundation.h&gt;
</span><del>-#elif PLATFORM(BLACKBERRY)
-#include &lt;BlackBerryPlatformTimer.h&gt;
</del><span class="cx"> #elif PLATFORM(EFL)
</span><span class="cx"> #if USE(EO)
</span><span class="cx"> typedef struct _Eo_Opaque Ecore_Timer;
</span><span class="lines">@@ -68,10 +66,6 @@
</span><span class="cx">     CFRunLoopTimerContext m_context;
</span><span class="cx"> 
</span><span class="cx">     Mutex m_shutdownMutex;
</span><del>-#elif PLATFORM(BLACKBERRY)
-    void timerDidFire();
-
-    BlackBerry::Platform::Timer&lt;HeapTimer&gt; m_timer;
</del><span class="cx"> #elif PLATFORM(EFL)
</span><span class="cx">     static bool timerEvent(void*);
</span><span class="cx">     Ecore_Timer* add(double delay, void* agent);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapIncrementalSweepercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/IncrementalSweeper.cpp (161649 => 161650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/IncrementalSweeper.cpp        2014-01-10 18:22:59 UTC (rev 161649)
+++ trunk/Source/JavaScriptCore/heap/IncrementalSweeper.cpp        2014-01-10 18:38:41 UTC (rev 161650)
</span><span class="lines">@@ -38,14 +38,12 @@
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><del>-#if USE(CF) || PLATFORM(BLACKBERRY)
</del><ins>+#if USE(CF)
</ins><span class="cx"> 
</span><span class="cx"> static const double sweepTimeSlice = .01; // seconds
</span><span class="cx"> static const double sweepTimeTotal = .10;
</span><span class="cx"> static const double sweepTimeMultiplier = 1.0 / sweepTimeTotal;
</span><span class="cx"> 
</span><del>-#if USE(CF)
-    
</del><span class="cx"> IncrementalSweeper::IncrementalSweeper(Heap* heap, CFRunLoopRef runLoop)
</span><span class="cx">     : HeapTimer(heap-&gt;vm(), runLoop)
</span><span class="cx">     , m_currentBlockToSweepIndex(0)
</span><span class="lines">@@ -68,32 +66,6 @@
</span><span class="cx">     CFRunLoopTimerSetNextFireDate(m_timer.get(), CFAbsoluteTimeGetCurrent() + s_decade);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#elif PLATFORM(BLACKBERRY)
-   
-IncrementalSweeper::IncrementalSweeper(Heap* heap)
-    : HeapTimer(heap-&gt;vm())
-    , m_currentBlockToSweepIndex(0)
-    , m_blocksToSweep(heap-&gt;m_blockSnapshot)
-{
-}
-
-PassOwnPtr&lt;IncrementalSweeper&gt; IncrementalSweeper::create(Heap* heap)
-{
-    return adoptPtr(new IncrementalSweeper(heap));
-}
-
-void IncrementalSweeper::scheduleTimer()
-{
-    m_timer.start(sweepTimeSlice * sweepTimeMultiplier);
-}
-
-void IncrementalSweeper::cancelTimer()
-{
-    m_timer.stop();
-}
-
-#endif
-
</del><span class="cx"> void IncrementalSweeper::doWork()
</span><span class="cx"> {
</span><span class="cx">     doSweep(WTF::monotonicallyIncreasingTime());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapIncrementalSweeperh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/IncrementalSweeper.h (161649 => 161650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/IncrementalSweeper.h        2014-01-10 18:22:59 UTC (rev 161649)
+++ trunk/Source/JavaScriptCore/heap/IncrementalSweeper.h        2014-01-10 18:38:41 UTC (rev 161650)
</span><span class="lines">@@ -46,13 +46,11 @@
</span><span class="cx"> protected:
</span><span class="cx"> #if USE(CF)
</span><span class="cx">     JS_EXPORT_PRIVATE IncrementalSweeper(Heap*, CFRunLoopRef);
</span><del>-#elif PLATFORM(BLACKBERRY)
-    IncrementalSweeper(Heap*);
</del><span class="cx"> #else
</span><span class="cx">     IncrementalSweeper(VM*);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if USE(CF) || PLATFORM(BLACKBERRY)
</del><ins>+#if USE(CF)
</ins><span class="cx"> private:
</span><span class="cx">     void doSweep(double startTime);
</span><span class="cx">     void scheduleTimer();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejsccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jsc.cpp (161649 => 161650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jsc.cpp        2014-01-10 18:22:59 UTC (rev 161649)
+++ trunk/Source/JavaScriptCore/jsc.cpp        2014-01-10 18:38:41 UTC (rev 161650)
</span><span class="lines">@@ -85,10 +85,6 @@
</span><span class="cx"> #include &lt;arm/arch.h&gt;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if PLATFORM(BLACKBERRY)
-#include &lt;BlackBerryPlatformLog.h&gt;
-#endif
-
</del><span class="cx"> #if PLATFORM(EFL)
</span><span class="cx"> #include &lt;Ecore.h&gt;
</span><span class="cx"> #endif
</span><span class="lines">@@ -590,11 +586,6 @@
</span><span class="cx">     timeBeginPeriod(1);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if PLATFORM(BLACKBERRY)
-    // Write all WTF logs to the system log
-    BlackBerry::Platform::setupApplicationLogging(&quot;jsc&quot;);
-#endif
-
</del><span class="cx"> #if PLATFORM(EFL)
</span><span class="cx">     ecore_init();
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeGCActivityCallbackBlackBerrycpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/runtime/GCActivityCallbackBlackBerry.cpp (161649 => 161650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/GCActivityCallbackBlackBerry.cpp        2014-01-10 18:22:59 UTC (rev 161649)
+++ trunk/Source/JavaScriptCore/runtime/GCActivityCallbackBlackBerry.cpp        2014-01-10 18:38:41 UTC (rev 161650)
</span><span class="lines">@@ -1,58 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include &quot;config.h&quot;
-#include &quot;GCActivityCallback.h&quot;
-
-#include &quot;Heap.h&quot;
-#include &quot;VM.h&quot;
-#include &lt;BlackBerryPlatformMemory.h&gt;
-
-namespace JSC {
-
-DefaultGCActivityCallback::DefaultGCActivityCallback(Heap* heap)
-    : GCActivityCallback(heap-&gt;vm())
-{
-}
-
-void DefaultGCActivityCallback::doWork()
-{
-    JSLockHolder lock(m_vm);
-    m_vm-&gt;heap.collect(Heap::DoNotSweep);
-}
-
-void DefaultGCActivityCallback::didAllocate(size_t)
-{
-    if (m_timer.started())
-        return;
-
-    // Try using ~5% CPU time.
-    m_timer.start(m_vm-&gt;heap.lastGCLength() * 20);
-}
-
-void DefaultGCActivityCallback::willCollect()
-{
-    cancel();
-}
-
-void DefaultGCActivityCallback::cancel()
-{
-    m_timer.stop();
-}
-
-}
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeMemoryStatisticscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/MemoryStatistics.cpp (161649 => 161650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/MemoryStatistics.cpp        2014-01-10 18:22:59 UTC (rev 161649)
+++ trunk/Source/JavaScriptCore/runtime/MemoryStatistics.cpp        2014-01-10 18:38:41 UTC (rev 161650)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx">     GlobalMemoryStatistics stats;
</span><span class="cx"> 
</span><span class="cx">     stats.stackBytes = JSStack::committedByteCount();
</span><del>-#if ENABLE(EXECUTABLE_ALLOCATOR_FIXED) || ((PLATFORM(BLACKBERRY) || PLATFORM(EFL)) &amp;&amp; ENABLE(JIT))
</del><ins>+#if ENABLE(EXECUTABLE_ALLOCATOR_FIXED) || (PLATFORM(EFL) &amp;&amp; ENABLE(JIT))
</ins><span class="cx">     stats.JITBytes = ExecutableAllocator::committedByteCount();
</span><span class="cx"> #else
</span><span class="cx">     stats.JITBytes = 0;
</span></span></pre>
</div>
</div>

</body>
</html>