Bug 58353 - Set minimum priority for fast lane connections
Summary: Set minimum priority for fast lane connections
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Pratik Solanki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2011-04-12 11:42 PDT by Pratik Solanki
Modified: 2011-04-14 16:07 PDT (History)
3 users (show)

See Also:


Attachments
Patch (618.09 KB, patch)
2011-04-12 12:12 PDT, Pratik Solanki
ddkilzer: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pratik Solanki 2011-04-12 11:42:27 PDT
We should tell CFNetwork to allow images to use the reserved fast lane connections.
Comment 1 Pratik Solanki 2011-04-12 11:46:48 PDT
eh.. allow scripts, not images.
Comment 2 Pratik Solanki 2011-04-12 12:02:22 PDT
<rdar://problem/9262949>
Comment 3 Pratik Solanki 2011-04-12 12:12:40 PDT
Created attachment 89240 [details]
Patch
Comment 4 Alexey Proskuryakov 2011-04-12 23:13:32 PDT
+        * wtf/Platform.h: Define BUILDING_ON_IOS.

This is strange. When is one expected to use this?
Comment 5 David Kilzer (:ddkilzer) 2011-04-13 10:45:57 PDT
Comment on attachment 89240 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=89240&action=review

r=me

> Source/JavaScriptCore/wtf/Platform.h:404
>#if OS(DARWIN) && ((defined(TARGET_OS_EMBEDDED) && TARGET_OS_EMBEDDED)  \
>      || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)                   \
>      || (defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR))
>  #define WTF_OS_IOS 1
> +#define BUILDING_ON_IOS 1

As I just found out:

TARGET_OS_IPHONE is set to "1" for both iOS hardware and iOS Simulator builds, so just checking that would be sufficient.  We don't need to check for TARGET_OS_EMBEDDED or TARGET_IPHONE_SIMULATOR here.

If you want to clean up the definition for WTF_PLATFORM_IOS and WTF_PLATFORM_IOS_SIMULATOR below at the same time, that would be great, but not necessary.

WTF_PLATFORM_IOS only needs to check for TARGET_OS_IPHONE being 1, and WTF_PLATFORM_IOS_SIMULATOR only needs to check for TARGET_IPHONE_SIMULATOR being 1.
Comment 6 David Kilzer (:ddkilzer) 2011-04-13 10:47:26 PDT
(In reply to comment #4)
> +        * wtf/Platform.h: Define BUILDING_ON_IOS.
> 
> This is strange. When is one expected to use this?

This could be used with other BUILDING_ON_MACOSX_KITTY macros, or would it be better to use PLATFORM(IOS) there instead since the BUILDING_ON_FOO macros are only for checking versions?
Comment 7 David Kilzer (:ddkilzer) 2011-04-13 10:54:01 PDT
Comment on attachment 89240 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=89240&action=review

>> Source/JavaScriptCore/wtf/Platform.h:404
>> +#define BUILDING_ON_IOS 1
> 
> As I just found out:
> 
> TARGET_OS_IPHONE is set to "1" for both iOS hardware and iOS Simulator builds, so just checking that would be sufficient.  We don't need to check for TARGET_OS_EMBEDDED or TARGET_IPHONE_SIMULATOR here.
> 
> If you want to clean up the definition for WTF_PLATFORM_IOS and WTF_PLATFORM_IOS_SIMULATOR below at the same time, that would be great, but not necessary.
> 
> WTF_PLATFORM_IOS only needs to check for TARGET_OS_IPHONE being 1, and WTF_PLATFORM_IOS_SIMULATOR only needs to check for TARGET_IPHONE_SIMULATOR being 1.

Since iOS isn't self-hosting, "BUILDING_ON_IOS" doesn't make much sense here.  Probably best to just use the existing PLATFORM(IOS) instead.
Comment 8 Pratik Solanki 2011-04-14 16:07:47 PDT
Committed r83882: <http://trac.webkit.org/changeset/83882>