Bug 28650 - Remove cross-thread code from CrossOriginPreflightResultCache
Summary: Remove cross-thread code from CrossOriginPreflightResultCache
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Dmitry Titov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-21 17:55 PDT by Dmitry Titov
Modified: 2009-08-24 10:21 PDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (3.94 KB, patch)
2009-08-21 17:59 PDT, Dmitry Titov
levin: review+
levin: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Titov 2009-08-21 17:55:09 PDT
.. since it was there because XHR used it (and it can be used from Workers) and now it is only used from DocumentThreadedLoader, so it only is used on a main thread.
Comment 1 Dmitry Titov 2009-08-21 17:59:14 PDT
Created attachment 38427 [details]
Proposed patch
Comment 2 David Levin 2009-08-21 18:08:19 PDT
Comment on attachment 38427 [details]
Proposed patch


> diff --git a/WebCore/loader/CrossOriginPreflightResultCache.cpp b/WebCore/loader/CrossOriginPreflightResultCache.cpp
> +    static CrossOriginPreflightResultCache& cache = *new CrossOriginPreflightResultCache;

Please use DEFINE_STATIC_LOCAL here.
Comment 3 Dmitry Titov 2009-08-24 10:21:13 PDT
Changed to DYNAMIC_STATIC_LOCAL and landed: http://trac.webkit.org/changeset/47659