RESOLVED FIXED 150525
Expose more information about the exception in WKErrorJavaScriptExceptionOccurred errors
https://bugs.webkit.org/show_bug.cgi?id=150525
Summary Expose more information about the exception in WKErrorJavaScriptExceptionOccu...
Tim Horton
Reported 2015-10-23 17:54:43 PDT
Expose more information about the exception in WKErrorJavaScriptExceptionOccurred errors
Attachments
Patch (43.28 KB, patch)
2015-10-23 17:56 PDT, Tim Horton
no flags
Patch (43.22 KB, patch)
2015-10-23 18:10 PDT, Tim Horton
darin: review+
Tim Horton
Comment 1 2015-10-23 17:56:03 PDT
Radar WebKit Bug Importer
Comment 2 2015-10-23 17:56:46 PDT
WebKit Commit Bot
Comment 3 2015-10-23 17:58:10 PDT
Attachment 263970 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/WebPageProxy.cpp:2591: Extra space before ( in function call [whitespace/parens] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewEvaluateJavaScript.mm:97: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewEvaluateJavaScript.mm:116: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/WebKit2/UIProcess/WebPageProxy.h:766: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 4 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
Tim Horton
Comment 4 2015-10-23 18:10:59 PDT
WebKit Commit Bot
Comment 5 2015-10-23 18:13:44 PDT
Attachment 263971 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/WebPageProxy.cpp:2591: Extra space before ( in function call [whitespace/parens] [4] ERROR: Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewEvaluateJavaScript.mm:112: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/WebKit2/UIProcess/WebPageProxy.h:766: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 3 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
mitz
Comment 6 2015-10-24 15:26:05 PDT
Comment on attachment 263971 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=263971&action=review > Source/WebKit2/UIProcess/API/Cocoa/WKErrorPrivate.h:50 > + the exception source URL (as an NSString) for WKErrorJavaScriptExceptionOccurred errors. */ Why not as an NSURL? > Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:654 > + A14FC5831B89739100D107EB /* WKWebViewConfigurationExtras.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WKWebViewConfigurationExtras.mm; path = ../../WKWebViewConfigurationExtras.mm; sourceTree = "<group>"; }; > + A14FC5841B89739100D107EB /* WKWebViewConfigurationExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WKWebViewConfigurationExtras.h; path = ../../WKWebViewConfigurationExtras.h; sourceTree = "<group>"; }; > A14FC5861B8991B600D107EB /* ContentFiltering.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ContentFiltering.mm; sourceTree = "<group>"; }; > A14FC5891B89927100D107EB /* ContentFilteringPlugIn.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ContentFilteringPlugIn.mm; sourceTree = "<group>"; }; > - A14FC58D1B8AE36500D107EB /* TestProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestProtocol.h; path = cocoa/TestProtocol.h; sourceTree = "<group>"; }; > - A14FC58E1B8AE36500D107EB /* TestProtocol.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TestProtocol.mm; path = cocoa/TestProtocol.mm; sourceTree = "<group>"; }; > + A14FC58D1B8AE36500D107EB /* TestProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestProtocol.h; path = ../../cocoa/TestProtocol.h; sourceTree = "<group>"; }; > + A14FC58E1B8AE36500D107EB /* TestProtocol.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TestProtocol.mm; path = ../../cocoa/TestProtocol.mm; sourceTree = "<group>"; }; ?? > Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:981 > - path = cocoa/WebProcessPlugIn; > + path = ../../cocoa/WebProcessPlugIn; ??
Darin Adler
Comment 7 2015-10-24 16:00:04 PDT
Comment on attachment 263971 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=263971&action=review >> Source/WebKit2/UIProcess/API/Cocoa/WKErrorPrivate.h:50 >> + the exception source URL (as an NSString) for WKErrorJavaScriptExceptionOccurred errors. */ > > Why not as an NSURL? Excellent question. > Source/WebKit2/UIProcess/WebPageProxy.cpp:2594 > + callbackFunction(nullptr, false, ExceptionDetails(), CallbackBase::Error::Unknown); Sometimes I like to use { } instead of ExceptionDetails() at a call site like this one. Or possibly ExceptionDetails{ }. > Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:649 > + A14FC5831B89739100D107EB /* WKWebViewConfigurationExtras.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WKWebViewConfigurationExtras.mm; path = ../../WKWebViewConfigurationExtras.mm; sourceTree = "<group>"; }; As Dan noted below, I see a lot of changes like this and it does not seem good.
Tim Horton
Comment 8 2015-10-24 18:12:50 PDT
(In reply to comment #7) > Comment on attachment 263971 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=263971&action=review > > >> Source/WebKit2/UIProcess/API/Cocoa/WKErrorPrivate.h:50 > >> + the exception source URL (as an NSString) for WKErrorJavaScriptExceptionOccurred errors. */ > > > > Why not as an NSURL? > > Excellent question. Will fix! > > Source/WebKit2/UIProcess/WebPageProxy.cpp:2594 > > + callbackFunction(nullptr, false, ExceptionDetails(), CallbackBase::Error::Unknown); > > Sometimes I like to use { } instead of ExceptionDetails() at a call site > like this one. Or possibly ExceptionDetails{ }. I hadn't picked up that trick yet, but I like it! > > Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:649 > > + A14FC5831B89739100D107EB /* WKWebViewConfigurationExtras.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WKWebViewConfigurationExtras.mm; path = ../../WKWebViewConfigurationExtras.mm; sourceTree = "<group>"; }; > > As Dan noted below, I see a lot of changes like this and it does not seem > good. This was actually semi-intentional, but I'll do it in another patch. The XCode project has duplicate groups (cocoa and Cocoa) in one place.
Tim Horton
Comment 9 2015-10-24 22:38:34 PDT
Tim Horton
Comment 10 2015-10-24 23:15:15 PDT
Tim Horton
Comment 11 2015-10-24 23:37:12 PDT
(In reply to comment #10) > Something bad is happening: > https://build.webkit.org/builders/ > Apple%20El%20Capitan%20Release%20WK2%20%28Tests%29/builds/680/steps/run-api- > tests/logs/stdio > > Building release to see if I can reproduce. Weird? In a subsequent build it's complaining about something *else* I added to the API in another patch (http://trac.webkit.org/changeset/191545).
Tim Horton
Comment 12 2015-10-24 23:37:46 PDT
(In reply to comment #11) > (In reply to comment #10) > > Something bad is happening: > > https://build.webkit.org/builders/ > > Apple%20El%20Capitan%20Release%20WK2%20%28Tests%29/builds/680/steps/run-api- > > tests/logs/stdio > > > > Building release to see if I can reproduce. > > Weird? In a subsequent build it's complaining about something *else* I added > to the API in another patch (http://trac.webkit.org/changeset/191545). And neither of these reproduce locally.
Tim Horton
Comment 13 2015-10-24 23:40:47 PDT
(In reply to comment #10) > Something bad is happening: > https://build.webkit.org/builders/ > Apple%20El%20Capitan%20Release%20WK2%20%28Tests%29/builds/680/steps/run-api- > tests/logs/stdio > > Building release to see if I can reproduce. Also not happening on Yosemite bots :( I don't get it.
mitz
Comment 14 2015-10-24 23:42:27 PDT
(In reply to comment #10) > Something bad is happening: > https://build.webkit.org/builders/ > Apple%20El%20Capitan%20Release%20WK2%20%28Tests%29/builds/680/steps/run-api- > tests/logs/stdio > > Building release to see if I can reproduce. Is there any way to see the full build log?
mitz
Comment 15 2015-10-24 23:48:30 PDT
Looks like System Integrity Protection is making TestWebKitAPI use WebKit from /System/Library/Frameworks instead of from the archive.
Tim Horton
Comment 16 2015-10-25 00:10:01 PDT
(In reply to comment #15) > Looks like System Integrity Protection is making TestWebKitAPI use WebKit > from /System/Library/Frameworks instead of from the archive. Wow! I'm surprised that hasn't come up before!
mitz
Comment 17 2015-10-25 09:33:32 PDT
(In reply to comment #16) > (In reply to comment #15) > > Looks like System Integrity Protection is making TestWebKitAPI use WebKit > > from /System/Library/Frameworks instead of from the archive. > > Wow! I'm surprised that hasn't come up before! It has come up before and <http://trac.webkit.org/r190412> was supposed to take care of it.
Alexey Proskuryakov
Comment 18 2015-10-25 10:57:02 PDT
There must be another location that I missed - it's failing when generating a list of tests to run, not when running the tests.
Note You need to log in before you can comment on or make changes to this bug.