WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
126082
Web Inspector: Give the CommandLineAPIModule its own Host object, making InjectedScriptHost viable for a JS Context
https://bugs.webkit.org/show_bug.cgi?id=126082
Summary
Web Inspector: Give the CommandLineAPIModule its own Host object, making Inje...
Joseph Pecoraro
Reported
2013-12-20 14:04:57 PST
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.
Attachments
[PATCH] Proposed Fix
(77.41 KB, patch)
2013-12-20 14:12 PST
,
Joseph Pecoraro
timothy
: review+
eflews.bot
: commit-queue-
Details
Formatted Diff
Diff
[PATCH] For Bots 1
(81.11 KB, patch)
2013-12-20 15:05 PST
,
Joseph Pecoraro
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2013-12-20 14:05:19 PST
<
rdar://problem/15711441
>
Joseph Pecoraro
Comment 2
2013-12-20 14:12:18 PST
Created
attachment 219793
[details]
[PATCH] Proposed Fix
WebKit Commit Bot
Comment 3
2013-12-20 14:15:43 PST
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.
Joseph Pecoraro
Comment 4
2013-12-20 15:05:23 PST
Created
attachment 219799
[details]
[PATCH] For Bots 1 Forgot to add CommandLineAPIHost.h/cpp to non-mac build files.
WebKit Commit Bot
Comment 5
2013-12-20 15:07:15 PST
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.
EFL EWS Bot
Comment 6
2013-12-20 15:56:29 PST
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
Joseph Pecoraro
Comment 7
2013-12-20 16:41:37 PST
Committed
r160946
<
http://trac.webkit.org/changeset/160946
>.
Csaba Osztrogonác
Comment 8
2013-12-21 14:25:46 PST
(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.
Joseph Pecoraro
Comment 9
2013-12-26 10:28:58 PST
Thanks, attempted a Windows build fix in: <
http://trac.webkit.org/changeset/161091
> Seems good.
Brent Fulgham
Comment 10
2013-12-26 22:45:52 PST
(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
Joseph Pecoraro
Comment 11
2013-12-27 09:05:46 PST
> 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
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug