Currently some InjectedScriptHost functions know about things like Databases, DOMStorage, etc. We just moved the logic for this into the CommandLineAPIModule. So put the relevant functions onto a CommandLineAPIHost object. This way, when InjectedScriptHost is pushed down into JavaScriptCore it can be implemented without knowledge of any WebCore / DOM types.
<rdar://problem/15711441>
Created attachment 219793 [details] [PATCH] Proposed Fix
Attachment 219793 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/WebCore/ChangeLog', u'Source/WebCore/DerivedSources.cpp', u'Source/WebCore/DerivedSources.make', u'Source/WebCore/GNUmakefile.list.am', u'Source/WebCore/UseJSC.cmake', u'Source/WebCore/WebCore.vcxproj/WebCore.vcxproj', u'Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters', u'Source/WebCore/WebCore.xcodeproj/project.pbxproj', u'Source/WebCore/bindings/js/JSBindingsAllInOne.cpp', u'Source/WebCore/bindings/js/JSCommandLineAPIHostCustom.cpp', u'Source/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp', u'Source/WebCore/inspector/CommandLineAPIHost.cpp', u'Source/WebCore/inspector/CommandLineAPIHost.h', u'Source/WebCore/inspector/CommandLineAPIHost.idl', u'Source/WebCore/inspector/CommandLineAPIModule.cpp', u'Source/WebCore/inspector/CommandLineAPIModule.h', u'Source/WebCore/inspector/CommandLineAPIModuleSource.js', u'Source/WebCore/inspector/InjectedScriptCanvasModule.cpp', u'Source/WebCore/inspector/InjectedScriptCanvasModule.h', u'Source/WebCore/inspector/InjectedScriptHost.cpp', u'Source/WebCore/inspector/InjectedScriptHost.h', u'Source/WebCore/inspector/InjectedScriptHost.idl', u'Source/WebCore/inspector/InjectedScriptManager.cpp', u'Source/WebCore/inspector/InjectedScriptManager.h', u'Source/WebCore/inspector/InjectedScriptModule.cpp', u'Source/WebCore/inspector/InjectedScriptModule.h', u'Source/WebCore/inspector/InjectedScriptSource.js', u'Source/WebCore/inspector/InspectorConsoleAgent.cpp', u'Source/WebCore/inspector/InspectorController.cpp', u'Source/WebCore/inspector/InspectorHeapProfilerAgent.cpp', u'Source/WebCore/inspector/InspectorProfilerAgent.cpp', u'Source/WebCore/inspector/PageConsoleAgent.cpp', u'Source/WebCore/inspector/PageInjectedScriptManager.cpp', u'Source/WebCore/inspector/PageInjectedScriptManager.h', u'Source/WebCore/inspector/WorkerInspectorController.cpp', '--commit-queue']" exit_code: 1 ERROR: Source/WebCore/bindings/js/JSBindingsAllInOne.cpp:46: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/inspector/InjectedScriptHost.h:35: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/bindings/js/JSCommandLineAPIHostCustom.cpp:37: You should not add a blank line before implementation file's own header. [build/include_order] [4] ERROR: Source/WebCore/inspector/CommandLineAPIHost.h:68: When wrapping a line, only indent 4 spaces. [whitespace/indent] [3] ERROR: Source/WebCore/inspector/CommandLineAPIHost.h:98: Omit int when using unsigned [runtime/unsigned] [1] ERROR: Source/WebCore/inspector/PageInjectedScriptManager.h:37: The parameter name "accessCheck" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 6 in 33 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 219799 [details] [PATCH] For Bots 1 Forgot to add CommandLineAPIHost.h/cpp to non-mac build files.
Attachment 219799 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/WebCore/ChangeLog', u'Source/WebCore/DerivedSources.cpp', u'Source/WebCore/DerivedSources.make', u'Source/WebCore/GNUmakefile.list.am', u'Source/WebCore/UseJSC.cmake', u'Source/WebCore/WebCore.vcxproj/WebCore.vcxproj', u'Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters', u'Source/WebCore/WebCore.xcodeproj/project.pbxproj', u'Source/WebCore/bindings/js/JSBindingsAllInOne.cpp', u'Source/WebCore/bindings/js/JSCommandLineAPIHostCustom.cpp', u'Source/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp', u'Source/WebCore/inspector/CommandLineAPIHost.cpp', u'Source/WebCore/inspector/CommandLineAPIHost.h', u'Source/WebCore/inspector/CommandLineAPIHost.idl', u'Source/WebCore/inspector/CommandLineAPIModule.cpp', u'Source/WebCore/inspector/CommandLineAPIModule.h', u'Source/WebCore/inspector/CommandLineAPIModuleSource.js', u'Source/WebCore/inspector/InjectedScriptCanvasModule.cpp', u'Source/WebCore/inspector/InjectedScriptCanvasModule.h', u'Source/WebCore/inspector/InjectedScriptHost.cpp', u'Source/WebCore/inspector/InjectedScriptHost.h', u'Source/WebCore/inspector/InjectedScriptHost.idl', u'Source/WebCore/inspector/InjectedScriptManager.cpp', u'Source/WebCore/inspector/InjectedScriptManager.h', u'Source/WebCore/inspector/InjectedScriptModule.cpp', u'Source/WebCore/inspector/InjectedScriptModule.h', u'Source/WebCore/inspector/InjectedScriptSource.js', u'Source/WebCore/inspector/InspectorConsoleAgent.cpp', u'Source/WebCore/inspector/InspectorController.cpp', u'Source/WebCore/inspector/InspectorHeapProfilerAgent.cpp', u'Source/WebCore/inspector/InspectorProfilerAgent.cpp', u'Source/WebCore/inspector/PageConsoleAgent.cpp', u'Source/WebCore/inspector/PageInjectedScriptManager.cpp', u'Source/WebCore/inspector/PageInjectedScriptManager.h', u'Source/WebCore/inspector/WorkerInspectorController.cpp', '--commit-queue']" exit_code: 1 ERROR: Source/WebCore/bindings/js/JSCommandLineAPIHostCustom.cpp:37: You should not add a blank line before implementation file's own header. [build/include_order] [4] ERROR: Source/WebCore/inspector/CommandLineAPIHost.h:68: When wrapping a line, only indent 4 spaces. [whitespace/indent] [3] Total errors found: 2 in 33 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 219793 [details] [PATCH] Proposed Fix Attachment 219793 [details] did not pass efl-wk2-ews (efl-wk2): Output: http://webkit-queues.appspot.com/results/49668019
Committed r160946 <http://trac.webkit.org/changeset/160946>.
(In reply to comment #7) > Committed r160946 <http://trac.webkit.org/changeset/160946>. FYI, it broke the Apple Windows build: 1>c:\cygwin\home\buildbot\slave\win-release\build\webkitbuild\release\include\private\javascriptcore\X86Assembler.h(2343): warning C4309: 'argument' : truncation of constant value 1>c:\cygwin\home\buildbot\slave\win-release\build\source\webcore\inspector\InjectedScript.cpp(116): error C2872: 'PropertyDescriptor' : ambiguous symbol could be 'C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\include\private\JavaScriptCore/InspectorJSTypeBuilders.h(973) : Inspector::TypeBuilder::Runtime::PropertyDescriptor' or 'c:\cygwin\home\buildbot\slave\win-release\build\webkitbuild\release\include\private\javascriptcore\PropertyDescriptor.h(37) : JSC::PropertyDescriptor' 1>c:\cygwin\home\buildbot\slave\win-release\build\source\webcore\inspector\InjectedScript.cpp(128): error C2872: 'PropertyDescriptor' : ambiguous symbol could be 'C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\include\private\JavaScriptCore/InspectorJSTypeBuilders.h(973) : Inspector::TypeBuilder::Runtime::PropertyDescriptor' or 'c:\cygwin\home\buildbot\slave\win-release\build\webkitbuild\release\include\private\javascriptcore\PropertyDescriptor.h(37) : JSC::PropertyDescriptor' 1>c:\cygwin\home\buildbot\slave\win-release\build\source\webcore\inspector\InjectedScript.cpp(171): error C2872: 'CallFrame' : ambiguous symbol could be 'C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\include\private\JavaScriptCore/InspectorJSTypeBuilders.h(377) : Inspector::TypeBuilder::Debugger::CallFrame' or 'c:\cygwin\home\buildbot\slave\win-release\build\webkitbuild\release\include\private\javascriptcore\Register.h(45) : JSC::CallFrame' 1>c:\cygwin\home\buildbot\slave\win-release\build\source\webcore\inspector\InjectedScript.cpp(181): error C2872: 'CallFrame' : ambiguous symbol could be 'C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\include\private\JavaScriptCore/InspectorJSTypeBuilders.h(377) : Inspector::TypeBuilder::Debugger::CallFrame' or 'c:\cygwin\home\buildbot\slave\win-release\build\webkitbuild\release\include\private\javascriptcore\Register.h(45) : JSC::CallFrame' 1>c:\cygwin\home\buildbot\slave\win-release\build\source\webcore\inspector\InjectedScript.cpp(182): error C2872: 'CallFrame' : ambiguous symbol could be 'C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\include\private\JavaScriptCore/InspectorJSTypeBuilders.h(377) : Inspector::TypeBuilder::Debugger::CallFrame' or 'c:\cygwin\home\buildbot\slave\win-release\build\webkitbuild\release\include\private\javascriptcore\Register.h(45) : JSC::CallFrame' 1>Done Building Project "C:\cygwin\home\buildbot\slave\win-release\build\Source\WebCore\WebCore.vcxproj\WebCore.vcxproj" (Build target(s)) -- FAILED. Build FAILED.
Thanks, attempted a Windows build fix in: <http://trac.webkit.org/changeset/161091> Seems good.
(In reply to comment #9) > Thanks, attempted a Windows build fix in: > <http://trac.webkit.org/changeset/161091> > > Seems good. I'm still seeing a build error because CommandLineAPIHost symbols aren't being included in the build. I can see the CommandLiheAPIHost.cpp file being included in the project file (WebCore.vcxproj and WebCore.vcxproj.filters), but it is set with the "ExcludeFromBuild" flag set to 'true'. This prevents the file from being compiled. We usually do this when we have an "...AllInOne.cpp" file that will actually build the source code. It looks like this used to be the case in its old location, but it is not part of any such file in the new one. I think you just need to add the following line to Souce/WebCore/inspector/InspectorAllInOne.cpp: #include "CommandLineAPIHost.cpp" Thanks! -Brent
> I think you just need to add the following line to Souce/WebCore/inspector/InspectorAllInOne.cpp: > > #include "CommandLineAPIHost.cpp" > > Thanks! Good point! Argh. Landed that in: <http://trac.webkit.org/changeset/161102>