WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
149706
Clean up PassRefPtr in websockets
https://bugs.webkit.org/show_bug.cgi?id=149706
Summary
Clean up PassRefPtr in websockets
Gyuyoung Kim
Reported
2015-10-01 08:04:20 PDT
SSIA
Attachments
Patch
(23.07 KB, patch)
2015-10-01 08:05 PDT
,
Gyuyoung Kim
no flags
Details
Formatted Diff
Diff
Patch
(11.30 KB, patch)
2016-05-29 21:56 PDT
,
Gyuyoung Kim
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews106 for mac-yosemite-wk2
(1.48 MB, application/zip)
2016-05-29 22:34 PDT
,
Build Bot
no flags
Details
Patch
(11.35 KB, patch)
2016-05-30 19:02 PDT
,
Gyuyoung Kim
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews100 for mac-yosemite
(819.83 KB, application/zip)
2016-05-30 19:40 PDT
,
Build Bot
no flags
Details
Patch
(11.35 KB, patch)
2016-05-30 19:46 PDT
,
Gyuyoung Kim
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Gyuyoung Kim
Comment 1
2015-10-01 08:05:54 PDT
Created
attachment 262251
[details]
Patch
Brent Fulgham
Comment 2
2016-05-18 20:50:09 PDT
What happened to this? Seems like it was a useful in-progress change.
Gyuyoung Kim
Comment 3
2016-05-19 00:45:27 PDT
(In reply to
comment #2
)
> What happened to this? Seems like it was a useful in-progress change.
Oops, I have forgotten this bug. Let me try to upload new patch based on trunk.
Gyuyoung Kim
Comment 4
2016-05-29 21:56:01 PDT
Created
attachment 280069
[details]
Patch
Build Bot
Comment 5
2016-05-29 22:34:36 PDT
Comment on
attachment 280069
[details]
Patch
Attachment 280069
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/1405461
Number of test failures exceeded the failure limit.
Build Bot
Comment 6
2016-05-29 22:34:39 PDT
Created
attachment 280071
[details]
Archive of layout-test-results from ews106 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Gyuyoung Kim
Comment 7
2016-05-30 19:02:13 PDT
Created
attachment 280116
[details]
Patch
Chris Dumez
Comment 8
2016-05-30 19:31:55 PDT
Comment on
attachment 280116
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=280116&action=review
> Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp:56 > + , m_bridge(Bridge::create(m_workerClientWrapper.copyRef(), m_workerGlobalScope.get(), taskMode))
Clearly, m_workerClientWrapper cannot be null here, given that it is initialized on the previous line.
> Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp:145 > +WorkerThreadableWebSocketChannel::Peer::Peer(ThreadableWebSocketChannelClientWrapper* clientWrapper, WorkerLoaderProxy& loaderProxy, ScriptExecutionContext* context, const String& taskMode)
I don't think clientWrapper can be null so it looks like this should be a reference. Given that We ref it, I think this could even be a Ref<>&&.
> Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp:350 > +WorkerThreadableWebSocketChannel::Bridge::Bridge(RefPtr<ThreadableWebSocketChannelClientWrapper>&& workerClientWrapper, WorkerGlobalScope* workerGlobalScope, const String& taskMode)
Looks like this should be a Ref<>&& for the workerClientWrapper, given the assertion below.
> Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp:365 > +void WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize(ScriptExecutionContext& context, WorkerLoaderProxy* loaderProxy, ThreadableWebSocketChannelClientWrapper* clientWrapper, const String& taskMode)
I don't think clientWrapper can be null so it should probably be a reference.
> Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp:-371 > - RefPtr<ThreadableWebSocketChannelClientWrapper> clientWrapper = prpClientWrapper;
It is important to ref it for the capture in the lambda below. The new code looks unsafe.
> Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp:403 > + mainThreadInitialize(context, loaderProxy, workerClientWrapper.get(), capturedTaskMode.string());
I don't think workerClientWrapper can be null here given that is it dereferenced below.
> Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h:82 > + static Peer* create(ThreadableWebSocketChannelClientWrapper* clientWrapper, WorkerLoaderProxy& loaderProxy, ScriptExecutionContext* context, const String& taskMode)
Why does this return a raw pointer? This should really return a Ref<> (although let's do this separately).
> Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h:128 > + static Ref<Bridge> create(RefPtr<ThreadableWebSocketChannelClientWrapper>&& workerClientWrapper, WorkerGlobalScope* workerGlobalScope, const String& taskMode)
workerClientWrapper cannot be null, to I would prefer a Ref<>&&.
Build Bot
Comment 9
2016-05-30 19:40:28 PDT
Comment on
attachment 280116
[details]
Patch
Attachment 280116
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/1410046
Number of test failures exceeded the failure limit.
Build Bot
Comment 10
2016-05-30 19:40:31 PDT
Created
attachment 280117
[details]
Archive of layout-test-results from ews100 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-yosemite Platform: Mac OS X 10.10.5
Gyuyoung Kim
Comment 11
2016-05-30 19:46:11 PDT
Created
attachment 280118
[details]
Patch
Ahmad Saleem
Comment 12
2022-09-17 17:00:32 PDT
PassRefPtr usage does not exist anymore in Webkit GitHub as of today. So I am marking this as "RESOLVED WONTFIX". Thanks!
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