REOPENED176065
Switch HTMLMediaElement to release logging
https://bugs.webkit.org/show_bug.cgi?id=176065
Summary Switch HTMLMediaElement to release logging
Eric Carlson
Reported 2017-08-29 14:07:03 PDT
Switch HTMLMediaElement to release logging
Attachments
Proposed patch. (64.45 KB, patch)
2017-08-30 14:55 PDT, Eric Carlson
no flags
Updated patch. (64.83 KB, patch)
2017-08-30 15:27 PDT, Eric Carlson
no flags
Patch for landing. (71.94 KB, patch)
2017-08-30 21:17 PDT, Eric Carlson
no flags
Patch for landing. (74.99 KB, patch)
2017-08-31 08:57 PDT, Eric Carlson
buildbot: commit-queue-
Archive of layout-test-results from ews115 for mac-elcapitan (2.15 MB, application/zip)
2017-08-31 10:41 PDT, Build Bot
no flags
Another patch. (76.67 KB, patch)
2017-08-31 10:51 PDT, Eric Carlson
no flags
Another patch. (76.58 KB, patch)
2017-08-31 11:15 PDT, Eric Carlson
no flags
Patch for landing. (76.42 KB, patch)
2017-08-31 12:26 PDT, Eric Carlson
no flags
Patch. (80.17 KB, patch)
2017-09-01 11:49 PDT, Eric Carlson
commit-queue: commit-queue-
Patch. (80.17 KB, patch)
2017-09-01 12:58 PDT, Eric Carlson
no flags
Patch for landing. (80.56 KB, patch)
2017-09-04 16:55 PDT, Eric Carlson
no flags
Eric Carlson
Comment 1 2017-08-30 14:55:27 PDT
Created attachment 319410 [details] Proposed patch.
Jer Noble
Comment 2 2017-08-30 15:00:45 PDT
Comment on attachment 319410 [details] Proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=319410&action=review > Source/WTF/wtf/MediaTime.h:32 > +#include <pal/Logger.h> Is there a way to do this without pulling the Logger.h header into the MediaTime.h header? MediaTime.h is included everywhere in WebCore, and this would mean Logger.h is also included everywhere in WebCore. > Source/WebCore/dom/Document.h:56 > +#include <pal/Logger.h> Here too. Can't we just forward declare Logger?
Eric Carlson
Comment 3 2017-08-30 15:27:48 PDT
Created attachment 319414 [details] Updated patch.
Jer Noble
Comment 4 2017-08-30 15:31:32 PDT
Comment on attachment 319414 [details] Updated patch. View in context: https://bugs.webkit.org/attachment.cgi?id=319414&action=review > Source/WebCore/html/HTMLMediaElement.h:41 > +#include <pal/Logger.h> nit: I assume this is needed for the "private PAL::LogHelper" subclass. Can we pull that out into its own file?
Eric Carlson
Comment 5 2017-08-30 21:17:56 PDT
Created attachment 319443 [details] Patch for landing.
Eric Carlson
Comment 6 2017-08-31 08:57:06 PDT
Created attachment 319464 [details] Patch for landing.
Build Bot
Comment 7 2017-08-31 08:59:03 PDT
Attachment 319464 [details] did not pass style-queue: ERROR: Tools/TestWebKitAPI/Tests/WebCore/Logging.cpp:29: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 12 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 8 2017-08-31 10:41:03 PDT
Comment on attachment 319464 [details] Patch for landing. Attachment 319464 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4417119 New failing tests: media/media-source/media-source-sequence-timestamps.html media/media-source/media-source-seek-back.html media/media-source/media-source-overlapping-append.html media/media-source/media-source-overlapping-decodetime.html media/media-source/media-source-timeoffset.html
Build Bot
Comment 9 2017-08-31 10:41:06 PDT
Created attachment 319476 [details] Archive of layout-test-results from ews115 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Eric Carlson
Comment 10 2017-08-31 10:51:10 PDT
Created attachment 319480 [details] Another patch.
Eric Carlson
Comment 11 2017-08-31 11:15:05 PDT
Created attachment 319482 [details] Another patch.
Eric Carlson
Comment 12 2017-08-31 12:26:51 PDT
Created attachment 319497 [details] Patch for landing.
Eric Carlson
Comment 13 2017-08-31 14:12:18 PDT
The Windows failure is unrelated to this patch: C:\cygwin\home\buildbot\WebKit\Source\JavaScriptCore\runtime\JSGlobalObjectFunctions.cpp(137): error C2065: 'U8_MAX_LENGTH': undeclared identifier [C:\cygwin\home\buildbot\WebKit\WebKitBuild\Release\Source\JavaScriptCore\JavaScriptCore.vcxproj]
Alexey Proskuryakov
Comment 14 2017-08-31 14:33:54 PDT
CC Per Arne: is this a flaky build failure on Windows? The patch failed to build, but trunk built successfully after unapplying.
WebKit Commit Bot
Comment 15 2017-08-31 14:41:04 PDT
Comment on attachment 319497 [details] Patch for landing. Clearing flags on attachment: 319497 Committed r221445: <http://trac.webkit.org/changeset/221445>
Per Arne Vollan
Comment 16 2017-08-31 14:43:24 PDT
(In reply to Alexey Proskuryakov from comment #14) > CC Per Arne: is this a flaky build failure on Windows? The patch failed to > build, but trunk built successfully after unapplying. I would think so, the build failure seems unrelated.
Ryan Haddad
Comment 17 2017-08-31 16:09:27 PDT
This change broke Sierra Release builds: /Volumes/Data/slave/sierra-release/build/Source/WebCore/html/HTMLMediaElement.cpp:193:22: error: static declaration of 'LogMedia' follows non-static declaration https://build.webkit.org/builders/Apple%20Sierra%20Release%20%28Build%29/builds/4614
Ryan Haddad
Comment 18 2017-08-31 16:25:51 PDT
Reverted r221445 for reason: This change broke Sierra Release builds. Committed r221455: <http://trac.webkit.org/changeset/221455>
Eric Carlson
Comment 19 2017-09-01 11:49:46 PDT
WebKit Commit Bot
Comment 20 2017-09-01 12:38:45 PDT
Comment on attachment 319626 [details] Patch. Rejecting attachment 319626 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'validate-changelog', '--check-oops', '--non-interactive', 319626, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit ChangeLog entry in Tools/ChangeLog contains OOPS!. Full output: http://webkit-queues.webkit.org/results/4428197
Eric Carlson
Comment 21 2017-09-01 12:58:14 PDT
WebKit Commit Bot
Comment 22 2017-09-01 13:40:15 PDT
Comment on attachment 319634 [details] Patch. Clearing flags on attachment: 319634 Committed r221494: <http://trac.webkit.org/changeset/221494>
Joseph Pecoraro
Comment 23 2017-09-01 13:45:15 PDT
Comment on attachment 319634 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=319634&action=review > Source/WebCore/PAL/pal/LoggerHelper.h:48 > +#define THIS Logger::MethodAndPointer(className(), __func__, this) > + > +#define ALWAYS_LOG(...) logger().logAlways(logChannel(), __VA_ARGS__) > +#define ERROR_LOG(...) logger().error(logChannel(), __VA_ARGS__) > +#define WARNING_LOG(...) logger().warning(logChannel(), __VA_ARGS__) > +#define NOTICE_LOG(...) logger().notice(logChannel(), __VA_ARGS__) > +#define INFO_LOG(...) logger().info(logChannel(), __VA_ARGS__) > +#define DEBUG_LOG(...) logger().debug(logChannel(), __VA_ARGS__) It seems the first argument of these macros is always the special `THIS` macro. Could it just be inlined in these macros, or do you think there are times we may want to not include it?
Eric Carlson
Comment 24 2017-09-01 14:04:42 PDT
(In reply to Joseph Pecoraro from comment #23) > Comment on attachment 319634 [details] > Patch. > > View in context: > https://bugs.webkit.org/attachment.cgi?id=319634&action=review > > > Source/WebCore/PAL/pal/LoggerHelper.h:48 > > +#define THIS Logger::MethodAndPointer(className(), __func__, this) > > + > > +#define ALWAYS_LOG(...) logger().logAlways(logChannel(), __VA_ARGS__) > > +#define ERROR_LOG(...) logger().error(logChannel(), __VA_ARGS__) > > +#define WARNING_LOG(...) logger().warning(logChannel(), __VA_ARGS__) > > +#define NOTICE_LOG(...) logger().notice(logChannel(), __VA_ARGS__) > > +#define INFO_LOG(...) logger().info(logChannel(), __VA_ARGS__) > > +#define DEBUG_LOG(...) logger().debug(logChannel(), __VA_ARGS__) > > It seems the first argument of these macros is always the special `THIS` > macro. Could it just be inlined in these macros, or do you think there are > times we may want to not include it? That was the first thing I tried, but it fails on some platforms when you don't add any extra arguments. For example "ALWAYS_LOG()" expands to logger().logAlways(logChannel(), Logger::MethodAndPointer(className(), __func__, this), __VA_ARGS__) and the compilers used by GTK and wpe generate a compile error when you call a variadic macro with a zero variadic part.
Eric Carlson
Comment 25 2017-09-01 15:16:09 PDT
Plus https://webkit.org/b/176065 to fix a test.
Eric Carlson
Comment 26 2017-09-01 15:17:15 PDT
(In reply to Eric Carlson from comment #25) > Plus https://webkit.org/b/176065 to fix a test. By which I meant https://trac.webkit.org/r221500, of course.
Radar WebKit Bug Importer
Comment 27 2017-09-01 15:17:49 PDT
Matt Lewis
Comment 28 2017-09-01 16:50:43 PDT
(In reply to Per Arne Vollan from comment #16) > (In reply to Alexey Proskuryakov from comment #14) > > CC Per Arne: is this a flaky build failure on Windows? The patch failed to > > build, but trunk built successfully after unapplying. > > I would think so, the build failure seems unrelated. The failure doesn't seem to be flaky. It has failed the build since the patch landed.
Matt Lewis
Comment 29 2017-09-01 17:12:54 PDT
The error given in the results: https://build.webkit.org/builders/Apple%20Win%20Release%20%28Build%29/builds/4091/steps/compile-webkit/logs/stdio is C:\cygwin\home\buildbot\slave\win-release\build\Source\JavaScriptCore\runtime\JSGlobalObjectFunctions.cpp(137): error C2065: 'U8_MAX_LENGTH': undeclared identifier [C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\Source\JavaScriptCore\JavaScriptCore.vcxproj] C:\cygwin\home\buildbot\slave\win-release\build\Source\JavaScriptCore\runtime\JSGlobalObjectFunctions.cpp(162): note: see reference to function template instantiation 'JSC::JSValue JSC::encode<LChar>(JSC::ExecState *,const WTF::Bitmap<256,uint32_t> &,const CharacterType *,unsigned int)' being compiled with [ CharacterType=LChar ]
WebKit Commit Bot
Comment 30 2017-09-01 17:18:59 PDT
Re-opened since this is blocked by bug 176258
Chris Dumez
Comment 31 2017-09-03 14:38:22 PDT
Comment on attachment 319634 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=319634&action=review > Source/WTF/wtf/MediaTime.cpp:555 > +String MediaTime::toString() const A few efficiency nit fixes: > Source/WTF/wtf/MediaTime.cpp:559 > + builder.append("{"); append('{') > Source/WTF/wtf/MediaTime.cpp:561 > + builder.append(String::number(m_timeValue)); Would appendNumber() work? > Source/WTF/wtf/MediaTime.cpp:562 > + builder.append("/"); append('/') > Source/WTF/wtf/MediaTime.cpp:563 > + builder.append(String::number(m_timeScale)); Would appendNumber() work? > Source/WTF/wtf/MediaTime.cpp:564 > + builder.append(" = "); appendLiteral(" = "); > Source/WTF/wtf/MediaTime.cpp:566 > + builder.append(String::number(toDouble())); Would appendNumber() work? > Source/WTF/wtf/MediaTime.cpp:567 > + builder.append("}"); append('}')
Chris Dumez
Comment 32 2017-09-03 14:43:49 PDT
Comment on attachment 319634 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=319634&action=review > Source/WTF/wtf/MediaTime.h:172 > +namespace PAL { Isn't it a layer violation to refer to PAL in WTF? MediaTime is used in JSC which technically does not require PAL, right?
Darin Adler
Comment 33 2017-09-03 21:39:19 PDT
Comment on attachment 319634 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=319634&action=review > Source/WebCore/PAL/pal/LoggerHelper.h:41 > +#define THIS Logger::MethodAndPointer(className(), __func__, this) This broke the Windows build. The "THIS" macro conflicts with a macro in <combaseapi.h>.
Darin Adler
Comment 34 2017-09-03 21:39:51 PDT
(In reply to Chris Dumez from comment #32) > Isn't it a layer violation to refer to PAL in WTF? Yes.
Eric Carlson
Comment 35 2017-09-04 11:43:39 PDT
(In reply to Darin Adler from comment #33) > Comment on attachment 319634 [details] > Patch. > > View in context: > https://bugs.webkit.org/attachment.cgi?id=319634&action=review > > > Source/WebCore/PAL/pal/LoggerHelper.h:41 > > +#define THIS Logger::MethodAndPointer(className(), __func__, this) > > This broke the Windows build. The "THIS" macro conflicts with a macro in > <combaseapi.h>. Ugh, Matt bug 176258 to roll this out Friday night but it was never committed. I just r+d that patch and will clean things up here after it lands.
Eric Carlson
Comment 36 2017-09-04 16:55:23 PDT
Created attachment 319865 [details] Patch for landing.
Eric Carlson
Comment 37 2017-09-04 16:58:36 PDT
Comment on attachment 319634 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=319634&action=review >> Source/WTF/wtf/MediaTime.cpp:555 >> +String MediaTime::toString() const > > A few efficiency nit fixes: Thanks for the suggestions, updated. >> Source/WTF/wtf/MediaTime.h:172 >> +namespace PAL { > > Isn't it a layer violation to refer to PAL in WTF? MediaTime is used in JSC which technically does not require PAL, right? Oops, I moved the template to platform/graphics/MediaPlayer.h (for now at least). >>> Source/WebCore/PAL/pal/LoggerHelper.h:41 >>> +#define THIS Logger::MethodAndPointer(className(), __func__, this) >> >> This broke the Windows build. The "THIS" macro conflicts with a macro in <combaseapi.h>. > > Ugh, Matt bug 176258 to roll this out Friday night but it was never committed. I just r+d that patch and will clean things up here after it lands. Fixed.
WebKit Commit Bot
Comment 38 2017-09-04 20:44:09 PDT
Comment on attachment 319865 [details] Patch for landing. Clearing flags on attachment: 319865 Committed r221606: <http://trac.webkit.org/changeset/221606>
Note You need to log in before you can comment on or make changes to this bug.