WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
105113
[WebKit2] Register schemes with the network process if it is being used
https://bugs.webkit.org/show_bug.cgi?id=105113
Summary
[WebKit2] Register schemes with the network process if it is being used
Andy Estes
Reported
2012-12-15 15:29:07 PST
[WebKit2] Register schemes with the network process if it is being used
Attachments
Patch
(13.76 KB, patch)
2012-12-15 15:35 PST
,
Andy Estes
andersca
: review+
buildbot
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Andy Estes
Comment 1
2012-12-15 15:35:51 PST
Created
attachment 179627
[details]
Patch
Anders Carlsson
Comment 2
2012-12-15 15:40:08 PST
Comment on
attachment 179627
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=179627&action=review
> Source/WebKit2/NetworkProcess/NetworkProcess.h:78 > + void registerSchemeForCustomProtocol(const WTF::String&); > + void unregisterSchemeForCustomProtocol(const WTF::String&);
No need for WTF:: here.
> Source/WebKit2/UIProcess/Network/mac/NetworkProcessProxyMac.mm:46 > + NSArray *schemes = [[WKBrowsingContextController customSchemes] allObjects]; > + for (size_t i = 0; i < [schemes count]; ++i) > + parameters.urlSchemesRegisteredForCustomProtocols.append([schemes objectAtIndex:i]);
You can just use fast enumeration here: for (NSString *scheme in [WKBrowsingContextController customSchemes])
> Source/WebKit2/UIProcess/WebContext.cpp:1116 > + if (m_usesNetworkProcess) > + NetworkProcessManager::shared().process()->send(Messages::NetworkProcess::RegisterSchemeForCustomProtocol(scheme), 0); > + else > + sendToAllProcesses(Messages::WebProcess::RegisterSchemeForCustomProtocol(scheme)); > +}
This is missing the #if ENABLE(NETWORK_PROCESS). I'd use an early return to avoid making the indentation look weird.
> Source/WebKit2/UIProcess/WebContext.cpp:1123 > + if (m_usesNetworkProcess) > + NetworkProcessManager::shared().process()->send(Messages::NetworkProcess::UnregisterSchemeForCustomProtocol(scheme), 0); > + else > + sendToAllProcesses(Messages::WebProcess::UnregisterSchemeForCustomProtocol(scheme));
Ditto.
> Source/WebKit2/UIProcess/WebContext.h:329 > + void registerSchemeForCustomProtocol(const WTF::String&); > + void unregisterSchemeForCustomProtocol(const WTF::String&);
No need for WTF::
Build Bot
Comment 3
2012-12-15 15:43:48 PST
Comment on
attachment 179627
[details]
Patch
Attachment 179627
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/15360229
Andy Estes
Comment 4
2012-12-15 16:04:48 PST
Committed
r137818
: <
http://trac.webkit.org/changeset/137818
>
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