RESOLVED FIXED Bug 150810
[Win] Minibrowser unable to use WebInspector (CRASH)
https://bugs.webkit.org/show_bug.cgi?id=150810
Summary [Win] Minibrowser unable to use WebInspector (CRASH)
Brent Fulgham
Reported 2015-11-02 11:26:52 PST
I'm encountering the following crash when attempting to use the WebInspector in MiniBrowser: 'MiniBrowser.exe' (Win32): Loaded 'C:\Windows\System32\rasadhlp.dll'. Symbols loaded. Failed to parse/execute InjectedScriptSource.js! "//# sourceURL=__WebInspectorInjectedScript__" ?(function(InjectedScriptHost,inspectedGlobalObject,injectedScriptId){var Object={}.constructor;function toString(obj)?{return String(obj);}?function toStringDescription(obj)?{if(obj===0&&1/obj<0)?return"-0";return toString(obj);}?function isUInt32(obj)?{if(typeof obj==="number")?return obj>>>0===obj&&(obj>0||1/obj>0);return""+(obj>>>0)===obj;}?function isSymbol(obj)?{return typeof obj==="symbol";}?var InjectedScript=function()?{this._lastBoundObjectId=1;this._idToWrappedObject={};this._idToObjectGroupName={};this._objectGroups={};this._modules={};this._nextSavedResultIndex=1;this._savedResults=[];}?InjectedScript.primitiveTypes={undefined:true,boolean:true,number:true,string:true,}?InjectedScript.CollectionMode={OwnProperties:1<<0,NativeGetterProperties:1<<1,AllProperties:1<<2,}?InjectedScript.prototype={isPrimitiveValue:function(object)?{return InjectedScript.primitiveTypes[typeof object]&&!this._isHTMLAllCollection(object);},wrapObject:function(object,groupN1 00007FFC2880B2EF
Attachments
Patch (2.37 KB, patch)
2015-11-02 15:25 PST, Brent Fulgham
timothy: review+
Radar WebKit Bug Importer
Comment 1 2015-11-02 11:27:43 PST
Joseph Pecoraro
Comment 2 2015-11-02 13:10:44 PST
This is emitted by InjectedScriptManager::injectedScriptFor normally when InjectedScriptSource.js has a parse error. Here is one possible issue: JavaScriptCore's DerivedSource.make / CMakeLists.txt attempts to minify the InjectedScriptSource and in the process injects the sourceURL comment that would have been stripped: COMMAND echo "//# sourceURL=__WebInspectorInjectedScript__" > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js Perhaps that is not doing what we expect on Windows? Did Windows just move to CMake?
Brent Fulgham
Comment 3 2015-11-02 13:32:34 PST
(In reply to comment #2) > This is emitted by InjectedScriptManager::injectedScriptFor normally when > InjectedScriptSource.js has a parse error. > > Here is one possible issue: > > JavaScriptCore's DerivedSource.make / CMakeLists.txt attempts to minify the > InjectedScriptSource and in the process injects the sourceURL comment that > would have been stripped: > > COMMAND echo "//# sourceURL=__WebInspectorInjectedScript__" > > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js > > Perhaps that is not doing what we expect on Windows? Did Windows just move > to CMake? Yes it did! That may very well be the problem.
Brent Fulgham
Comment 4 2015-11-02 13:54:33 PST
It looks like this problem was introduced right around the time we switched Windows over to CMake.
Brent Fulgham
Comment 5 2015-11-02 15:20:52 PST
It looks like this command: COMMAND echo "//# sourceURL=__WebInspectorInjectedScript__" ... is inserting quotes into the JS file, which is causing a parse error.
Brent Fulgham
Comment 6 2015-11-02 15:25:21 PST
Joseph Pecoraro
Comment 7 2015-11-02 15:38:36 PST
Comment on attachment 264637 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=264637&action=review > Source/JavaScriptCore/CMakeLists.txt:1277 > - COMMAND echo "//# sourceURL=__WebInspectorInjectedScript__" > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js > + COMMAND ${CMAKE_COMMAND} -E echo "//# sourceURL=__WebInspectorInjectedScript__" > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js We should therefore do the same to WebCore: COMMAND echo "//# sourceURL=__WebInspectorCommandLineAPIModuleSource__" > ${DERIVED_SOURCES_WEBCORE_DIR}/CommandLineAPIModuleSource.min.js
Brent Fulgham
Comment 8 2015-11-02 15:52:41 PST
Note You need to log in before you can comment on or make changes to this bug.