Bug 44972

Summary: Expose WorkerContext.createBlobURL and WorkerContext.revokeBlobURL
Product: WebKit Reporter: Jian Li <jianli>
Component: WebCore JavaScriptAssignee: Jian Li <jianli>
Severity: Normal CC: dimich, fishd, kinuko, levin, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Description Flags
Proposed Patch levin: review+, jianli: commit-queue-

Description Jian Li 2010-08-31 12:39:55 PDT
Expose WorkerContext.createBlobURL and WorkerContext.revokeBlobURL
Comment 1 Jian Li 2010-08-31 12:43:26 PDT
Created attachment 66087 [details]
Proposed Patch
Comment 2 WebKit Review Bot 2010-08-31 12:45:16 PDT
Attachment 66087 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebCore/workers/WorkerContext.h:46:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 9 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 David Levin 2010-08-31 13:33:31 PDT
Comment on attachment 66087 [details]
Proposed Patch

> diff --git a/WebCore/page/SecurityOrigin.cpp b/WebCore/page/SecurityOrigin.cpp
> +    // For blob scheme, we want to ignore this check.
> +    if (!url.protocolIs("blob"))
> +        if (targetOrigin->isUnique())
> +            return false;
> +#else
>      if (targetOrigin->isUnique())
>          return false;
> +#endif

Please consider:

bool doUniqueOriginCheck = true;
    // For blob scheme, we want to ignore this check.
    doUniqueOriginCheck = !url.protocolIs("blob"));
    if (doUniqueOriginCheck && targetOrigin->isUnique())
        return false;
Comment 4 Jian Li 2010-08-31 14:35:23 PDT
Committed as http://trac.webkit.org/changeset/66537.