WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-85399-20120502160637.patch (text/plain), 25.96 KB, created by
Mark Pilgrim (Google)
on 2012-05-02 13:06:48 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Mark Pilgrim (Google)
Created:
2012-05-02 13:06:48 PDT
Size:
25.96 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 115862) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,43 @@ >+2012-05-02 Mark Pilgrim <pilgrim@chromium.org> >+ >+ [Chromium] Call addTraceEvent and getTraceCategoryEnabledFlag directly >+ https://bugs.webkit.org/show_bug.cgi?id=85399 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Now that addTraceEvent has been moved from PlatformSupport.h >+ to Platform.h, we need to be able to call it directly >+ from WebCore/platform/chromium/TraceEvent.h (and the >+ various places in WebCore that include that header) >+ We do this with a new TraceEventSupport class in >+ WebCore/platform/ and an implementation in >+ WebCore/platform/chromium/TraceEventSupportChromium.cpp. >+ Other ports are welcome to implement their own version of >+ trace events if they wish. This pattern was based on the >+ HistogramSupport/HistogramSupportChromium classes. >+ Support for getTraceCategoryEnabledFlag is also included >+ in this patch. >+ >+ * CMakeLists.txt: >+ * GNUmakefile.list.am: >+ * Target.pri: >+ * WebCore.gypi: >+ * WebCore.vcproj/WebCore.vcproj: >+ * WebCore.xcodeproj/project.pbxproj: >+ * platform/TraceEventSupport.cpp: Added. >+ (WebCore): >+ (WebCore::TraceEventSupport::getTraceCategoryEnabledFlag): >+ (WebCore::TraceEventSupport::addTraceEvent): >+ * platform/TraceEventSupport.h: Added. >+ (WebCore): >+ (TraceEventSupport): >+ * platform/chromium/PlatformSupport.h: >+ * platform/chromium/TraceEvent.h: >+ * platform/chromium/TraceEventSupportChromium.cpp: Added. >+ (WebCore): >+ (WebCore::TraceEventSupport::getTraceCategoryEnabledFlag): >+ (WebCore::TraceEventSupport::addTraceEvent): >+ > 2012-05-02 Antti Koivisto <antti@apple.com> > > Move title and media queries from StyleSheetInternal to CSSStyleSheet >Index: Source/WebCore/CMakeLists.txt >=================================================================== >--- Source/WebCore/CMakeLists.txt (revision 115858) >+++ Source/WebCore/CMakeLists.txt (working copy) >@@ -1132,6 +1132,7 @@ SET(WebCore_SOURCES > platform/ThreadGlobalData.cpp > platform/ThreadTimers.cpp > platform/Timer.cpp >+ platform/TraceEventSupport.cpp > platform/UUID.cpp > platform/Widget.cpp > >Index: Source/WebCore/GNUmakefile.list.am >=================================================================== >--- Source/WebCore/GNUmakefile.list.am (revision 115858) >+++ Source/WebCore/GNUmakefile.list.am (working copy) >@@ -3580,7 +3580,7 @@ webcore_sources += \ > Source/WebCore/platform/sql/SQLValue.cpp \ > Source/WebCore/platform/sql/SQLValue.h \ > Source/WebCore/platform/SSLKeyGenerator.h \ >- Source/WebCore/platform/StatsCounter.h \ >+ Source/WebCore/platform/StatsCounter.h \ > Source/WebCore/platform/SuddenTermination.h \ > Source/WebCore/platform/Supplementable.h \ > Source/WebCore/platform/SystemTime.h \ >@@ -3654,6 +3654,8 @@ webcore_sources += \ > Source/WebCore/platform/ThreadTimers.h \ > Source/WebCore/platform/Timer.cpp \ > Source/WebCore/platform/Timer.h \ >+ Source/WebCore/platform/TraceEventSupport.cpp \ >+ Source/WebCore/platform/TraceEventSupport.h \ > Source/WebCore/platform/TreeShared.h \ > Source/WebCore/platform/UUID.cpp \ > Source/WebCore/platform/UUID.h \ >Index: Source/WebCore/Target.pri >=================================================================== >--- Source/WebCore/Target.pri (revision 115858) >+++ Source/WebCore/Target.pri (working copy) >@@ -1207,6 +1207,7 @@ SOURCES += \ > platform/Timer.cpp \ > platform/text/UnicodeRange.cpp \ > platform/text/transcoder/FontTranscoder.cpp \ >+ platform/TraceEventSupport.cpp \ > platform/UUID.cpp \ > platform/Widget.cpp \ > platform/PlatformStrategies.cpp \ >@@ -2379,6 +2380,7 @@ HEADERS += \ > platform/ThreadGlobalData.h \ > platform/ThreadTimers.h \ > platform/Timer.h \ >+ platform/TraceEventSupport.h \ > platform/Widget.h \ > platform/PlatformStrategies.h \ > platform/LocalizedStrings.h \ >Index: Source/WebCore/WebCore.gypi >=================================================================== >--- Source/WebCore/WebCore.gypi (revision 115858) >+++ Source/WebCore/WebCore.gypi (working copy) >@@ -324,6 +324,7 @@ > 'platform/ThreadCheck.h', > 'platform/ThreadGlobalData.h', > 'platform/Timer.h', >+ 'platform/TraceEventSupport.h', > 'platform/TreeShared.h', > 'platform/VisitedLinkStrategy.h', > 'platform/Widget.h', >@@ -3345,6 +3346,7 @@ > 'platform/chromium/ThemeChromiumMac.h', > 'platform/chromium/ThemeChromiumMac.mm', > 'platform/chromium/TraceEvent.h', >+ 'platform/chromium/TraceEventSupportChromium.cpp', > 'platform/chromium/WidgetChromium.cpp', > 'platform/cocoa/KeyEventCocoa.h', > 'platform/cocoa/KeyEventCocoa.mm', >Index: Source/WebCore/WebCore.vcproj/WebCore.vcproj >=================================================================== >--- Source/WebCore/WebCore.vcproj/WebCore.vcproj (revision 115858) >+++ Source/WebCore/WebCore.vcproj/WebCore.vcproj (working copy) >@@ -28006,6 +28006,14 @@ > > > </File> > <File >+ RelativePath="..\platform\TraceEventSupport.cpp" >+ > >+ </File> >+ <File >+ RelativePath="..\platform\TraceEventSupport.h" >+ > >+ </File> >+ <File > RelativePath="..\platform\TreeShared.h" > > > </File> >Index: Source/WebCore/WebCore.xcodeproj/project.pbxproj >=================================================================== >--- Source/WebCore/WebCore.xcodeproj/project.pbxproj (revision 115858) >+++ Source/WebCore/WebCore.xcodeproj/project.pbxproj (working copy) >@@ -5810,6 +5810,7 @@ > D630E2AC149BF344005B2F93 /* HistogramSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = D630E2AB149BF344005B2F93 /* HistogramSupport.h */; }; > D630E2AC149BF344005B2F94 /* StatsCounter.h in Headers */ = {isa = PBXBuildFile; fileRef = D630E2AB149BF344005B2F94 /* StatsCounter.h */; }; > D630E2AC149BF344005B2F95 /* MemoryUsageSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = D630E2AB149BF344005B2F95 /* MemoryUsageSupport.h */; }; >+ D630E2AC149BF344005B2F96 /* TraceEventSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = D630E2AB149BF344005B2F96 /* TraceEventSupport.h */; }; > D6E276AF14637455001D280A /* MutationObserverRegistration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D6E276AD14637455001D280A /* MutationObserverRegistration.cpp */; }; > D6E276B014637455001D280A /* MutationObserverRegistration.h in Headers */ = {isa = PBXBuildFile; fileRef = D6E276AE14637455001D280A /* MutationObserverRegistration.h */; }; > D6E528A3149A926D00EFE1F3 /* MutationObserverInterestGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D6E528A1149A926D00EFE1F3 /* MutationObserverInterestGroup.cpp */; }; >@@ -5817,6 +5818,7 @@ > D6FDAEF3149C06190037B1E1 /* HistogramSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D6FDAEF2149C06190037B1E1 /* HistogramSupport.cpp */; }; > D6FDAEF3149C06190037B1E2 /* StatsCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D6FDAEF2149C06190037B1E2 /* StatsCounter.cpp */; }; > D6FDAEF3149C06190037B1E3 /* MemoryUsageSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D6FDAEF2149C06190037B1E3 /* MemoryUsageSupport.cpp */; }; >+ D6FDAEF3149C06190037B1E4 /* TraceEventSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D6FDAEF2149C06190037B1E4 /* TraceEventSupport.cpp */; }; > D70AD65713E1342B005B50B4 /* RenderRegion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D70AD65513E1342B005B50B4 /* RenderRegion.cpp */; }; > D70AD65813E1342B005B50B4 /* RenderRegion.h in Headers */ = {isa = PBXBuildFile; fileRef = D70AD65613E1342B005B50B4 /* RenderRegion.h */; }; > D72F6D79153159A3001EE44E /* FlowThreadController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D72F6D77153159A3001EE44E /* FlowThreadController.cpp */; }; >@@ -12952,6 +12954,7 @@ > D630E2AB149BF344005B2F93 /* HistogramSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HistogramSupport.h; sourceTree = "<group>"; }; > D630E2AB149BF344005B2F94 /* StatsCounter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StatsCounter.h; sourceTree = "<group>"; }; > D630E2AB149BF344005B2F95 /* MemoryUsageSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryUsageSupport.h; sourceTree = "<group>"; }; >+ D630E2AB149BF344005B2F96 /* TraceEventSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TraceEventSupport.h; sourceTree = "<group>"; }; > D6E276AD14637455001D280A /* MutationObserverRegistration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MutationObserverRegistration.cpp; sourceTree = "<group>"; }; > D6E276AE14637455001D280A /* MutationObserverRegistration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MutationObserverRegistration.h; sourceTree = "<group>"; }; > D6E528A1149A926D00EFE1F3 /* MutationObserverInterestGroup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MutationObserverInterestGroup.cpp; sourceTree = "<group>"; }; >@@ -12959,6 +12962,7 @@ > D6FDAEF2149C06190037B1E1 /* HistogramSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HistogramSupport.cpp; sourceTree = "<group>"; }; > D6FDAEF2149C06190037B1E2 /* StatsCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StatsCounter.cpp; sourceTree = "<group>"; }; > D6FDAEF2149C06190037B1E3 /* MemoryUsageSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryUsageSupport.cpp; sourceTree = "<group>"; }; >+ D6FDAEF2149C06190037B1E4 /* TraceEventSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TraceEventSupport.cpp; sourceTree = "<group>"; }; > D70AD65513E1342B005B50B4 /* RenderRegion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderRegion.cpp; sourceTree = "<group>"; }; > D70AD65613E1342B005B50B4 /* RenderRegion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderRegion.h; sourceTree = "<group>"; }; > D72F6D77153159A3001EE44E /* FlowThreadController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FlowThreadController.cpp; sourceTree = "<group>"; }; >@@ -20358,6 +20362,8 @@ > 185BCF270F3279CE000EA262 /* ThreadTimers.h */, > 93309EA1099EB78C0056E581 /* Timer.cpp */, > 9305B24C098F1B6B00C28855 /* Timer.h */, >+ D6FDAEF2149C06190037B1E4 /* TraceEventSupport.cpp */, >+ D630E2AB149BF344005B2F96 /* TraceEventSupport.h */, > 1419D2C40CEA6F6100FF507A /* TreeShared.h */, > 2E3BBF051162DA1100B9409A /* UUID.cpp */, > 2E3BBF061162DA1100B9409A /* UUID.h */, >@@ -24640,6 +24646,7 @@ > 9305B24D098F1B6B00C28855 /* Timer.h in Headers */, > E44613B00CD6331000FADA75 /* TimeRanges.h in Headers */, > 49E912AE0EFAC906009D0CAF /* TimingFunction.h in Headers */, >+ D630E2AC149BF344005B2F96 /* TraceEventSupport.h in Headers */, > 070334D71459FFD5008D8D45 /* TrackBase.h in Headers */, > 49E911C40EF86D47009D0CAF /* TransformationMatrix.h in Headers */, > 49E911CE0EF86D47009D0CAF /* TransformOperation.h in Headers */, >@@ -27685,6 +27692,7 @@ > 7553CFE9108F473F00EA281E /* TimelineRecordFactory.cpp in Sources */, > 93309EA4099EB78C0056E581 /* Timer.cpp in Sources */, > E44613AF0CD6331000FADA75 /* TimeRanges.cpp in Sources */, >+ D6FDAEF3149C06190037B1E4 /* TraceEventSupport.cpp in Sources */, > 070334D9145A006F008D8D45 /* TrackBase.cpp in Sources */, > 070334D31459FFAD008D8D45 /* TrackEvent.cpp in Sources */, > 49E911C30EF86D47009D0CAF /* TransformationMatrix.cpp in Sources */, >Index: Source/WebCore/platform/TraceEventSupport.cpp >=================================================================== >--- Source/WebCore/platform/TraceEventSupport.cpp (revision 0) >+++ Source/WebCore/platform/TraceEventSupport.cpp (revision 0) >@@ -0,0 +1,56 @@ >+/* >+ * Copyright (C) 2011 Google Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions are >+ * met: >+ * >+ * * Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * * Redistributions in binary form must reproduce the above >+ * copyright notice, this list of conditions and the following disclaimer >+ * in the documentation and/or other materials provided with the >+ * distribution. >+ * * Neither the name of Google Inc. nor the names of its >+ * contributors may be used to endorse or promote products derived from >+ * this software without specific prior written permission. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "TraceEventSupport.h" >+ >+namespace WebCore { >+ >+const unsigned char* TraceEventSupport::getTraceCategoryEnabledFlag(const char* categoryName) >+{ >+ return 0; >+} >+ >+int TraceEventSupport::addTraceEvent(char phase, >+ const unsigned char* categoryEnabledFlag, >+ const char* name, >+ unsigned long long id, >+ int numArgs, >+ const char** argNames, >+ const unsigned char* argTypes, >+ const unsigned long long* argValues, >+ int thresholdBeginId, >+ long long threshold, >+ unsigned char flags) >+{ >+ return -1; >+} >+ >+} // namespace WebCore >Index: Source/WebCore/platform/TraceEventSupport.h >=================================================================== >--- Source/WebCore/platform/TraceEventSupport.h (revision 0) >+++ Source/WebCore/platform/TraceEventSupport.h (revision 0) >@@ -0,0 +1,54 @@ >+/* >+ * Copyright (C) 2011 Google Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions are >+ * met: >+ * >+ * * Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * * Redistributions in binary form must reproduce the above >+ * copyright notice, this list of conditions and the following disclaimer >+ * in the documentation and/or other materials provided with the >+ * distribution. >+ * * Neither the name of Google Inc. nor the names of its >+ * contributors may be used to endorse or promote products derived from >+ * this software without specific prior written permission. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef TraceEventSupport_h >+#define TraceEventSupport_h >+ >+namespace WebCore { >+ >+class TraceEventSupport { >+public: >+ static const unsigned char* getTraceCategoryEnabledFlag(const char* categoryName); >+ static int addTraceEvent(char phase, >+ const unsigned char* categoryEnabledFlag, >+ const char* name, >+ unsigned long long id, >+ int numArgs, >+ const char** argNames, >+ const unsigned char* argTypes, >+ const unsigned long long* argValues, >+ int thresholdBeginId, >+ long long threshold, >+ unsigned char flags); >+}; >+ >+} // namespace WebCore >+ >+#endif // TraceEventSupport_h >Index: Source/WebCore/platform/chromium/PlatformSupport.h >=================================================================== >--- Source/WebCore/platform/chromium/PlatformSupport.h (revision 115858) >+++ Source/WebCore/platform/chromium/PlatformSupport.h (working copy) >@@ -368,20 +368,6 @@ public: > static void paintThemePart(GraphicsContext*, ThemePart, ThemePaintState, const IntRect&, const ThemePaintExtraParams*); > #endif > >- // Trace Event -------------------------------------------------------- >- static const unsigned char* getTraceCategoryEnabledFlag(const char* categoryName); >- static int addTraceEvent(char phase, >- const unsigned char* categoryEnabledFlag, >- const char* name, >- unsigned long long id, >- int numArgs, >- const char** argNames, >- const unsigned char* argTypes, >- const unsigned long long* argValues, >- int thresholdBeginId, >- long long threshold, >- unsigned char flags); >- > // Visited links ------------------------------------------------------ > static LinkHash visitedLinkHash(const UChar* url, unsigned length); > static LinkHash visitedLinkHash(const KURL& base, const AtomicString& attributeURL); >Index: Source/WebCore/platform/chromium/TraceEvent.h >=================================================================== >--- Source/WebCore/platform/chromium/TraceEvent.h (revision 115858) >+++ Source/WebCore/platform/chromium/TraceEvent.h (working copy) >@@ -163,7 +163,7 @@ > #ifndef TraceEvent_h > #define TraceEvent_h > >-#include "PlatformSupport.h" >+#include "TraceEventSupport.h" > > #include <wtf/DynamicAnnotations.h> > #include <wtf/text/CString.h> >@@ -463,7 +463,7 @@ > // const unsigned char* > // TRACE_EVENT_API_GET_CATEGORY_ENABLED(const char* category_name) > #define TRACE_EVENT_API_GET_CATEGORY_ENABLED \ >- WebCore::PlatformSupport::getTraceCategoryEnabledFlag >+ WebCore::TraceEventSupport::getTraceCategoryEnabledFlag > > // Add a trace event to the platform tracing system. Returns thresholdBeginId > // for use in a corresponding end TRACE_EVENT_API_ADD_TRACE_EVENT call. >@@ -480,7 +480,7 @@ > // long long threshold, > // unsigned char flags) > #define TRACE_EVENT_API_ADD_TRACE_EVENT \ >- WebCore::PlatformSupport::addTraceEvent >+ WebCore::TraceEventSupport::addTraceEvent > > //////////////////////////////////////////////////////////////////////////////// > >Index: Source/WebCore/platform/chromium/TraceEventSupportChromium.cpp >=================================================================== >--- Source/WebCore/platform/chromium/TraceEventSupportChromium.cpp (revision 0) >+++ Source/WebCore/platform/chromium/TraceEventSupportChromium.cpp (revision 0) >@@ -0,0 +1,58 @@ >+/* >+ * Copyright (C) 2011 Google Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions are >+ * met: >+ * >+ * * Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * * Redistributions in binary form must reproduce the above >+ * copyright notice, this list of conditions and the following disclaimer >+ * in the documentation and/or other materials provided with the >+ * distribution. >+ * * Neither the name of Google Inc. nor the names of its >+ * contributors may be used to endorse or promote products derived from >+ * this software without specific prior written permission. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "TraceEventSupport.h" >+ >+#include <public/Platform.h> >+ >+namespace WebCore { >+ >+const unsigned char* TraceEventSupport::getTraceCategoryEnabledFlag(const char* categoryName) >+{ >+ return WebKit::Platform::current()->getTraceCategoryEnabledFlag(categoryName); >+} >+ >+int TraceEventSupport::addTraceEvent(char phase, >+ const unsigned char* categoryEnabledFlag, >+ const char* name, >+ unsigned long long id, >+ int numArgs, >+ const char** argNames, >+ const unsigned char* argTypes, >+ const unsigned long long* argValues, >+ int thresholdBeginId, >+ long long threshold, >+ unsigned char flags) >+{ >+ return WebKit::Platform::current()->addTraceEvent(phase, categoryEnabledFlag, name, id, numArgs, argNames, argTypes, argValues, thresholdBeginId, threshold, flags); >+} >+ >+} // namespace WebCore >Index: Source/WebKit/chromium/ChangeLog >=================================================================== >--- Source/WebKit/chromium/ChangeLog (revision 115862) >+++ Source/WebKit/chromium/ChangeLog (working copy) >@@ -1,3 +1,26 @@ >+2012-05-02 Mark Pilgrim <pilgrim@chromium.org> >+ >+ [Chromium] Call addTraceEvent and getTraceCategoryEnabledFlag directly >+ https://bugs.webkit.org/show_bug.cgi?id=85399 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Now that addTraceEvent has been moved from PlatformSupport.h >+ to Platform.h, we need to be able to call it directly >+ from WebCore/platform/chromium/TraceEvent.h (and the >+ various places in WebCore that include that header) >+ We do this with a new TraceEventSupport class in >+ WebCore/platform/ and an implementation in >+ WebCore/platform/chromium/TraceEventSupportChromium.cpp. >+ Other ports are welcome to implement their own version of >+ trace events if they wish. This pattern was based on the >+ HistogramSupport/HistogramSupportChromium classes. >+ Support for getTraceCategoryEnabledFlag is also included >+ in this patch. >+ >+ * src/PlatformSupport.cpp: >+ (WebCore): >+ > 2012-05-02 Yury Semikhatsky <yurys@chromium.org> > > Web Inspector: TypeError: Cannot call method 'createLiveLocation' of undefined >Index: Source/WebKit/chromium/src/PlatformSupport.cpp >=================================================================== >--- Source/WebKit/chromium/src/PlatformSupport.cpp (revision 115858) >+++ Source/WebKit/chromium/src/PlatformSupport.cpp (working copy) >@@ -811,28 +811,6 @@ void PlatformSupport::paintThemePart( > > #endif > >-// Trace Event ---------------------------------------------------------------- >- >-const unsigned char* PlatformSupport::getTraceCategoryEnabledFlag(const char* categoryName) >-{ >- return webKitPlatformSupport()->getTraceCategoryEnabledFlag(categoryName); >-} >-int PlatformSupport::addTraceEvent(char phase, >- const unsigned char* categoryEnabledFlag, >- const char* name, >- unsigned long long id, >- int numArgs, >- const char** argNames, >- const unsigned char* argTypes, >- const unsigned long long* argValues, >- int thresholdBeginId, >- long long threshold, >- unsigned char flags) >-{ >- return webKitPlatformSupport()->addTraceEvent( >- phase, categoryEnabledFlag, name, id, numArgs, argNames, argTypes, argValues, thresholdBeginId, threshold, flags); >-} >- > // Visited Links -------------------------------------------------------------- > > LinkHash PlatformSupport::visitedLinkHash(const UChar* url, unsigned length)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 85399
:
139854
|
139858
|
139865
|
139877
|
139939
|
141227