Bug 203492

Summary: [GTK][WPE] Fix various non-unified build issues introduced since r251436
Product: WebKit Reporter: Adrian Perez <aperez>
Component: Tools / TestsAssignee: Adrian Perez <aperez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, cdumez, cgarcia, clopez, commit-queue, esprehn+autocc, ews-watchlist, ggaren, glenn, gyuyoung.kim, hi, joepeck, keith_miller, macpherson, mark.lam, menard, msaboff, saam, tzagallo, webkit-bug-importer, youennf, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Adrian Perez
Reported 2019-10-28 10:37:16 PDT
There's some more to churn, in particular after the JSGlobalObject changes were merged recently in JavaScriptCore :-}
Attachments
Patch (22.09 KB, patch)
2019-10-28 10:49 PDT, Adrian Perez
no flags
Patch for landing (21.98 KB, patch)
2019-10-28 17:17 PDT, Adrian Perez
no flags
Adrian Perez
Comment 1 2019-10-28 10:49:26 PDT
Alex Christensen
Comment 2 2019-10-28 11:11:00 PDT
Comment on attachment 382082 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=382082&action=review > Source/JavaScriptCore/ChangeLog:3 > + [GTK][WPE] Fix non-unified builds after r251436 This isn't caused by r251436 > Source/JavaScriptCore/runtime/ObjectInitializationScope.h:32 > +#ifdef NDEBUG > +#include "VM.h" Let's try to avoid protecting #includes with #ifdef NDEBUG, because that would lead to strange debug-only or release-only build failures.
Adrian Perez
Comment 3 2019-10-28 12:52:40 PDT
(In reply to Alex Christensen from comment #2) > Comment on attachment 382082 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=382082&action=review > > > Source/JavaScriptCore/ChangeLog:3 > > + [GTK][WPE] Fix non-unified builds after r251436 > > This isn't caused by r251436 Ah, probably I should reword this: my intention here was to mean that the patch addresses all the issues introduced by any commits after non-unified builds were fixed the last time (which is r251436). How about rewording “Fix various non-unified build issues introduced since r251436”? > > Source/JavaScriptCore/runtime/ObjectInitializationScope.h:32 > > +#ifdef NDEBUG > > +#include "VM.h" > > Let's try to avoid protecting #includes with #ifdef NDEBUG, because that > would lead to strange debug-only or release-only build failures. I will remove the guards before landing. Thanks for the review!
Mark Lam
Comment 4 2019-10-28 12:55:25 PDT
Comment on attachment 382082 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=382082&action=review >> Source/JavaScriptCore/runtime/ObjectInitializationScope.h:32 >> +#include "VM.h" > > Let's try to avoid protecting #includes with #ifdef NDEBUG, because that would lead to strange debug-only or release-only build failures. Can you provide some details about why VM.h is needed here? What is the error?
Mark Lam
Comment 5 2019-10-28 13:06:02 PDT
(In reply to Mark Lam from comment #4) > Comment on attachment 382082 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=382082&action=review > > >> Source/JavaScriptCore/runtime/ObjectInitializationScope.h:32 > >> +#include "VM.h" > > > > Let's try to avoid protecting #includes with #ifdef NDEBUG, because that would lead to strange debug-only or release-only build failures. > > Can you provide some details about why VM.h is needed here? What is the > error? The reason I ask is because VM.h is a heavy-weight file, and I'm always wary when we #include it in yet another header file. Just wondering if there are any cheaper solutions for this.
Adrian Perez
Comment 6 2019-10-28 14:04:20 PDT
(In reply to Mark Lam from comment #5) > (In reply to Mark Lam from comment #4) > > Comment on attachment 382082 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=382082&action=review > > > > >> Source/JavaScriptCore/runtime/ObjectInitializationScope.h:32 > > >> +#include "VM.h" > > > > > > Let's try to avoid protecting #includes with #ifdef NDEBUG, because that would lead to strange debug-only or release-only build failures. > > > > Can you provide some details about why VM.h is needed here? What is the > > error? > > The reason I ask is because VM.h is a heavy-weight file, and I'm always wary > when we #include it in yet another header file. Just wondering if there are > any cheaper solutions for this. The error is caused from the access to “m_vm” in the ~ObjectInitializationScope() destructor, so I think there is no way around including “VM.h” unless we move the destructor to the .cpp file — probably a bad idea as it is marked with ALWAYS_INLINE (when -DNDEBUG is in use → no debugging → release builds). The compiler error is: In file included from ../Source/JavaScriptCore/runtime/ObjectInitializationScope.cpp:27: ../Source/JavaScriptCore/runtime/ObjectInitializationScope.h:46:13: error: member access into incomplete type 'JSC::VM' m_vm.heap.mutatorFence(); ^ ../Source/JavaScriptCore/runtime/ArrayBuffer.h:42:7: note: forward declaration of 'JSC::VM' class VM; ^ 1 error generated.
Mark Lam
Comment 7 2019-10-28 14:27:21 PDT
(In reply to Adrian Perez from comment #6) > (In reply to Mark Lam from comment #5) > > (In reply to Mark Lam from comment #4) > > > Comment on attachment 382082 [details] > > > Patch > > > > > > View in context: > > > https://bugs.webkit.org/attachment.cgi?id=382082&action=review > > > > > > >> Source/JavaScriptCore/runtime/ObjectInitializationScope.h:32 > > > >> +#include "VM.h" > > > > > > > > Let's try to avoid protecting #includes with #ifdef NDEBUG, because that would lead to strange debug-only or release-only build failures. > > > > > > Can you provide some details about why VM.h is needed here? What is the > > > error? > > > > The reason I ask is because VM.h is a heavy-weight file, and I'm always wary > > when we #include it in yet another header file. Just wondering if there are > > any cheaper solutions for this. > > The error is caused from the access to “m_vm” in the > ~ObjectInitializationScope() > destructor, so I think there is no way around including “VM.h” unless we move > the destructor to the .cpp file — probably a bad idea as it is marked with > ALWAYS_INLINE (when -DNDEBUG is in use → no debugging → release builds). > > The compiler error is: > > In file included from > ../Source/JavaScriptCore/runtime/ObjectInitializationScope.cpp:27: > ../Source/JavaScriptCore/runtime/ObjectInitializationScope.h:46:13: error: > member access into incomplete type 'JSC::VM' > m_vm.heap.mutatorFence(); > ^ > ../Source/JavaScriptCore/runtime/ArrayBuffer.h:42:7: note: forward > declaration of 'JSC::VM' > class VM; > ^ > 1 error generated. Thanks. Go ahead and #include it for now. We can look at an alternative solution later if needed.
Adrian Perez
Comment 8 2019-10-28 17:17:47 PDT
Created attachment 382141 [details] Patch for landing
WebKit Commit Bot
Comment 9 2019-10-28 18:05:34 PDT
The commit-queue encountered the following flaky tests while processing attachment 382141 [details]: media/modern-media-controls/compact-media-controls/compact-media-controls-constructor.html bug 193587 (author: graouts@apple.com) The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 10 2019-10-28 18:06:35 PDT
Comment on attachment 382141 [details] Patch for landing Clearing flags on attachment: 382141 Committed r251690: <https://trac.webkit.org/changeset/251690>
WebKit Commit Bot
Comment 11 2019-10-28 18:06:37 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 12 2019-10-28 18:08:38 PDT
Note You need to log in before you can comment on or make changes to this bug.