Changeset 76493 in webkit
- Timestamp:
- Jan 24, 2011 2:20:57 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r76491 r76493 1 2011-01-24 Yury Semikhatsky <yurys@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 REGRESSION (r72895): console.trace crashes 6 https://bugs.webkit.org/show_bug.cgi?id=52981 7 8 - Use local RefPtr variable for accessing PassRefPtr arguments to make sure the PassRefPtr has 9 non-null value. 10 - Use PassRefPtr for objects whos ownership is passed to the inspector. 11 12 * GNUmakefile.am: 13 * WebCore.gypi: 14 * WebCore.pro: 15 * WebCore.vcproj/WebCore.vcproj: 16 * WebCore.xcodeproj/project.pbxproj: 17 * inspector/InspectorConsoleInstrumentation.h: Added. Extract inline methods called from the console into their 18 own header to reduce compilation time of other classes that depend on the inspector instrumentation. 19 (WebCore::InspectorInstrumentation::addMessageToConsole): 20 (WebCore::InspectorInstrumentation::consoleCount): 21 (WebCore::InspectorInstrumentation::startConsoleTiming): 22 (WebCore::InspectorInstrumentation::stopConsoleTiming): 23 (WebCore::InspectorInstrumentation::consoleMarkTimeline): 24 (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsole): 25 (WebCore::InspectorInstrumentation::addProfile): 26 (WebCore::InspectorInstrumentation::profilerEnabled): 27 (WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileName): 28 * inspector/InspectorDatabaseInstrumentation.h: Added. Extract inline methods called from the datanase code into their 29 own header to reduce compilation time of other classes that depend on the inspector instrumentation. 30 (WebCore::InspectorInstrumentation::didOpenDatabase): 31 * inspector/InspectorInstrumentation.cpp: 32 (WebCore::InspectorInstrumentation::addMessageToConsoleImpl): 33 (WebCore::InspectorInstrumentation::consoleCountImpl): 34 (WebCore::InspectorInstrumentation::stopConsoleTimingImpl): 35 (WebCore::InspectorInstrumentation::consoleMarkTimelineImpl): 36 (WebCore::InspectorInstrumentation::addProfileImpl): 37 (WebCore::InspectorInstrumentation::didOpenDatabaseImpl): 38 * inspector/InspectorInstrumentation.h: 39 * page/Console.cpp: use RefPtr local variable instead of accessing PassRefPtr argument directly. 40 (WebCore::Console::addMessage): 41 (WebCore::Console::trace): 42 (WebCore::Console::count): 43 (WebCore::Console::markTimeline): 44 (WebCore::Console::profileEnd): 45 (WebCore::Console::timeEnd): 46 (WebCore::Console::group): 47 (WebCore::Console::groupCollapsed): 48 * storage/Database.cpp: 49 (WebCore::Database::openDatabase): 50 1 51 2010-01-24 Kent Tamura <tkent@chromium.org> 2 52 -
trunk/Source/WebCore/GNUmakefile.am
r76459 r76493 1964 1964 Source/WebCore/inspector/InspectorConsoleAgent.cpp \ 1965 1965 Source/WebCore/inspector/InspectorConsoleAgent.h \ 1966 Source/WebCore/inspector/InspectorConsoleInstrumentation.h \ 1966 1967 Source/WebCore/inspector/InspectorCSSAgent.cpp \ 1967 1968 Source/WebCore/inspector/InspectorCSSAgent.h \ 1968 1969 Source/WebCore/inspector/InspectorDatabaseAgent.cpp \ 1969 1970 Source/WebCore/inspector/InspectorDatabaseAgent.h \ 1971 Source/WebCore/inspector/InspectorDatabaseInstrumentation.h \ 1970 1972 Source/WebCore/inspector/InspectorDatabaseResource.cpp \ 1971 1973 Source/WebCore/inspector/InspectorDatabaseResource.h \ -
trunk/Source/WebCore/WebCore.gypi
r76491 r76493 2017 2017 'inspector/InspectorConsoleAgent.cpp', 2018 2018 'inspector/InspectorConsoleAgent.h', 2019 'inspector/InspectorConsoleInstrumentation.h', 2019 2020 'inspector/InspectorController.cpp', 2020 2021 'inspector/InspectorController.h', … … 2023 2024 'inspector/InspectorDatabaseAgent.cpp', 2024 2025 'inspector/InspectorDatabaseAgent.h', 2026 'inspector/InspectorDatabaseInstrumentation.h', 2025 2027 'inspector/InspectorDatabaseResource.cpp', 2026 2028 'inspector/InspectorDatabaseResource.h', -
trunk/Source/WebCore/WebCore.pro
r76466 r76493 1946 1946 inspector/InspectorBrowserDebuggerAgent.h \ 1947 1947 inspector/InspectorConsoleAgent.h \ 1948 inspector/InspectorConsoleInstrumentation.h \ 1948 1949 inspector/InspectorController.h \ 1949 1950 inspector/InspectorCSSAgent.h \ 1950 1951 inspector/InspectorDatabaseAgent.h \ 1952 inspector/InspectorDatabaseInstrumentation.h \ 1951 1953 inspector/InspectorDatabaseResource.h \ 1952 1954 inspector/InspectorDebuggerAgent.h \ -
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
r76459 r76493 65115 65115 </File> 65116 65116 <File 65117 RelativePath="..\inspector\InspectorConsoleInstrumentation.h" 65118 > 65119 </File> 65120 <File 65117 65121 RelativePath="..\inspector\InspectorController.cpp" 65118 65122 > … … 65136 65140 <File 65137 65141 RelativePath="..\inspector\InspectorDatabaseAgent.h" 65142 > 65143 </File> 65144 <File 65145 RelativePath="..\inspector\InspectorDatabaseInstrumentation.h" 65138 65146 > 65139 65147 </File> -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r76478 r76493 932 932 41F0618E0F5F069800A07EAC /* ConsoleMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 41F0618C0F5F069800A07EAC /* ConsoleMessage.h */; }; 933 933 41F0618F0F5F069800A07EAC /* ConsoleMessage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41F0618D0F5F069800A07EAC /* ConsoleMessage.cpp */; }; 934 F3F5CF1312ED81B30084C569 /* InspectorDatabaseInstrumentation.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F5CF1212ED81B30084C569 /* InspectorDatabaseInstrumentation.h */; }; 934 935 41F062140F5F192600A07EAC /* InspectorDatabaseResource.h in Headers */ = {isa = PBXBuildFile; fileRef = 41F062120F5F192600A07EAC /* InspectorDatabaseResource.h */; }; 935 936 41F062150F5F192600A07EAC /* InspectorDatabaseResource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41F062130F5F192600A07EAC /* InspectorDatabaseResource.cpp */; }; … … 5614 5615 F3335BF812E07DC300D33011 /* InspectorConsoleAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F3335BF612E07DC300D33011 /* InspectorConsoleAgent.cpp */; }; 5615 5616 F3335BF912E07DC300D33011 /* InspectorConsoleAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = F3335BF712E07DC300D33011 /* InspectorConsoleAgent.h */; }; 5617 F3F5CF1112ED81A80084C569 /* InspectorConsoleInstrumentation.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F5CF1012ED81A80084C569 /* InspectorConsoleInstrumentation.h */; }; 5616 5618 F33F0282120947F200E5743A /* ScriptProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F33F0281120947F200E5743A /* ScriptProfile.cpp */; }; 5617 5619 F33F053D120B0DA500E5743A /* InspectorDebuggerAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F33F053B120B0DA500E5743A /* InspectorDebuggerAgent.cpp */; }; … … 8110 8112 7AB0B1BE1211A62200A76940 /* InspectorDatabaseAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorDatabaseAgent.cpp; sourceTree = "<group>"; }; 8111 8113 7AB0B1BF1211A62200A76940 /* InspectorDatabaseAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorDatabaseAgent.h; sourceTree = "<group>"; }; 8114 F3F5CF1212ED81B30084C569 /* InspectorDatabaseInstrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorDatabaseInstrumentation.h; sourceTree = "<group>"; }; 8112 8115 7ADE722510CBBB9B006B3B3A /* ContextMenuProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContextMenuProvider.h; sourceTree = "<group>"; }; 8113 8116 7AF11A5912E727490061F23C /* InspectorRuntimeAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorRuntimeAgent.h; sourceTree = "<group>"; }; … … 11977 11980 F3335BF612E07DC300D33011 /* InspectorConsoleAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorConsoleAgent.cpp; sourceTree = "<group>"; }; 11978 11981 F3335BF712E07DC300D33011 /* InspectorConsoleAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorConsoleAgent.h; sourceTree = "<group>"; }; 11982 F3F5CF1012ED81A80084C569 /* InspectorConsoleInstrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorConsoleInstrumentation.h; sourceTree = "<group>"; }; 11979 11983 F33F0281120947F200E5743A /* ScriptProfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptProfile.cpp; sourceTree = "<group>"; }; 11980 11984 F33F053B120B0DA500E5743A /* InspectorDebuggerAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorDebuggerAgent.cpp; sourceTree = "<group>"; }; … … 12983 12987 F3335BF612E07DC300D33011 /* InspectorConsoleAgent.cpp */, 12984 12988 F3335BF712E07DC300D33011 /* InspectorConsoleAgent.h */, 12989 F3F5CF1012ED81A80084C569 /* InspectorConsoleInstrumentation.h */, 12985 12990 1C81B9570E97330800266E07 /* InspectorController.cpp */, 12986 12991 1C81B9560E97330800266E07 /* InspectorController.h */, … … 12989 12994 7AB0B1BE1211A62200A76940 /* InspectorDatabaseAgent.cpp */, 12990 12995 7AB0B1BF1211A62200A76940 /* InspectorDatabaseAgent.h */, 12996 F3F5CF1212ED81B30084C569 /* InspectorDatabaseInstrumentation.h */, 12991 12997 41F062130F5F192600A07EAC /* InspectorDatabaseResource.cpp */, 12992 12998 41F062120F5F192600A07EAC /* InspectorDatabaseResource.h */, … … 20896 20902 1C81B95C0E97330800266E07 /* InspectorClient.h in Headers */, 20897 20903 F3335BF912E07DC300D33011 /* InspectorConsoleAgent.h in Headers */, 20904 F3F5CF1112ED81A80084C569 /* InspectorConsoleInstrumentation.h in Headers */, 20898 20905 1C81B95A0E97330800266E07 /* InspectorController.h in Headers */, 20899 20906 82AB1744124B99EC00C5069D /* InspectorCSSAgent.h in Headers */, 20900 20907 7AB0B1C11211A62200A76940 /* InspectorDatabaseAgent.h in Headers */, 20908 F3F5CF1312ED81B30084C569 /* InspectorDatabaseInstrumentation.h in Headers */, 20901 20909 41F062140F5F192600A07EAC /* InspectorDatabaseResource.h in Headers */, 20902 20910 F33F053E120B0DA500E5743A /* InspectorDebuggerAgent.h in Headers */, -
trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp
r76477 r76493 519 519 } 520 520 521 void InspectorInstrumentation::addMessageToConsoleImpl(InspectorAgent* inspectorAgent, MessageSource source, MessageType type, MessageLevel level, const String& message, ScriptArguments* arguments, ScriptCallStack*callStack)521 void InspectorInstrumentation::addMessageToConsoleImpl(InspectorAgent* inspectorAgent, MessageSource source, MessageType type, MessageLevel level, const String& message, PassRefPtr<ScriptArguments> arguments, PassRefPtr<ScriptCallStack> callStack) 522 522 { 523 523 inspectorAgent->consoleAgent()->addMessageToConsole(source, type, level, message, arguments, callStack); … … 529 529 } 530 530 531 void InspectorInstrumentation::consoleCountImpl(InspectorAgent* inspectorAgent, ScriptArguments* arguments, ScriptCallStack*stack)531 void InspectorInstrumentation::consoleCountImpl(InspectorAgent* inspectorAgent, PassRefPtr<ScriptArguments> arguments, PassRefPtr<ScriptCallStack> stack) 532 532 { 533 533 inspectorAgent->consoleAgent()->count(arguments, stack); … … 539 539 } 540 540 541 void InspectorInstrumentation::stopConsoleTimingImpl(InspectorAgent* inspectorAgent, const String& title, ScriptCallStack*stack)541 void InspectorInstrumentation::stopConsoleTimingImpl(InspectorAgent* inspectorAgent, const String& title, PassRefPtr<ScriptCallStack> stack) 542 542 { 543 543 inspectorAgent->consoleAgent()->stopTiming(title, stack); 544 544 } 545 545 546 void InspectorInstrumentation::consoleMarkTimelineImpl(InspectorAgent* inspectorAgent, ScriptArguments*arguments)546 void InspectorInstrumentation::consoleMarkTimelineImpl(InspectorAgent* inspectorAgent, PassRefPtr<ScriptArguments> arguments) 547 547 { 548 548 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorAgent)) { … … 560 560 } 561 561 562 void InspectorInstrumentation::addProfileImpl(InspectorAgent* inspectorAgent, RefPtr<ScriptProfile> profile, ScriptCallStack*callStack)562 void InspectorInstrumentation::addProfileImpl(InspectorAgent* inspectorAgent, RefPtr<ScriptProfile> profile, PassRefPtr<ScriptCallStack> callStack) 563 563 { 564 564 if (InspectorProfilerAgent* profilerAgent = inspectorAgent->profilerAgent()) { … … 589 589 590 590 #if ENABLE(DATABASE) 591 void InspectorInstrumentation::didOpenDatabaseImpl(InspectorAgent* inspectorAgent, Database*database, const String& domain, const String& name, const String& version)591 void InspectorInstrumentation::didOpenDatabaseImpl(InspectorAgent* inspectorAgent, PassRefPtr<Database> database, const String& domain, const String& name, const String& version) 592 592 { 593 593 inspectorAgent->didOpenDatabase(database, domain, name, version); -
trunk/Source/WebCore/inspector/InspectorInstrumentation.h
r76477 r76493 36 36 #include "Page.h" 37 37 #include "ScriptExecutionContext.h" 38 39 38 #include <wtf/HashMap.h> 40 #include <wtf/PassRefPtr.h>41 39 42 40 namespace WebCore { … … 132 130 static void didWriteHTML(const InspectorInstrumentationCookie&, unsigned int endLine); 133 131 134 static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, ScriptArguments*, ScriptCallStack*);132 static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack>); 135 133 static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String&); 136 static void consoleCount(Page*, ScriptArguments*, ScriptCallStack*);134 static void consoleCount(Page*, PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack>); 137 135 static void startConsoleTiming(Page*, const String& title); 138 static void stopConsoleTiming(Page*, const String& title, ScriptCallStack*);139 static void consoleMarkTimeline(Page*, ScriptArguments*);136 static void stopConsoleTiming(Page*, const String& title, PassRefPtr<ScriptCallStack>); 137 static void consoleMarkTimeline(Page*, PassRefPtr<ScriptArguments>); 140 138 141 139 #if ENABLE(JAVASCRIPT_DEBUGGER) 142 140 static void addStartProfilingMessageToConsole(Page*, const String& title, unsigned lineNumber, const String& sourceURL); 143 static void addProfile(Page*, RefPtr<ScriptProfile>, ScriptCallStack*);141 static void addProfile(Page*, RefPtr<ScriptProfile>, PassRefPtr<ScriptCallStack>); 144 142 static bool profilerEnabled(Page*); 145 143 static String getCurrentUserInitiatedProfileName(Page*, bool incrementProfileNumber); … … 147 145 148 146 #if ENABLE(DATABASE) 149 static void didOpenDatabase(ScriptExecutionContext*, Database*, const String& domain, const String& name, const String& version);147 static void didOpenDatabase(ScriptExecutionContext*, PassRefPtr<Database>, const String& domain, const String& name, const String& version); 150 148 #endif 151 149 … … 244 242 static void didWriteHTMLImpl(const InspectorInstrumentationCookie&, unsigned int endLine); 245 243 246 static void addMessageToConsoleImpl(InspectorAgent*, MessageSource, MessageType, MessageLevel, const String& message, ScriptArguments*, ScriptCallStack*);244 static void addMessageToConsoleImpl(InspectorAgent*, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack>); 247 245 static void addMessageToConsoleImpl(InspectorAgent*, MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String& sourceID); 248 static void consoleCountImpl(InspectorAgent*, ScriptArguments*, ScriptCallStack*);246 static void consoleCountImpl(InspectorAgent*, PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack>); 249 247 static void startConsoleTimingImpl(InspectorAgent*, const String& title); 250 static void stopConsoleTimingImpl(InspectorAgent*, const String& title, ScriptCallStack*);251 static void consoleMarkTimelineImpl(InspectorAgent*, ScriptArguments*);248 static void stopConsoleTimingImpl(InspectorAgent*, const String& title, PassRefPtr<ScriptCallStack>); 249 static void consoleMarkTimelineImpl(InspectorAgent*, PassRefPtr<ScriptArguments>); 252 250 253 251 #if ENABLE(JAVASCRIPT_DEBUGGER) 254 252 static void addStartProfilingMessageToConsoleImpl(InspectorAgent*, const String& title, unsigned lineNumber, const String& sourceURL); 255 static void addProfileImpl(InspectorAgent*, RefPtr<ScriptProfile>, ScriptCallStack*);253 static void addProfileImpl(InspectorAgent*, RefPtr<ScriptProfile>, PassRefPtr<ScriptCallStack>); 256 254 static bool profilerEnabledImpl(InspectorAgent*); 257 255 static String getCurrentUserInitiatedProfileNameImpl(InspectorAgent*, bool incrementProfileNumber); … … 259 257 260 258 #if ENABLE(DATABASE) 261 static void didOpenDatabaseImpl(InspectorAgent*, Database*, const String& domain, const String& name, const String& version);259 static void didOpenDatabaseImpl(InspectorAgent*, PassRefPtr<Database>, const String& domain, const String& name, const String& version); 262 260 #endif 263 261 … … 745 743 } 746 744 747 #if ENABLE(DATABASE)748 inline void InspectorInstrumentation::didOpenDatabase(ScriptExecutionContext* context, Database* database, const String& domain, const String& name, const String& version)749 {750 #if ENABLE(INSPECTOR)751 if (InspectorAgent* inspectorAgent = inspectorAgentForContext(context))752 didOpenDatabaseImpl(inspectorAgent, database, domain, name, version);753 #endif754 }755 #endif756 757 745 #if ENABLE(DOM_STORAGE) 758 746 inline void InspectorInstrumentation::didUseDOMStorage(Page* page, StorageArea* storageArea, bool isLocalStorage, Frame* frame) … … 833 821 updateApplicationCacheStatusImpl(inspectorAgent, frame); 834 822 #endif 835 }836 #endif837 838 inline void InspectorInstrumentation::addMessageToConsole(Page* page, MessageSource source, MessageType type, MessageLevel level, const String& message, ScriptArguments* arguments, ScriptCallStack* callStack)839 {840 #if ENABLE(INSPECTOR)841 if (InspectorAgent* inspectorAgent = inspectorAgentForPage(page))842 addMessageToConsoleImpl(inspectorAgent, source, type, level, message, arguments, callStack);843 #endif844 }845 846 inline void InspectorInstrumentation::addMessageToConsole(Page* page, MessageSource source, MessageType type, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceID)847 {848 #if ENABLE(INSPECTOR)849 if (InspectorAgent* inspectorAgent = inspectorAgentForPage(page))850 addMessageToConsoleImpl(inspectorAgent, source, type, level, message, lineNumber, sourceID);851 #endif852 }853 854 inline void InspectorInstrumentation::consoleCount(Page* page, ScriptArguments* arguments, ScriptCallStack* stack)855 {856 #if ENABLE(INSPECTOR)857 if (InspectorAgent* inspectorAgent = inspectorAgentForPage(page))858 consoleCountImpl(inspectorAgent, arguments, stack);859 #endif860 }861 862 inline void InspectorInstrumentation::startConsoleTiming(Page* page, const String& title)863 {864 #if ENABLE(INSPECTOR)865 if (InspectorAgent* inspectorAgent = inspectorAgentForPage(page))866 startConsoleTimingImpl(inspectorAgent, title);867 #endif868 }869 870 inline void InspectorInstrumentation::stopConsoleTiming(Page* page, const String& title, ScriptCallStack* stack)871 {872 #if ENABLE(INSPECTOR)873 if (InspectorAgent* inspectorAgent = inspectorAgentForPage(page))874 stopConsoleTimingImpl(inspectorAgent, title, stack);875 #endif876 }877 878 inline void InspectorInstrumentation::consoleMarkTimeline(Page* page, ScriptArguments* arguments)879 {880 #if ENABLE(INSPECTOR)881 if (InspectorAgent* inspectorAgent = inspectorAgentWithFrontendForPage(page))882 consoleMarkTimelineImpl(inspectorAgent, arguments);883 #endif884 }885 886 #if ENABLE(JAVASCRIPT_DEBUGGER)887 inline void InspectorInstrumentation::addStartProfilingMessageToConsole(Page* page, const String& title, unsigned lineNumber, const String& sourceURL)888 {889 #if ENABLE(INSPECTOR)890 if (InspectorAgent* inspectorAgent = inspectorAgentForPage(page))891 addStartProfilingMessageToConsoleImpl(inspectorAgent, title, lineNumber, sourceURL);892 #endif893 }894 895 inline void InspectorInstrumentation::addProfile(Page* page, RefPtr<ScriptProfile> profile, ScriptCallStack* callStack)896 {897 #if ENABLE(INSPECTOR)898 if (InspectorAgent* inspectorAgent = inspectorAgentForPage(page))899 addProfileImpl(inspectorAgent, profile, callStack);900 #endif901 }902 903 inline bool InspectorInstrumentation::profilerEnabled(Page* page)904 {905 #if ENABLE(INSPECTOR)906 if (InspectorAgent* inspectorAgent = inspectorAgentForPage(page))907 return profilerEnabledImpl(inspectorAgent);908 #endif909 return false;910 }911 912 inline String InspectorInstrumentation::getCurrentUserInitiatedProfileName(Page* page, bool incrementProfileNumber)913 {914 #if ENABLE(INSPECTOR)915 if (InspectorAgent* inspectorAgent = inspectorAgentForPage(page))916 return InspectorInstrumentation::getCurrentUserInitiatedProfileNameImpl(inspectorAgent, incrementProfileNumber);917 #endif918 return "";919 823 } 920 824 #endif -
trunk/Source/WebCore/page/Console.cpp
r76344 r76493 35 35 #include "FrameLoader.h" 36 36 #include "FrameTree.h" 37 #include "InspectorConsoleInstrumentation.h" 37 38 #include "InspectorController.h" 38 #include "InspectorInstrumentation.h"39 39 #include "MemoryInfo.h" 40 40 #include "Page.h" … … 148 148 149 149 if (callStack) 150 InspectorInstrumentation::addMessageToConsole(page, source, type, level, message, 0, callStack .get());150 InspectorInstrumentation::addMessageToConsole(page, source, type, level, message, 0, callStack); 151 151 else 152 152 InspectorInstrumentation::addMessageToConsole(page, source, type, level, message, lineNumber, sourceURL); … … 161 161 } 162 162 163 void Console::addMessage(MessageType type, MessageLevel level, PassRefPtr<ScriptArguments> arguments, PassRefPtr<ScriptCallStack> callStack, bool acceptNoArguments) 164 { 163 void Console::addMessage(MessageType type, MessageLevel level, PassRefPtr<ScriptArguments> prpArguments, PassRefPtr<ScriptCallStack> prpCallStack, bool acceptNoArguments) 164 { 165 RefPtr<ScriptArguments> arguments = prpArguments; 166 RefPtr<ScriptCallStack> callStack = prpCallStack; 167 165 168 Page* page = this->page(); 166 169 if (!page) … … 188 191 page->chrome()->client()->addMessageToConsole(JSMessageSource, type, level, message, lastCaller.lineNumber(), lastCaller.sourceURL()); 189 192 190 InspectorInstrumentation::addMessageToConsole(page, JSMessageSource, type, level, message, arguments .get(), callStack.get());193 InspectorInstrumentation::addMessageToConsole(page, JSMessageSource, type, level, message, arguments, callStack); 191 194 } 192 195 … … 223 226 } 224 227 225 void Console::trace(PassRefPtr<ScriptArguments> arguments, PassRefPtr<ScriptCallStack> callStack) 226 { 228 void Console::trace(PassRefPtr<ScriptArguments> arguments, PassRefPtr<ScriptCallStack> prpCallStack) 229 { 230 RefPtr<ScriptCallStack> callStack = prpCallStack; 227 231 addMessage(TraceMessageType, LogMessageLevel, arguments, callStack, true); 228 232 … … 247 251 void Console::count(PassRefPtr<ScriptArguments> arguments, PassRefPtr<ScriptCallStack> callStack) 248 252 { 249 InspectorInstrumentation::consoleCount(page(), arguments .get(), callStack.get());253 InspectorInstrumentation::consoleCount(page(), arguments, callStack); 250 254 } 251 255 252 256 void Console::markTimeline(PassRefPtr<ScriptArguments> arguments, PassRefPtr<ScriptCallStack>) 253 257 { 254 InspectorInstrumentation::consoleMarkTimeline(page(), arguments .get());258 InspectorInstrumentation::consoleMarkTimeline(page(), arguments); 255 259 } 256 260 … … 291 295 292 296 m_profiles.append(profile); 293 InspectorInstrumentation::addProfile(page, profile, callStack .get());297 InspectorInstrumentation::addProfile(page, profile, callStack); 294 298 } 295 299 … … 303 307 void Console::timeEnd(const String& title, PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack> callStack) 304 308 { 305 InspectorInstrumentation::stopConsoleTiming(page(), title, callStack .get());309 InspectorInstrumentation::stopConsoleTiming(page(), title, callStack); 306 310 } 307 311 308 312 void Console::group(PassRefPtr<ScriptArguments> arguments, PassRefPtr<ScriptCallStack> callStack) 309 313 { 310 InspectorInstrumentation::addMessageToConsole(page(), JSMessageSource, StartGroupMessageType, LogMessageLevel, String(), arguments .get(), callStack.get());314 InspectorInstrumentation::addMessageToConsole(page(), JSMessageSource, StartGroupMessageType, LogMessageLevel, String(), arguments, callStack); 311 315 } 312 316 313 317 void Console::groupCollapsed(PassRefPtr<ScriptArguments> arguments, PassRefPtr<ScriptCallStack> callStack) 314 318 { 315 InspectorInstrumentation::addMessageToConsole(page(), JSMessageSource, StartGroupCollapsedMessageType, LogMessageLevel, String(), arguments .get(), callStack.get());319 InspectorInstrumentation::addMessageToConsole(page(), JSMessageSource, StartGroupCollapsedMessageType, LogMessageLevel, String(), arguments, callStack); 316 320 } 317 321 -
trunk/Source/WebCore/storage/Database.cpp
r75932 r76493 37 37 #include "DatabaseTracker.h" 38 38 #include "Document.h" 39 #include "Inspector Instrumentation.h"39 #include "InspectorDatabaseInstrumentation.h" 40 40 #include "Logging.h" 41 41 #include "NotImplemented.h" … … 108 108 context->setHasOpenDatabases(); 109 109 110 InspectorInstrumentation::didOpenDatabase(context, database .get(), context->securityOrigin()->host(), name, expectedVersion);110 InspectorInstrumentation::didOpenDatabase(context, database, context->securityOrigin()->host(), name, expectedVersion); 111 111 112 112 // If it's a new database and a creation callback was provided, reset the expected
Note: See TracChangeset
for help on using the changeset viewer.