WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
17538
Can't build CollectorHeapIntrospector.cpp as a standalone file outside of AllInOneFile.cpp
https://bugs.webkit.org/show_bug.cgi?id=17538
Summary
Can't build CollectorHeapIntrospector.cpp as a standalone file outside of All...
Mark Mentovai
Reported
2008-02-25 14:13:33 PST
Two problems are encountered when trying to build CollectorHeapIntrospector.cpp, a Mac-only file, as a standalone, as opposed to building it normally, which involves including it from AllInOneFile.cpp: There's a forward-declaration problems: CollectorHeap needs to be visible to CollectorHeapIntrospector, but it's not visible from collector.h like it should be. Instead, CollectorHeap is declared solely in collector.cc. A forward declaration is present in CollectorHeapIntrospector.h, which is sufficient to use CollectorHeap as a pointer type, but CollectorHeapIntrospector.cpp dereferences CollectorHeaps. This isn't a problem in the AllInOneFile build because collector.cc, where the struct is currently defined, is included before CollectorHeapIntrospector. The solution is to move the definition of CollectorHeap into collector.h. There's also a namespace problem: CollectorHeapIntrospector needs to access something WTF::RemoteMemoryReader, but it does so by calling it RemoteMemoryReader without being in the WTF namespace or providing an appropriate "using" declaration or directive. Some other source file must have a "using namespace WTF;" that masks the problem in the AllInOneFile build. When building CollectorHeapIntrospector.cpp as a standalone, RemoteMemoryReader can't be found. The solution is to fully-qualify RemoteMemoryReader or use a using-declaration or directive.
Attachments
Move the definition of CollectorHeap into collector.h, and provide a "using" declaration for WTF::RemoteMemoryReader
(2.21 KB, patch)
2008-02-25 14:16 PST
,
Mark Mentovai
mrowe
: review-
Details
Formatted Diff
Diff
v2, includes ChangeLog entry
(3.00 KB, patch)
2008-02-25 14:37 PST
,
Mark Mentovai
mrowe
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Mark Mentovai
Comment 1
2008-02-25 14:16:33 PST
Created
attachment 19355
[details]
Move the definition of CollectorHeap into collector.h, and provide a "using" declaration for WTF::RemoteMemoryReader
Mark Rowe (bdash)
Comment 2
2008-02-25 14:26:47 PST
Comment on
attachment 19355
[details]
Move the definition of CollectorHeap into collector.h, and provide a "using" declaration for WTF::RemoteMemoryReader The patch looks good to me, but it will need a ChangeLog before it can be landed. Please see the instructions at <
http://webkit.org/coding/contributing.html
> and attach an updated patch with a ChangeLog entry for JavaScriptCore.
Mark Mentovai
Comment 3
2008-02-25 14:37:16 PST
Created
attachment 19356
[details]
v2, includes ChangeLog entry Whoops, sorry about that.
Mark Rowe (bdash)
Comment 4
2008-02-25 14:39:24 PST
Comment on
attachment 19356
[details]
v2, includes ChangeLog entry r=me.
Mark Rowe (bdash)
Comment 5
2008-02-25 14:44:50 PST
Landed in
r30576
. Thanks for the patch!
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