Bug 63332 - Safari will quit unexpectedly when launching Safari in the first time (crash in initQTSecurityPolicyNoLocalToRemoteSiteAttribute)
Summary: Safari will quit unexpectedly when launching Safari in the first time (crash ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar, PlatformOnly
Depends on:
Blocks:
 
Reported: 2011-06-24 10:51 PDT by Jer Noble
Modified: 2011-06-24 17:16 PDT (History)
1 user (show)

See Also:


Attachments
Patch (3.46 KB, patch)
2011-06-24 10:57 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (5.68 KB, patch)
2011-06-24 11:17 PDT, Jer Noble
eric.carlson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2011-06-24 10:51:06 PDT
Safari will quit unexpectedly when launching Safari in the first time (crash in initQTSecurityPolicyNoLocalToRemoteSiteAttribute)
Comment 1 Jer Noble 2011-06-24 10:52:06 PDT
Only occurs on Leopard if QTKit < 7.6.3 is installed. 

<rdar://problem/9661650>
Comment 2 Jer Noble 2011-06-24 10:57:30 PDT
Created attachment 98511 [details]
Patch
Comment 3 Eric Carlson 2011-06-24 11:11:26 PDT
Comment on attachment 98511 [details]
Patch

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

> Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm:252
> +    if (QTSecurityPolicyNoRemoteToLocalSiteAttribute) {
> +        [movieAttributes setValue:[NSNumber numberWithBool:NO] forKey:QTSecurityPolicyNoCrossSiteAttribute];
> +        [movieAttributes setValue:[NSNumber numberWithBool:YES] forKey:QTSecurityPolicyNoRemoteToLocalSiteAttribute];
> +        [movieAttributes setValue:[NSNumber numberWithBool:YES] forKey:QTSecurityPolicyNoLocalToRemoteSiteAttribute];
> +    } else
> +        [movieAttributes setValue:[NSNumber numberWithBool:YES] forKey:QTSecurityPolicyNoCrossSiteAttribute];
> +

SOFT_LINK_POINTER asserts in a debug build. You might add a SOFT_LINK_POINTER_OPTIONAL version that does not.
Comment 4 Jer Noble 2011-06-24 11:17:24 PDT
Created attachment 98515 [details]
Patch

Addressed Eric's comment by adding SOFT_LINK_POINTER_OPTIONAL.
Comment 5 Eric Carlson 2011-06-24 11:51:21 PDT
Comment on attachment 98515 [details]
Patch

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

> Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm:246
> +    // Check to see if QTKit >= 7.6.3 is installed, which defines NoRemoteToLocal and NoLocalToRemote.
> +    // If not, just set NoCrossSite = YES, which does the same thing as NoRemoteToLocal = YES and 
> +    // NoLocalToRemote = YES in QTKit < 7.6.3.

We don't actually check the QTKit version here, so it would probably be better to say something like "... see if the current version of QTKit has NoRemoteToLocal ..." instead.
Comment 6 Jer Noble 2011-06-24 11:55:26 PDT
(In reply to comment #5)
> (From update of attachment 98515 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=98515&action=review
> 
> > Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm:246
> > +    // Check to see if QTKit >= 7.6.3 is installed, which defines NoRemoteToLocal and NoLocalToRemote.
> > +    // If not, just set NoCrossSite = YES, which does the same thing as NoRemoteToLocal = YES and 
> > +    // NoLocalToRemote = YES in QTKit < 7.6.3.
> 
> We don't actually check the QTKit version here, so it would probably be better to say something like "... see if the current version of QTKit has NoRemoteToLocal ..." instead.

How about: "Check to see if QTSecurityPolicyNoRemoteToLocalSiteAttribute is defined, which was added in QTKit 7.6.3."

I thought it was important to mention that "NoCrossSite" does the right thing in versions of QTKit previous to 7.6.3.
Comment 7 Eric Carlson 2011-06-24 14:06:21 PDT
(In reply to comment #6)
> 
> How about: "Check to see if QTSecurityPolicyNoRemoteToLocalSiteAttribute is defined, which was added in QTKit 7.6.3."
> 
> I thought it was important to mention that "NoCrossSite" does the right thing in versions of QTKit previous to 7.6.3.

That sounds fine.
Comment 8 Jer Noble 2011-06-24 17:16:45 PDT
Committed r89718: <http://trac.webkit.org/changeset/89718>