Bug 44972 - Expose WorkerContext.createBlobURL and WorkerContext.revokeBlobURL
Summary: Expose WorkerContext.createBlobURL and WorkerContext.revokeBlobURL
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Jian Li
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-31 12:39 PDT by Jian Li
Modified: 2010-08-31 14:35 PDT (History)
5 users (show)

See Also:


Attachments
Proposed Patch (7.13 KB, patch)
2010-08-31 12:43 PDT, Jian Li
levin: review+
jianli: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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
> +#if ENABLE(BLOB)
> +    // 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;
#if ENABLE(BLOB)
    // For blob scheme, we want to ignore this check.
    doUniqueOriginCheck = !url.protocolIs("blob"));
#endif
    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.